Преглед изворни кода

organize eslint packages and settings

Yuki Takei пре 4 година
родитељ
комит
04a35e1bd0

+ 1 - 1
.eslintrc.js

@@ -1,5 +1,5 @@
 module.exports = {
-  parser: '@typescript-eslint/parser',
+  root: true, // https://eslint.org/docs/user-guide/configuring/configuration-files#cascading-and-hierarchy
   extends: [
     'weseek',
     'weseek/typescript',

+ 0 - 1
packages/app/.eslintignore

@@ -1,4 +1,3 @@
-/packages/**
 /public/**
 /src/client/legacy/thirdparty-js/**
 /src/client/util/reveal/plugins/markdown.js

+ 0 - 21
packages/app/.eslintrc.js

@@ -1,14 +1,9 @@
 module.exports = {
-  root: true, // https://eslint.org/docs/user-guide/configuring/configuration-files#cascading-and-hierarchy
   extends: [
-    'weseek',
     'weseek/react',
-    'weseek/typescript',
-    "plugin:jest/recommended",
   ],
   env: {
     jquery: true,
-    "jest/globals": true,
   },
   globals: {
     $: true,
@@ -18,26 +13,10 @@ module.exports = {
     ScrollPosStyler: true,
     window: true,
   },
-  plugins: [
-    "jest",
-  ],
   rules: {
-    'import/prefer-default-export': 'off',
     'no-restricted-imports': ['error', {
       name: 'axios',
       message: 'Please use src/utils/axios instead.',
     }],
-    '@typescript-eslint/no-explicit-any': 'off',
-    indent: [
-      'error',
-      2,
-      {
-        SwitchCase: 1,
-        ignoredNodes: ['JSXElement *', 'JSXElement', 'JSXAttribute', 'JSXSpreadAttribute'],
-        ArrayExpression: 'first',
-        FunctionDeclaration: { body: 1, parameters: 2 },
-        FunctionExpression: { body: 1, parameters: 2 },
-      },
-    ],
   },
 };

+ 3 - 3
packages/app/package.json

@@ -146,10 +146,10 @@
     "csv-to-markdown-table": "^1.0.1",
     "diff2html": "^3.1.2",
     "eazy-logger": "^3.0.2",
-    "eslint": "^6.0.1",
-    "eslint-config-weseek": "^1.0.8",
+    "eslint": "^7.31.0",
+    "eslint-config-weseek": "^1.0.11",
     "eslint-import-resolver-typescript": "^2.4.0",
-    "eslint-plugin-import": "^2.18.0",
+    "eslint-plugin-import": "^2.23.4",
     "eslint-plugin-jest": "^23.0.3",
     "eslint-plugin-react": "^7.14.2",
     "eslint-plugin-react-hooks": "^4.0.4",

+ 3 - 0
packages/slack/package.json

@@ -30,7 +30,10 @@
     "@typescript-eslint/parser": "^4.18.0",
     "browser-bunyan": "^1.6.3",
     "cross-env": "^7.0.0",
+    "eslint": "^7.31.0",
+    "eslint-config-weseek": "^1.0.11",
     "eslint-import-resolver-typescript": "^2.4.0",
+    "eslint-plugin-import": "^2.23.4",
     "eslint-plugin-jest": "^24.3.2",
     "ts-jest": "^26.5.4",
     "tsc-alias": "^1.2.9",

+ 3 - 0
packages/slackbot-proxy/package.json

@@ -62,7 +62,10 @@
     "@typescript-eslint/parser": "^4.18.0",
     "bootstrap": "^5.0.2",
     "browser-bunyan": "^1.6.3",
+    "eslint": "^7.31.0",
+    "eslint-config-weseek": "^1.0.11",
     "eslint-import-resolver-typescript": "^2.4.0",
+    "eslint-plugin-import": "^2.23.4",
     "morgan": "^1.10.0",
     "ts-jest": "^26.5.4",
     "ts-node": "^9.1.1",

Разлика између датотеке није приказан због своје велике величине
+ 403 - 115
yarn.lock


Неке датотеке нису приказане због велике количине промена