Skip to content

Commit 9d1651f

Browse files
chore: update eslint incl. plugins + review rules (#4236)
This updates ESLint and its plugins. I also reviewed the rules and streamlined them a bit.
1 parent 5a7e27f commit 9d1651f

3 files changed

Lines changed: 80 additions & 73 deletions

File tree

eslint.config.mjs

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import css from "@eslint/css";
33
import globals from "globals";
44
import {flatConfigs as importX} from "eslint-plugin-import-x";
55
import js from "@eslint/js";
6-
import jsdocPlugin from "eslint-plugin-jsdoc";
6+
import {configs as jsdocConfigs} from "eslint-plugin-jsdoc";
77
import markdown from "@eslint/markdown";
88
import {configs as packageJsonConfigs} from "eslint-plugin-package-json";
99
import playwright from "eslint-plugin-playwright";
@@ -44,7 +44,7 @@ export default defineConfig([
4444
moment: "readonly"
4545
}
4646
},
47-
extends: [importX.recommended, js.configs.recommended, jsdocPlugin.configs["flat/recommended"], stylistic.configs.all],
47+
extends: [importX.recommended, js.configs.recommended, jsdocConfigs["flat/recommended"], stylistic.configs.all],
4848
rules: {
4949
"@stylistic/array-element-newline": ["error", "consistent"],
5050
"@stylistic/arrow-parens": ["error", "always"],
@@ -71,31 +71,20 @@ export default defineConfig([
7171
"@stylistic/spaced-comment": "off",
7272
"dot-notation": "error",
7373
eqeqeq: ["error", "always", {null: "ignore"}],
74-
"id-length": "off",
7574
"import-x/extensions": "error",
7675
"import-x/newline-after-import": "error",
7776
"import-x/order": "error",
78-
"init-declarations": "off",
7977
"max-lines-per-function": ["warn", 400],
80-
"max-statements": "off",
8178
"no-global-assign": "off",
82-
"no-inline-comments": "off",
83-
"no-magic-numbers": "off",
8479
"no-param-reassign": "error",
85-
"no-plusplus": "off",
8680
"no-prototype-builtins": "off",
87-
"no-ternary": "off",
8881
"no-throw-literal": "error",
89-
"no-undefined": "off",
9082
"no-unneeded-ternary": "error",
9183
"no-useless-return": "error",
92-
"no-warning-comments": "off",
9384
"object-shorthand": ["error", "methods"],
94-
"one-var": "off",
9585
"prefer-const": "error",
9686
"prefer-template": "error",
97-
"require-await": "error",
98-
"sort-keys": "off"
87+
"require-await": "error"
9988
}
10089
},
10190
{
@@ -137,13 +126,8 @@ export default defineConfig([
137126
rules: {
138127
"@stylistic/array-element-newline": "off",
139128
"@stylistic/indent": ["error", "tab"],
140-
"@stylistic/object-property-newline": ["error", {allowAllPropertiesOnSameLine: true}],
141-
"@stylistic/padded-blocks": ["error", "never"],
142129
"@stylistic/quote-props": ["error", "as-needed"],
143-
"import-x/no-unresolved": ["error", {ignore: ["eslint/config"]}],
144-
"max-lines-per-function": ["error", 100],
145130
"no-magic-numbers": "off",
146-
"one-var": ["error", "never"],
147131
"sort-keys": "off"
148132
}
149133
},
@@ -182,16 +166,9 @@ export default defineConfig([
182166
rules: {
183167
"import-x/namespace": "off",
184168
"import-x/named": "off",
185-
"import-x/default": "off",
186169
"import-x/extensions": "off"
187170
}
188171
},
189-
{
190-
files: ["tests/configs/modules/weather/*.js"],
191-
rules: {
192-
"@stylistic/quotes": "off"
193-
}
194-
},
195172
{
196173
files: ["tests/e2e/**/*.js"],
197174
extends: [playwright.configs["flat/recommended"]],

package-lock.json

Lines changed: 73 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"@fortawesome/fontawesome-free": "^7.3.1",
8787
"animate.css": "^4.1.1",
8888
"croner": "^10.0.1",
89-
"eslint": "^10.8.0",
89+
"eslint": "^10.9.1",
9090
"express": "^5.2.1",
9191
"feedme": "^2.0.2",
9292
"globals": "^17.8.0",
@@ -111,12 +111,12 @@
111111
"@eslint/markdown": "^8.0.3",
112112
"@stylistic/eslint-plugin": "^5.10.0",
113113
"@vitest/coverage-v8": "^4.1.10",
114-
"@vitest/eslint-plugin": "^1.6.24",
114+
"@vitest/eslint-plugin": "^1.6.27",
115115
"@vitest/ui": "^4.1.10",
116116
"cspell": "^10.0.1",
117117
"eslint-plugin-import-x": "^4.17.1",
118-
"eslint-plugin-jsdoc": "^63.3.2",
119-
"eslint-plugin-package-json": "^1.6.2",
118+
"eslint-plugin-jsdoc": "^64.2.1",
119+
"eslint-plugin-package-json": "^1.7.1",
120120
"eslint-plugin-playwright": "^2.11.0",
121121
"express-basic-auth": "^1.2.1",
122122
"husky": "^9.1.7",

0 commit comments

Comments
 (0)