Procházet zdrojové kódy

reorganize eslint settings for jest

Yuki Takei před 2 roky
rodič
revize
9c3a43a74f

+ 0 - 10
apps/app/.eslintrc.js

@@ -1,15 +1,10 @@
 module.exports = {
 module.exports = {
   extends: [
   extends: [
     'next/core-web-vitals',
     'next/core-web-vitals',
-    'plugin:jest/recommended',
   ],
   ],
   plugins: [
   plugins: [
-    'jest',
     'regex',
     'regex',
   ],
   ],
-  env: {
-    'jest/globals': true,
-  },
   settings: {
   settings: {
     // resolve path aliases by eslint-import-resolver-typescript
     // resolve path aliases by eslint-import-resolver-typescript
     'import/resolver': {
     'import/resolver': {
@@ -35,11 +30,6 @@ module.exports = {
     // set 'warn' temporarily -- 2021.08.02 Yuki Takei
     // set 'warn' temporarily -- 2021.08.02 Yuki Takei
     '@typescript-eslint/no-use-before-define': ['warn'],
     '@typescript-eslint/no-use-before-define': ['warn'],
     '@typescript-eslint/no-this-alias': ['warn'],
     '@typescript-eslint/no-this-alias': ['warn'],
-    'jest/no-done-callback': ['warn'],
-    'jest/no-standalone-expect': [
-      'error',
-      { additionalTestBlockFunctions: ['each.test'] },
-    ],
   },
   },
   overrides: [
   overrides: [
     {
     {

+ 18 - 0
apps/app/test/integration/.eslintrc.js

@@ -0,0 +1,18 @@
+module.exports = {
+  root: true,
+  extends: [
+    'weseek/typescript',
+    'plugin:jest/recommended',
+  ],
+  env: {
+    'jest/globals': true,
+  },
+  plugins: ['jest'],
+  rules: {
+    'jest/no-done-callback': ['warn'],
+    'jest/no-standalone-expect': [
+      'error',
+      { additionalTestBlockFunctions: ['each.test'] },
+    ],
+  }
+};

+ 18 - 0
apps/app/test/unit/.eslintrc.js

@@ -0,0 +1,18 @@
+module.exports = {
+  root: true,
+  extends: [
+    'weseek/typescript',
+    'plugin:jest/recommended',
+  ],
+  env: {
+    'jest/globals': true,
+  },
+  plugins: ['jest'],
+  rules: {
+    'jest/no-done-callback': ['warn'],
+    'jest/no-standalone-expect': [
+      'error',
+      { additionalTestBlockFunctions: ['each.test'] },
+    ],
+  }
+};