chore: terminal eslint error

This commit is contained in:
zhaisifeng 2023-11-23 16:14:58 +08:00
parent 3ff915da32
commit aa9adea242
2 changed files with 65 additions and 65 deletions

View File

@ -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 dont import SVG icons statically. (They wont 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 dont import Remix icons statically. (They wont 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 dont import SVG icons statically. (They wont 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 dont import Remix icons statically. (They wont 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
}
}

View File

@ -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",