Skip to content

Commit 9b5327d

Browse files
authored
chore(deps): migrate to ESLint extends config structure (#994)
update @eslint/js to 9.36.0 eslint to 9.36.0 @stylistic/eslint-plugin to 5.4.0 replace eslint-plugin-jsonc with @eslint/json 0.13.2
1 parent 302e026 commit 9b5327d

File tree

3 files changed

+73
-191
lines changed

3 files changed

+73
-191
lines changed

eslint.config.mjs

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1+
import { defineConfig, globalIgnores } from 'eslint/config'
12
import globals from 'globals'
2-
import pluginJs from '@eslint/js'
3-
import eslintPluginJsonc from 'eslint-plugin-jsonc'
4-
import stylistic from '@stylistic/eslint-plugin'
5-
import mochaPlugin from 'eslint-plugin-mocha'
3+
import js from '@eslint/js'
4+
import pluginMocha from 'eslint-plugin-mocha'
65
import pluginCypress from 'eslint-plugin-cypress'
6+
import stylistic from '@stylistic/eslint-plugin'
7+
import json from '@eslint/json'
78

8-
export default [
9-
pluginJs.configs.recommended,
10-
...eslintPluginJsonc.configs['flat/recommended-with-json'],
11-
mochaPlugin.configs.recommended,
12-
pluginCypress.configs.recommended,
13-
stylistic.configs.recommended,
14-
{
15-
ignores: ['app/assets/js/{vendor,todo}/'],
16-
},
9+
export default defineConfig([
10+
globalIgnores(['app/assets/js/{vendor,todo}/']),
1711
{
12+
files: ['**/*.{,m}js'],
13+
extends: [
14+
js.configs.recommended,
15+
pluginMocha.configs.recommended,
16+
pluginCypress.configs.recommended,
17+
stylistic.configs.recommended,
18+
],
1819
rules: {
1920
'@stylistic/arrow-parens': ['error', 'always'],
2021
'@stylistic/comma-dangle': ['error', 'always-multiline'],
@@ -27,9 +28,14 @@ export default [
2728
'mocha/no-mocha-arrows': 'off',
2829
},
2930
languageOptions: {
30-
globals: {
31-
...globals.node,
32-
},
31+
globals: globals.node,
3332
},
3433
},
35-
]
34+
{
35+
files: ['**/*.json'],
36+
ignores: ['package-lock.json'],
37+
plugins: { json },
38+
language: 'json/json',
39+
extends: ['json/recommended'],
40+
},
41+
])

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test": "npm start & cypress run",
1515
"pretest": "npm run lint",
1616
"print-env": "print-env",
17-
"lint": "eslint --fix cypress app/assets/js/scripts.js",
17+
"lint": "eslint --fix",
1818
"lint:yaml": "yamllint '*.yml' '.buildkite/*.yml' '.circleci/*.yml' '.github/workflows/*.yml' '.semaphore/*.yml' 'basic/**/*.yml' ",
1919
"e2e": "cypress run",
2020
"e2e:chrome": "cypress run --browser chrome",
@@ -64,12 +64,12 @@
6464
},
6565
"devDependencies": {
6666
"@bahmutov/print-env": "1.3.0",
67-
"@eslint/js": "9.35.0",
68-
"@stylistic/eslint-plugin": "5.3.1",
67+
"@eslint/js": "9.36.0",
68+
"@eslint/json": "0.13.2",
69+
"@stylistic/eslint-plugin": "5.4.0",
6970
"cypress": "15.0.0",
70-
"eslint": "9.35.0",
71+
"eslint": "9.36.0",
7172
"eslint-plugin-cypress": "5.1.1",
72-
"eslint-plugin-jsonc": "2.20.1",
7373
"eslint-plugin-mocha": "11.1.0",
7474
"globals": "16.4.0",
7575
"globby": "11.1.0",

0 commit comments

Comments
 (0)