Răsfoiți Sursa

update eslint rules

Yuki Takei 3 ani în urmă
părinte
comite
082948c3b9
3 a modificat fișierele cu 25 adăugiri și 1 ștergeri
  1. 10 0
      .eslintrc.js
  2. 4 0
      packages/app/.eslintignore
  3. 11 1
      packages/app/.eslintrc.js

+ 10 - 0
.eslintrc.js

@@ -56,6 +56,7 @@ module.exports = {
       },
       },
     ],
     ],
     '@typescript-eslint/no-explicit-any': 'off',
     '@typescript-eslint/no-explicit-any': 'off',
+    '@typescript-eslint/explicit-module-boundary-types': 'off',
     indent: [
     indent: [
       'error',
       'error',
       2,
       2,
@@ -80,4 +81,13 @@ module.exports = {
       },
       },
     ]],
     ]],
   },
   },
+  overrides: [
+    {
+      // enable the rule specifically for TypeScript files
+      files: ['*.ts', '*.tsx'],
+      rules: {
+        '@typescript-eslint/explicit-module-boundary-types': ['error'],
+      },
+    },
+  ],
 };
 };

+ 4 - 0
packages/app/.eslintignore

@@ -1,7 +1,11 @@
 /dist/**
 /dist/**
+/transpiled/**
 /public/**
 /public/**
 /src/client/legacy/thirdparty-js/**
 /src/client/legacy/thirdparty-js/**
 /src/client/util/reveal/plugins/markdown.js
 /src/client/util/reveal/plugins/markdown.js
 /src/linter-checker/**
 /src/linter-checker/**
+/src/next-i18next.config.js
+/src/utils/next.config.utils.js
+/src-obsolete/**
 /tmp/**
 /tmp/**
 /next-env.d.ts
 /next-env.d.ts

+ 11 - 1
packages/app/.eslintrc.js

@@ -38,9 +38,19 @@ module.exports = {
     '@typescript-eslint/no-var-requires': 'off',
     '@typescript-eslint/no-var-requires': 'off',
 
 
     // set 'warn' temporarily -- 2021.08.02 Yuki Takei
     // set 'warn' temporarily -- 2021.08.02 Yuki Takei
-    '@typescript-eslint/explicit-module-boundary-types': ['warn'],
     '@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-done-callback': ['warn'],
   },
   },
+  overrides: [
+    {
+      // enable the rule specifically for TypeScript files
+      files: ['*.ts', '*.tsx'],
+      rules: {
+        // '@typescript-eslint/explicit-module-boundary-types': ['error'],
+        // set 'warn' temporarily -- 2022.07.25 Yuki Takei
+        '@typescript-eslint/explicit-module-boundary-types': ['warn'],
+      },
+    },
+  ],
 };
 };