Turn off ESLint rules with small benefit-to-effort ratio (#3951)
* Turn off ESLint rules * Move fast-refresh to migration section * Add changeset
This commit is contained in:
parent
dd50f95b55
commit
6cc8f78746
2 changed files with 43 additions and 38 deletions
5
.changeset/light-steaks-bathe.md
Normal file
5
.changeset/light-steaks-bathe.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"saleor-dashboard": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Turn off ESLint rules with small benefit-to-effort ratio
|
|
@ -37,8 +37,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@typescript-eslint/semi": ["off"],
|
// Custom rules:
|
||||||
"@typescript-eslint/quotes": ["off", "double"],
|
|
||||||
"import/no-duplicates": "error",
|
"import/no-duplicates": "error",
|
||||||
"import/no-extraneous-dependencies": "off", // imports are handled by simple-import-sort/sort
|
"import/no-extraneous-dependencies": "off", // imports are handled by simple-import-sort/sort
|
||||||
"import/no-internal-modules": "off", // imports are handled by simple-import-sort/sort
|
"import/no-internal-modules": "off", // imports are handled by simple-import-sort/sort
|
||||||
|
@ -46,7 +45,6 @@
|
||||||
"sort-imports": "off", // imports are handled by simple-import-sort/sort
|
"sort-imports": "off", // imports are handled by simple-import-sort/sort
|
||||||
"simple-import-sort/imports": "warn",
|
"simple-import-sort/imports": "warn",
|
||||||
"simple-import-sort/exports": "warn",
|
"simple-import-sort/exports": "warn",
|
||||||
"react-refresh/only-export-components": "warn",
|
|
||||||
"react-hooks/rules-of-hooks": "error",
|
"react-hooks/rules-of-hooks": "error",
|
||||||
"formatjs/enforce-id": [
|
"formatjs/enforce-id": [
|
||||||
"error",
|
"error",
|
||||||
|
@ -67,10 +65,16 @@
|
||||||
"allow": ["warn", "error"]
|
"allow": ["warn", "error"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// These rules should be reviewed - tracked in
|
// Decided to turn off:
|
||||||
// Tracked in https://github.com/saleor/saleor-dashboard/issues/3813
|
"react/prop-types": "off",
|
||||||
|
"@typescript-eslint/prefer-nullish-coalescing": "off",
|
||||||
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
|
"@typescript-eslint/no-floating-promises": "off",
|
||||||
|
"@typescript-eslint/no-misused-promises": "off",
|
||||||
"@typescript-eslint/consistent-type-imports": "off",
|
"@typescript-eslint/consistent-type-imports": "off",
|
||||||
"@typescript-eslint/no-confusing-void-expression": "off",
|
"@typescript-eslint/no-confusing-void-expression": "off",
|
||||||
|
// Migration in progress:
|
||||||
|
// Tracked in https://github.com/saleor/saleor-dashboard/issues/3813
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
"@typescript-eslint/no-unnecessary-type-assertion": "off",
|
||||||
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
"@typescript-eslint/prefer-reduce-type-parameter": "off",
|
||||||
"@typescript-eslint/promise-function-async": "off",
|
"@typescript-eslint/promise-function-async": "off",
|
||||||
|
@ -79,39 +83,35 @@
|
||||||
"@typescript-eslint/strict-boolean-expressions": "off",
|
"@typescript-eslint/strict-boolean-expressions": "off",
|
||||||
"multiline-ternary": "off",
|
"multiline-ternary": "off",
|
||||||
"no-extra-boolean-cast": "off",
|
"no-extra-boolean-cast": "off",
|
||||||
"@typescript-eslint/await-thenable": "warn",
|
"@typescript-eslint/await-thenable": "off",
|
||||||
"@typescript-eslint/ban-ts-comment": "warn",
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
"@typescript-eslint/ban-types": "warn",
|
"@typescript-eslint/ban-types": "off",
|
||||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
"@typescript-eslint/consistent-type-assertions": "off",
|
||||||
"@typescript-eslint/explicit-function-return-type": "off",
|
"@typescript-eslint/naming-convention": "off",
|
||||||
"@typescript-eslint/naming-convention": "warn",
|
"@typescript-eslint/no-base-to-string": "off",
|
||||||
"@typescript-eslint/no-base-to-string": "warn",
|
"@typescript-eslint/no-dynamic-delete": "off",
|
||||||
"@typescript-eslint/no-dynamic-delete": "warn",
|
"@typescript-eslint/no-invalid-void-type": "off",
|
||||||
"@typescript-eslint/no-floating-promises": "warn",
|
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
|
||||||
"@typescript-eslint/no-invalid-void-type": "warn",
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
"@typescript-eslint/no-misused-promises": "warn",
|
"@typescript-eslint/no-redeclare": "off",
|
||||||
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
|
"@typescript-eslint/prefer-optional-chain": "off",
|
||||||
"@typescript-eslint/no-non-null-assertion": "warn",
|
"@typescript-eslint/restrict-plus-operands": "off",
|
||||||
"@typescript-eslint/no-redeclare": "warn",
|
"@typescript-eslint/restrict-template-expressions": "off",
|
||||||
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
"react-refresh/only-export-components": "off",
|
||||||
"@typescript-eslint/prefer-optional-chain": "warn",
|
"array-callback-return": "off",
|
||||||
"@typescript-eslint/restrict-plus-operands": "warn",
|
"import/export": "off",
|
||||||
"@typescript-eslint/restrict-template-expressions": "warn",
|
"n/no-callback-literal": "off",
|
||||||
"array-callback-return": "warn",
|
"no-case-declarations": "off",
|
||||||
"import/export": "warn",
|
"no-empty-pattern": "off",
|
||||||
"n/no-callback-literal": "warn",
|
"no-fallthrough": "off",
|
||||||
"no-case-declarations": "warn",
|
"no-new": "off",
|
||||||
"no-empty-pattern": "warn",
|
"no-prototype-builtins": "off",
|
||||||
"no-fallthrough": "warn",
|
"no-unreachable": "off",
|
||||||
"no-new": "warn",
|
"no-useless-catch": "off",
|
||||||
"no-prototype-builtins": "warn",
|
"no-useless-escape": "off",
|
||||||
"no-unreachable": "warn",
|
"prefer-promise-reject-errors": "off",
|
||||||
"no-useless-catch": "warn",
|
"react/display-name": "off",
|
||||||
"no-useless-escape": "warn",
|
"react/jsx-key": "off",
|
||||||
"prefer-promise-reject-errors": "warn",
|
|
||||||
"react/display-name": "warn",
|
|
||||||
"react/jsx-key": "warn",
|
|
||||||
"react/prop-types": "warn",
|
|
||||||
"symbol-description": "warn"
|
"symbol-description": "warn"
|
||||||
},
|
},
|
||||||
"ignorePatterns": ["node_modules/", "**/types/**/*", "type-policies.ts"]
|
"ignorePatterns": ["node_modules/", "**/types/**/*", "type-policies.ts"]
|
||||||
|
|
Loading…
Reference in a new issue