Skip to content

Commit 12356f7

Browse files
authored
Update eslint to version 10.0.2 (#1434)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
1 parent ad37513 commit 12356f7

5 files changed

Lines changed: 349 additions & 305 deletions

File tree

.eslint_todo.ts

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// This configuration was generated by `exe/eslint_autogen`
2-
// on 2026-02-15 05:36:35 UTC.
2+
// on 2026-03-11 18:22:32 UTC.
33
// The point is for the user to remove these configuration records
44
// one by one as the offenses are removed from the code base.
55

66
import type {Linter} from "eslint";
77

88
const config: Linter.Config[] = [
9-
// Offense count: 7
9+
// Offense count: 6
1010
{
1111
files: [
1212
"app/javascript/application.ts",
@@ -15,7 +15,7 @@ const config: Linter.Config[] = [
1515
"@stylistic/comma-dangle": "off",
1616
},
1717
},
18-
// Offense count: 5
18+
// Offense count: 3
1919
{
2020
files: [
2121
"app/javascript/application.ts",
@@ -33,7 +33,7 @@ const config: Linter.Config[] = [
3333
"@stylistic/keyword-spacing": "off",
3434
},
3535
},
36-
// Offense count: 15
36+
// Offense count: 19
3737
{
3838
files: [
3939
"app/javascript/application.ts",
@@ -46,7 +46,7 @@ const config: Linter.Config[] = [
4646
"@stylistic/max-len": "off",
4747
},
4848
},
49-
// Offense count: 1
49+
// Offense count: 2
5050
{
5151
files: [
5252
"spec/javascript/setup.ts",
@@ -55,7 +55,7 @@ const config: Linter.Config[] = [
5555
"@stylistic/multiline-comment-style": "off",
5656
},
5757
},
58-
// Offense count: 8
58+
// Offense count: 4
5959
{
6060
files: [
6161
"app/javascript/application.ts",
@@ -75,7 +75,7 @@ const config: Linter.Config[] = [
7575
"@stylistic/no-extra-parens": "off",
7676
},
7777
},
78-
// Offense count: 30
78+
// Offense count: 26
7979
{
8080
files: [
8181
"app/javascript/application.ts",
@@ -125,7 +125,7 @@ const config: Linter.Config[] = [
125125
"@stylistic/space-before-blocks": "off",
126126
},
127127
},
128-
// Offense count: 50
128+
// Offense count: 43
129129
{
130130
files: [
131131
"app/javascript/application.ts",
@@ -195,12 +195,11 @@ const config: Linter.Config[] = [
195195
"@typescript-eslint/no-unsafe-argument": "off",
196196
},
197197
},
198-
// Offense count: 49
198+
// Offense count: 51
199199
{
200200
files: [
201201
"app/javascript/application.ts",
202202
"app/javascript/support/jquery-global.ts",
203-
"eslint.config.mts",
204203
"spec/javascript/setup.ts",
205204
"spec/javascript/spec/models/story_spec.ts",
206205
"spec/javascript/spec/views/story_view_spec.ts",
@@ -209,7 +208,7 @@ const config: Linter.Config[] = [
209208
"@typescript-eslint/no-unsafe-assignment": "off",
210209
},
211210
},
212-
// Offense count: 181
211+
// Offense count: 171
213212
{
214213
files: [
215214
"app/javascript/application.ts",
@@ -221,7 +220,7 @@ const config: Linter.Config[] = [
221220
"@typescript-eslint/no-unsafe-call": "off",
222221
},
223222
},
224-
// Offense count: 266
223+
// Offense count: 262
225224
{
226225
files: [
227226
"app/javascript/application.ts",
@@ -241,7 +240,7 @@ const config: Linter.Config[] = [
241240
"@typescript-eslint/no-unsafe-return": "off",
242241
},
243242
},
244-
// Offense count: 1
243+
// Offense count: 2
245244
{
246245
files: [
247246
"app/javascript/application.ts",
@@ -268,7 +267,7 @@ const config: Linter.Config[] = [
268267
"@typescript-eslint/prefer-optional-chain": "off",
269268
},
270269
},
271-
// Offense count: 24
270+
// Offense count: 20
272271
{
273272
files: [
274273
"app/javascript/application.ts",
@@ -278,7 +277,7 @@ const config: Linter.Config[] = [
278277
"@typescript-eslint/strict-boolean-expressions": "off",
279278
},
280279
},
281-
// Offense count: 9
280+
// Offense count: 13
282281
{
283282
files: [
284283
"app/javascript/application.ts",
@@ -298,7 +297,7 @@ const config: Linter.Config[] = [
298297
"capitalized-comments": "off",
299298
},
300299
},
301-
// Offense count: 13
300+
// Offense count: 11
302301
{
303302
files: [
304303
"app/javascript/application.ts",
@@ -316,7 +315,7 @@ const config: Linter.Config[] = [
316315
"eqeqeq": "off",
317316
},
318317
},
319-
// Offense count: 111
318+
// Offense count: 107
320319
{
321320
files: [
322321
"app/javascript/application.ts",
@@ -358,7 +357,7 @@ const config: Linter.Config[] = [
358357
"import/no-unresolved": "off",
359358
},
360359
},
361-
// Offense count: 12
360+
// Offense count: 16
362361
{
363362
files: [
364363
"app/javascript/application.ts",
@@ -454,7 +453,7 @@ const config: Linter.Config[] = [
454453
"no-plusplus": "off",
455454
},
456455
},
457-
// Offense count: 4
456+
// Offense count: 2
458457
{
459458
files: [
460459
"app/javascript/application.ts",
@@ -464,7 +463,7 @@ const config: Linter.Config[] = [
464463
"no-ternary": "off",
465464
},
466465
},
467-
// Offense count: 47
466+
// Offense count: 40
468467
{
469468
files: [
470469
"app/javascript/application.ts",
@@ -482,7 +481,7 @@ const config: Linter.Config[] = [
482481
"one-var": "off",
483482
},
484483
},
485-
// Offense count: 59
484+
// Offense count: 62
486485
{
487486
files: [
488487
"app/javascript/application.ts",
@@ -522,12 +521,10 @@ const config: Linter.Config[] = [
522521
"require-unicode-regexp": "off",
523522
},
524523
},
525-
// Offense count: 3
524+
// Offense count: 1
526525
{
527526
files: [
528527
"spec/javascript/setup.ts",
529-
"spec/javascript/spec/models/story_spec.ts",
530-
"spec/javascript/spec/views/story_view_spec.ts",
531528
],
532529
rules: {
533530
"sort-imports": "off",
@@ -557,7 +554,7 @@ const config: Linter.Config[] = [
557554
"sort-keys-fix/sort-keys-fix": "off",
558555
},
559556
},
560-
// Offense count: 8
557+
// Offense count: 11
561558
{
562559
files: [
563560
"app/javascript/application.ts",

eslint.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import globals from "globals";
22
import importPlugin from "eslint-plugin-import";
3-
import vitest from "eslint-plugin-vitest";
3+
import vitest from "@vitest/eslint-plugin";
44
import js from "@eslint/js";
55
import stylistic from "@stylistic/eslint-plugin";
66
import tseslint from "typescript-eslint";
@@ -74,9 +74,17 @@ export default defineConfig([
7474
["error", "asc", {caseSensitive: false, natural: true}],
7575
"vitest/consistent-test-it":
7676
["error", {fn: "it", withinDescribe: "it"}],
77+
"vitest/expect-expect": "off",
78+
"vitest/no-alias-methods": "off",
79+
"vitest/padding-around-all": "off",
80+
"vitest/padding-around-expect-groups": "off",
81+
"vitest/prefer-called-times": "off",
82+
"vitest/prefer-describe-function-title": "off",
7783
"vitest/prefer-expect-assertions": "off",
84+
"vitest/prefer-importing-vitest-globals": "off",
7885
"vitest/prefer-to-be-falsy": "off",
7986
"vitest/prefer-to-be-truthy": "off",
87+
"vitest/require-mock-type-parameters": "off",
8088
"vitest/require-top-level-describe": "off",
8189
},
8290
settings: {

package.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@
2323
"@stylistic/eslint-plugin": "^5.7.0",
2424
"@types/backbone": "latest",
2525
"@types/hotwired__turbo": "^8.0.5",
26-
"@types/jquery": "latest",
26+
"@types/jquery": "3.5.34",
2727
"@types/mousetrap": "latest",
2828
"@types/node": "^25.2.3",
2929
"@types/rails__actioncable": "^8.0.3",
3030
"@types/underscore": "latest",
31-
"@typescript-eslint/eslint-plugin": "^8.50.0",
32-
"@typescript-eslint/parser": "^8.50.0",
31+
"@typescript-eslint/eslint-plugin": "^8.57.0",
32+
"@typescript-eslint/parser": "^8.57.0",
3333
"@vitest/coverage-v8": "4.0.18",
34+
"@vitest/eslint-plugin": "^1.6.10",
3435
"esbuild": "^0.27.1",
35-
"eslint": "^9.39.3",
36+
"eslint": "^10.0.2",
3637
"eslint-find-rules": "^5.0.0",
3738
"eslint-import-resolver-typescript": "^4.4.4",
3839
"eslint-plugin-import": "^2.32.0",
3940
"eslint-plugin-sort-keys-fix": "^1.1.2",
40-
"eslint-plugin-vitest": "^0.5.4",
4141
"globals": "^17.0.0",
4242
"jiti": "^2.6.1",
4343
"jsdom": "^28.0.0",
@@ -46,7 +46,7 @@
4646
"stylelint-config-standard": "^40.0.0",
4747
"stylelint-selector-bem-pattern": "^4.0.1",
4848
"typescript": "^5.9.3",
49-
"typescript-eslint": "^8.54.0",
49+
"typescript-eslint": "^8.57.0",
5050
"vitest": "^4.0.18"
5151
},
5252
"scripts": {
@@ -58,5 +58,10 @@
5858
"stylelint": "./node_modules/stylelint/bin/stylelint.mjs 'app/assets/stylesheets/**/*'",
5959
"test": "pnpm vitest run --coverage",
6060
"tscheck": "tsc --noEmit"
61+
},
62+
"pnpm": {
63+
"patchedDependencies": {
64+
65+
}
6166
}
6267
}

patches/[email protected]

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/lib/rules/sort-keys-fix.js b/lib/rules/sort-keys-fix.js
2+
index 7847edfe3ebee820ed6f5b8be75dc1e04d92b854..2df98df99ba02656a0c41c737e2d14c9c38088e3 100644
3+
--- a/lib/rules/sort-keys-fix.js
4+
+++ b/lib/rules/sort-keys-fix.js
5+
@@ -175,7 +175,7 @@ module.exports = {
6+
},
7+
fix(fixer) {
8+
const fixes = []
9+
- const sourceCode = context.getSourceCode()
10+
+ const sourceCode = context.sourceCode ?? context.getSourceCode()
11+
const moveProperty = (fromNode, toNode) => {
12+
const prevText = sourceCode.getText(fromNode)
13+
const thisComments = sourceCode.getCommentsBefore(fromNode)

0 commit comments

Comments
 (0)