From aa9adea242be4a9f5c73ef79491dfa72648877d3 Mon Sep 17 00:00:00 2001 From: zhaisifeng Date: Thu, 23 Nov 2023 16:14:58 +0800 Subject: [PATCH] chore: terminal eslint error --- app/client/.eslintrc.base.json | 128 ++++++++++++++++----------------- app/client/.eslintrc.js | 2 +- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/app/client/.eslintrc.base.json b/app/client/.eslintrc.base.json index 0e8aa1b3fd..dda21da874 100644 --- a/app/client/.eslintrc.base.json +++ b/app/client/.eslintrc.base.json @@ -22,70 +22,70 @@ "sourceType": "module", "ecmaFeatures": { "jsx": true - }, - "rules": { - "@typescript-eslint/no-explicit-any": "error", - "@typescript-eslint/no-unused-vars": "error", - "jest/no-focused-tests": "error", - "jest/no-disabled-tests": "error", - "@typescript-eslint/consistent-type-imports": "error", - "react-hooks/rules-of-hooks": "error", - "react/jsx-boolean-value": "error", - "react/self-closing-comp": "error", - "react/jsx-sort-props": "error", - "react/jsx-fragments": "error", - "react/jsx-no-useless-fragment": "error", - "sort-destructure-keys/sort-destructure-keys": [ - "error", - { - "caseSensitive": false - } - ], - "no-console": "error", - "no-debugger": "error", - "@typescript-eslint/no-restricted-imports": [ - "error", - { - "patterns": [ - { - "group": [ - "@blueprintjs/core/lib/esnext/*" - ], - "message": "Reason: @blueprintjs/core has both lib/esnext and lib/esm directories which export the same components. To avoid duplicating components in the bundle, please import only from the lib/esm directory." - }, - { - "group": [ - "*.svg" - ], - "importNames": [ - "ReactComponent" - ], - "message": "Reason: Please don’t import SVG icons statically. (They won’t always be needed, but they *will* always be present in the bundle and will increase the bundle size.) Instead, please either import them as SVG paths (e.g. import starIconUrl from './star.svg'), or use the importSvg wrapper from design-system-old (e.g. const StarIcon = importSvg(() => import('./star.svg')))." - }, - { - "group": [ - "remixicon-react/*" - ], - "message": "Reason: Please don’t import Remix icons statically. (They won’t always be needed, but they *will* always be present in the bundle and will increase the bundle size.) Instead, please use the importRemixIcon wrapper from design-system-old (e.g. const StarIcon = importRemixIcon(() => import('remixicon-react/Star')))." - } - ] - } - ] - }, - "settings": { - "import/resolver": { - "babel-module": {} - }, - "react": { - "pragma": "React", - "version": "detect" - } - }, - "env": { - "browser": true, - "node": true, - "cypress/globals": true, - "worker": true } + }, + "rules": { + "@typescript-eslint/no-explicit-any": "error", + "@typescript-eslint/no-unused-vars": "warn", + "jest/no-focused-tests": "error", + "jest/no-disabled-tests": "error", + "@typescript-eslint/consistent-type-imports": "error", + "react-hooks/rules-of-hooks": "error", + "react/jsx-boolean-value": "error", + "react/self-closing-comp": "error", + "react/jsx-sort-props": "error", + "react/jsx-fragments": "error", + "react/jsx-no-useless-fragment": "error", + "sort-destructure-keys/sort-destructure-keys": [ + "error", + { + "caseSensitive": false + } + ], + "no-console": "error", + "no-debugger": "off", + "@typescript-eslint/no-restricted-imports": [ + "error", + { + "patterns": [ + { + "group": [ + "@blueprintjs/core/lib/esnext/*" + ], + "message": "Reason: @blueprintjs/core has both lib/esnext and lib/esm directories which export the same components. To avoid duplicating components in the bundle, please import only from the lib/esm directory." + }, + { + "group": [ + "*.svg" + ], + "importNames": [ + "ReactComponent" + ], + "message": "Reason: Please don’t import SVG icons statically. (They won’t always be needed, but they *will* always be present in the bundle and will increase the bundle size.) Instead, please either import them as SVG paths (e.g. import starIconUrl from './star.svg'), or use the importSvg wrapper from design-system-old (e.g. const StarIcon = importSvg(() => import('./star.svg')))." + }, + { + "group": [ + "remixicon-react/*" + ], + "message": "Reason: Please don’t import Remix icons statically. (They won’t always be needed, but they *will* always be present in the bundle and will increase the bundle size.) Instead, please use the importRemixIcon wrapper from design-system-old (e.g. const StarIcon = importRemixIcon(() => import('remixicon-react/Star')))." + } + ] + } + ] + }, + "settings": { + "import/resolver": { + "babel-module": {} + }, + "react": { + "pragma": "React", + "version": "detect" + } + }, + "env": { + "browser": true, + "node": true, + "cypress/globals": true, + "worker": true } } diff --git a/app/client/.eslintrc.js b/app/client/.eslintrc.js index b81c271f9d..282ba466c8 100644 --- a/app/client/.eslintrc.js +++ b/app/client/.eslintrc.js @@ -11,7 +11,7 @@ const baseNoRestrictedImports = baseEslintConfig.rules["@typescript-eslint/no-restricted-imports"][1]; const eslintConfig = { - extends: ["../.eslintrc.base.json"], + extends: [".eslintrc.base.json"], rules: { "@typescript-eslint/no-explicit-any": "off", "react/display-name": "off",