ESLint: Disable autofix for "no-unnecessary-condition"

This disables autofix specifically for the "no-unnecessary-condition" rule. This allows us to continue using autofix without applying the breaking changes.
This commit is contained in:
regexowl 2025-01-20 17:12:58 +01:00 committed by Klara Simickova
parent d41c079567
commit 692ba3de0d
3 changed files with 29 additions and 1 deletions

View file

@ -17,6 +17,7 @@ parserOptions:
project: ["tsconfig.json"]
plugins:
- import
- disable-autofix
rules:
import/order:
- error
@ -51,7 +52,7 @@ rules:
ts-check: true
minimumDescriptionLength: 5
"@typescript-eslint/ban-types": off
"@typescript-eslint/no-unnecessary-condition": warn
disable-autofix/@typescript-eslint/no-unnecessary-condition: warn
# Temporarily disabled
jsx-a11y/no-autofocus: off
rulesdir/forbid-pf-relative-imports: off

26
package-lock.json generated
View file

@ -59,6 +59,7 @@
"copy-webpack-plugin": "12.0.2",
"css-loader": "7.1.2",
"eslint": "8.57.1",
"eslint-plugin-disable-autofix": "5.0.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest-dom": "5.5.0",
"eslint-plugin-jsx-a11y": "6.10.2",
@ -6775,6 +6776,16 @@
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/app-root-path": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.1.0.tgz",
"integrity": "sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/arg": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz",
@ -9889,6 +9900,21 @@
"ms": "^2.1.1"
}
},
"node_modules/eslint-plugin-disable-autofix": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-disable-autofix/-/eslint-plugin-disable-autofix-5.0.1.tgz",
"integrity": "sha512-uT2xNjHgnZezw9GlLkoxUyGwHL9NObrhR+rcRI0XzJkCUQDVLh+fV+wFD4th8O8LQp+CWH+k6gMXgJ1eMC9PCQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"app-root-path": "^3.1.0",
"eslint-rule-composer": "^0.3.0",
"lodash": "^4.17.21"
},
"peerDependencies": {
"eslint": ">= 7"
}
},
"node_modules/eslint-plugin-import": {
"version": "2.31.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz",

View file

@ -57,6 +57,7 @@
"copy-webpack-plugin": "12.0.2",
"css-loader": "7.1.2",
"eslint": "8.57.1",
"eslint-plugin-disable-autofix": "5.0.1",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest-dom": "5.5.0",
"eslint-plugin-jsx-a11y": "6.10.2",