Yuki Takei 7 lat temu
rodzic
commit
007196edcb

+ 1 - 8
packages/growi-commons/.babelrc

@@ -1,20 +1,13 @@
 {
   "presets": [
-    ["env", {
+    ["@babel/preset-env", {
       "targets": {
         "browsers": ["last 2 versions"]
       }
     }]
   ],
   "plugins": [
-    "add-module-exports",
-    "transform-class-properties"
   ],
   "env": {
-    "development": {
-      "presets": [
-        "power-assert"
-      ]
-    }
   }
 }

+ 2 - 5
packages/growi-commons/.eslintrc.js

@@ -4,7 +4,7 @@ module.exports = {
     'weseek/react',
   ],
   env: {
-    mocha: true,
+    'jest/globals': true,
     jquery: true,
   },
   globals: {
@@ -15,7 +15,7 @@ module.exports = {
     window: true,
   },
   plugins: [
-    'chai-friendly',
+    'jest',
   ],
   rules: {
     'indent': [
@@ -35,8 +35,5 @@ module.exports = {
     ],
     // eslint-plugin-import rules
     'import/no-unresolved': [2, { ignore: ['^@'] }], // ignore @alias/..., @commons/..., ...
-    // eslint-plugin-chai-friendly rules
-    'no-unused-expressions': 0,
-    'chai-friendly/no-unused-expressions': 2,
   },
 };

+ 15 - 4
packages/growi-commons/package.json

@@ -15,7 +15,7 @@
     "lint:styles:fix": "prettier-stylelint --quiet --write src/styles/scss/**/*.scss",
     "lint:styles": "stylelint src/styles/scss/**/*.scss",
     "lint": "npm-run-all -p lint:js lint:styles",
-    "test": ""
+    "test": "jest"
   },
   "repository": "https://github.com/weseek/growi-commons.git",
   "author": "Yuki Takei <yuki@weseek.co.jp>",
@@ -26,16 +26,27 @@
   "dependencies": {},
   "homepage": "https://github.com/weseek/growi-commons#readme",
   "devDependencies": {
+    "@babel/preset-env": "^7.4.3",
     "babel-eslint": "^10.0.1",
-    "babel-preset-env": "^1.7.0",
-    "babel-preset-react": "^6.24.1",
     "eslint": "^5.15.1",
     "eslint-config-weseek": "^1.0.1",
-    "eslint-plugin-chai-friendly": "^0.4.1",
     "eslint-plugin-import": "^2.16.0",
+    "eslint-plugin-jest": "^22.4.1",
     "eslint-plugin-react": "^7.12.4",
+    "jest": "^24.7.1",
+    "module-alias": "^2.2.0",
     "prettier-stylelint": "^0.4.2"
   },
+  "_moduleAliases": {
+    "@root": ".",
+    "@src": "src"
+  },
+  "jest": {
+    "moduleNameMapper": {
+      "@root/(.+)": "<rootDir>/$1",
+      "@src/(.+)": "<rootDir>/src/$1"
+    }
+  },
   "engines": {
     "node": ">=8.11.1 <11",
     "npm": ">=5.6.0 <7",

Plik diff jest za duży
+ 863 - 19
packages/growi-commons/yarn.lock


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików