Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 22 additions & 25 deletions .eslint_todo.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// This configuration was generated by `exe/eslint_autogen`
// on 2026-02-15 05:36:35 UTC.
// on 2026-03-11 18:22:32 UTC.
// The point is for the user to remove these configuration records
// one by one as the offenses are removed from the code base.

import type {Linter} from "eslint";

const config: Linter.Config[] = [
// Offense count: 7
// Offense count: 6
{
files: [
"app/javascript/application.ts",
Expand All @@ -15,7 +15,7 @@ const config: Linter.Config[] = [
"@stylistic/comma-dangle": "off",
},
},
// Offense count: 5
// Offense count: 3
{
files: [
"app/javascript/application.ts",
Expand All @@ -33,7 +33,7 @@ const config: Linter.Config[] = [
"@stylistic/keyword-spacing": "off",
},
},
// Offense count: 15
// Offense count: 19
{
files: [
"app/javascript/application.ts",
Expand All @@ -46,7 +46,7 @@ const config: Linter.Config[] = [
"@stylistic/max-len": "off",
},
},
// Offense count: 1
// Offense count: 2
{
files: [
"spec/javascript/setup.ts",
Expand All @@ -55,7 +55,7 @@ const config: Linter.Config[] = [
"@stylistic/multiline-comment-style": "off",
},
},
// Offense count: 8
// Offense count: 4
{
files: [
"app/javascript/application.ts",
Expand All @@ -75,7 +75,7 @@ const config: Linter.Config[] = [
"@stylistic/no-extra-parens": "off",
},
},
// Offense count: 30
// Offense count: 26
{
files: [
"app/javascript/application.ts",
Expand Down Expand Up @@ -125,7 +125,7 @@ const config: Linter.Config[] = [
"@stylistic/space-before-blocks": "off",
},
},
// Offense count: 50
// Offense count: 43
{
files: [
"app/javascript/application.ts",
Expand Down Expand Up @@ -195,12 +195,11 @@ const config: Linter.Config[] = [
"@typescript-eslint/no-unsafe-argument": "off",
},
},
// Offense count: 49
// Offense count: 51
{
files: [
"app/javascript/application.ts",
"app/javascript/support/jquery-global.ts",
"eslint.config.mts",
"spec/javascript/setup.ts",
"spec/javascript/spec/models/story_spec.ts",
"spec/javascript/spec/views/story_view_spec.ts",
Expand All @@ -209,7 +208,7 @@ const config: Linter.Config[] = [
"@typescript-eslint/no-unsafe-assignment": "off",
},
},
// Offense count: 181
// Offense count: 171
{
files: [
"app/javascript/application.ts",
Expand All @@ -221,7 +220,7 @@ const config: Linter.Config[] = [
"@typescript-eslint/no-unsafe-call": "off",
},
},
// Offense count: 266
// Offense count: 262
{
files: [
"app/javascript/application.ts",
Expand All @@ -241,7 +240,7 @@ const config: Linter.Config[] = [
"@typescript-eslint/no-unsafe-return": "off",
},
},
// Offense count: 1
// Offense count: 2
{
files: [
"app/javascript/application.ts",
Expand All @@ -268,7 +267,7 @@ const config: Linter.Config[] = [
"@typescript-eslint/prefer-optional-chain": "off",
},
},
// Offense count: 24
// Offense count: 20
{
files: [
"app/javascript/application.ts",
Expand All @@ -278,7 +277,7 @@ const config: Linter.Config[] = [
"@typescript-eslint/strict-boolean-expressions": "off",
},
},
// Offense count: 9
// Offense count: 13
{
files: [
"app/javascript/application.ts",
Expand All @@ -298,7 +297,7 @@ const config: Linter.Config[] = [
"capitalized-comments": "off",
},
},
// Offense count: 13
// Offense count: 11
{
files: [
"app/javascript/application.ts",
Expand All @@ -316,7 +315,7 @@ const config: Linter.Config[] = [
"eqeqeq": "off",
},
},
// Offense count: 111
// Offense count: 107
{
files: [
"app/javascript/application.ts",
Expand Down Expand Up @@ -358,7 +357,7 @@ const config: Linter.Config[] = [
"import/no-unresolved": "off",
},
},
// Offense count: 12
// Offense count: 16
{
files: [
"app/javascript/application.ts",
Expand Down Expand Up @@ -454,7 +453,7 @@ const config: Linter.Config[] = [
"no-plusplus": "off",
},
},
// Offense count: 4
// Offense count: 2
{
files: [
"app/javascript/application.ts",
Expand All @@ -464,7 +463,7 @@ const config: Linter.Config[] = [
"no-ternary": "off",
},
},
// Offense count: 47
// Offense count: 40
{
files: [
"app/javascript/application.ts",
Expand All @@ -482,7 +481,7 @@ const config: Linter.Config[] = [
"one-var": "off",
},
},
// Offense count: 59
// Offense count: 62
{
files: [
"app/javascript/application.ts",
Expand Down Expand Up @@ -522,12 +521,10 @@ const config: Linter.Config[] = [
"require-unicode-regexp": "off",
},
},
// Offense count: 3
// Offense count: 1
{
files: [
"spec/javascript/setup.ts",
"spec/javascript/spec/models/story_spec.ts",
"spec/javascript/spec/views/story_view_spec.ts",
],
rules: {
"sort-imports": "off",
Expand Down Expand Up @@ -557,7 +554,7 @@ const config: Linter.Config[] = [
"sort-keys-fix/sort-keys-fix": "off",
},
},
// Offense count: 8
// Offense count: 11
{
files: [
"app/javascript/application.ts",
Expand Down
10 changes: 9 additions & 1 deletion eslint.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import globals from "globals";
import importPlugin from "eslint-plugin-import";
import vitest from "eslint-plugin-vitest";
import vitest from "@vitest/eslint-plugin";
import js from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
import tseslint from "typescript-eslint";
Expand Down Expand Up @@ -74,9 +74,17 @@ export default defineConfig([
["error", "asc", {caseSensitive: false, natural: true}],
"vitest/consistent-test-it":
["error", {fn: "it", withinDescribe: "it"}],
"vitest/expect-expect": "off",
"vitest/no-alias-methods": "off",
"vitest/padding-around-all": "off",
"vitest/padding-around-expect-groups": "off",
"vitest/prefer-called-times": "off",
"vitest/prefer-describe-function-title": "off",
"vitest/prefer-expect-assertions": "off",
"vitest/prefer-importing-vitest-globals": "off",
"vitest/prefer-to-be-falsy": "off",
"vitest/prefer-to-be-truthy": "off",
"vitest/require-mock-type-parameters": "off",
"vitest/require-top-level-describe": "off",
},
settings: {
Expand Down
17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
"@stylistic/eslint-plugin": "^5.7.0",
"@types/backbone": "latest",
"@types/hotwired__turbo": "^8.0.5",
"@types/jquery": "latest",
"@types/jquery": "3.5.34",
"@types/mousetrap": "latest",
"@types/node": "^25.2.3",
"@types/rails__actioncable": "^8.0.3",
"@types/underscore": "latest",
"@typescript-eslint/eslint-plugin": "^8.50.0",
"@typescript-eslint/parser": "^8.50.0",
"@typescript-eslint/eslint-plugin": "^8.57.0",
"@typescript-eslint/parser": "^8.57.0",
"@vitest/coverage-v8": "4.0.18",
"@vitest/eslint-plugin": "^1.6.10",
"esbuild": "^0.27.1",
"eslint": "^9.39.3",
"eslint": "^10.0.2",
"eslint-find-rules": "^5.0.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"eslint-plugin-vitest": "^0.5.4",
"globals": "^17.0.0",
"jiti": "^2.6.1",
"jsdom": "^28.0.0",
Expand All @@ -46,7 +46,7 @@
"stylelint-config-standard": "^40.0.0",
"stylelint-selector-bem-pattern": "^4.0.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.54.0",
"typescript-eslint": "^8.57.0",
"vitest": "^4.0.18"
},
"scripts": {
Expand All @@ -58,5 +58,10 @@
"stylelint": "./node_modules/stylelint/bin/stylelint.mjs 'app/assets/stylesheets/**/*'",
"test": "pnpm vitest run --coverage",
"tscheck": "tsc --noEmit"
},
"pnpm": {
"patchedDependencies": {
"eslint-plugin-sort-keys-fix@1.1.2": "patches/eslint-plugin-sort-keys-fix@1.1.2.patch"
}
}
}
13 changes: 13 additions & 0 deletions patches/eslint-plugin-sort-keys-fix@1.1.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/lib/rules/sort-keys-fix.js b/lib/rules/sort-keys-fix.js
index 7847edfe3ebee820ed6f5b8be75dc1e04d92b854..2df98df99ba02656a0c41c737e2d14c9c38088e3 100644
--- a/lib/rules/sort-keys-fix.js
+++ b/lib/rules/sort-keys-fix.js
@@ -175,7 +175,7 @@ module.exports = {
},
fix(fixer) {
const fixes = []
- const sourceCode = context.getSourceCode()
+ const sourceCode = context.sourceCode ?? context.getSourceCode()
const moveProperty = (fromNode, toNode) => {
const prevText = sourceCode.getText(fromNode)
const thisComments = sourceCode.getCommentsBefore(fromNode)
Loading
Loading