Просмотр исходного кода

relocate eslint settings for jest

Yuki Takei 2 лет назад
Родитель
Сommit
5dafb26a00
2 измененных файлов с 7 добавлено и 19 удалено
  1. 0 11
      .eslintrc.js
  2. 7 8
      apps/app/.eslintrc.js

+ 0 - 11
.eslintrc.js

@@ -3,15 +3,8 @@ module.exports = {
   extends: [
     'weseek',
     'weseek/typescript',
-    'plugin:jest/recommended',
   ],
-  env: {
-    'jest/globals': true,
-  },
-  globals: {
-  },
   plugins: [
-    'jest',
     'regex',
   ],
   rules: {
@@ -72,10 +65,6 @@ module.exports = {
         FunctionExpression: { body: 1, parameters: 2 },
       },
     ],
-    'jest/no-standalone-expect': [
-      'error',
-      { additionalTestBlockFunctions: ['each.test'] },
-    ],
     'regex/invalid': ['error', [
       {
         regex: '\\?\\<\\!',

+ 7 - 8
apps/app/.eslintrc.js

@@ -1,19 +1,14 @@
 module.exports = {
   extends: [
     'next/core-web-vitals',
+    'plugin:jest/recommended',
   ],
   plugins: [
+    'jest',
     'regex',
   ],
   env: {
-    jquery: true,
-  },
-  globals: {
-    $: true,
-    jquery: true,
-    hljs: true,
-    ScrollPosStyler: true,
-    window: true,
+    'jest/globals': true,
   },
   settings: {
     // resolve path aliases by eslint-import-resolver-typescript
@@ -41,6 +36,10 @@ module.exports = {
     '@typescript-eslint/no-use-before-define': ['warn'],
     '@typescript-eslint/no-this-alias': ['warn'],
     'jest/no-done-callback': ['warn'],
+    'jest/no-standalone-expect': [
+      'error',
+      { additionalTestBlockFunctions: ['each.test'] },
+    ],
   },
   overrides: [
     {