Skip to content

Commit ef8a933

Browse files
authored
chore(deps): migrate to ESLint extends config structure (#1663)
* chore(deps): migrate to ESLint extends config structure update ESLint configuration to use 'extends' for better maintainability update dependencies in package.json and yarn.lock * chore(deps): update eslint & @eslint/js to 9.37.0 * chore(deps): update typescript-eslint to 8.46.0 * refresh eslint-family dependencies
1 parent f3503ce commit ef8a933

File tree

4 files changed

+137
-143
lines changed

4 files changed

+137
-143
lines changed

backend/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
21
import { User as IUser } from "../src/models/user";
32

43
declare global {

eslint.config.mjs

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
11
import globals from 'globals'
2-
import { defineConfig } from 'eslint/config'
3-
import pluginJs from '@eslint/js'
4-
import pluginTs from 'typescript-eslint'
5-
import pluginTsParser from '@typescript-eslint/parser'
2+
import { defineConfig, globalIgnores } from 'eslint/config'
3+
import js from '@eslint/js'
4+
import tseslint from 'typescript-eslint'
65
import pluginCypress from 'eslint-plugin-cypress'
76

87
export default defineConfig([
9-
{
10-
ignores: ['build/'],
11-
},
8+
globalIgnores(['build/']),
129
{
1310
files: ['**/*.ts'],
14-
languageOptions: {
15-
parser: pluginTsParser,
16-
},
17-
},
18-
pluginJs.configs.recommended,
19-
pluginTs.configs.recommended,
20-
pluginCypress.configs.recommended,
21-
{
11+
extends: [
12+
js.configs.recommended,
13+
tseslint.configs.recommended,
14+
pluginCypress.configs.recommended,
15+
],
2216
rules: {
23-
// TO-DO review violations of disabled rules
17+
// TODO: review violations of disabled rules
2418
'no-empty': 'off',
2519
'no-prototype-builtins': 'off',
2620
'no-undef': 'off',
@@ -38,9 +32,7 @@ export default defineConfig([
3832
'@typescript-eslint/triple-slash-reference': 'off',
3933
},
4034
languageOptions: {
41-
globals: {
42-
...globals.node,
43-
},
44-
}
45-
}
35+
globals: globals.node,
36+
},
37+
},
4638
])

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"@babel/preset-env": "^7.28.0",
5858
"@cypress/code-coverage": "^3.14.5",
5959
"@cypress/instrument-cra": "1.4.0",
60+
"@eslint/js": "^9.38.0",
6061
"@faker-js/faker": "6.1.2",
6162
"@percy/cli": "^1.27.4",
6263
"@percy/cypress": "3.1.6",
@@ -91,7 +92,6 @@
9192
"@types/validator": "13.7.2",
9293
"@types/webpack-env": "1.16.4",
9394
"@types/yup": "0.29.13",
94-
"@typescript-eslint/parser": "^8.35.1",
9595
"@vitejs/plugin-react": "^5.0.1",
9696
"babel-loader": "^10.0.0",
9797
"bcryptjs": "2.4.3",
@@ -101,8 +101,8 @@
101101
"cross-env": "7.0.3",
102102
"cypress": "15.0.0",
103103
"dotenv": "16.0.0",
104-
"eslint": "^9.30.1",
105-
"eslint-plugin-cypress": "^5.1.0",
104+
"eslint": "^9.38.0",
105+
"eslint-plugin-cypress": "^5.2.0",
106106
"express": "4.20.0",
107107
"express-jwt": "6.1.2",
108108
"express-paginate": "1.0.2",
@@ -132,7 +132,7 @@
132132
"start-server-and-test": "1.14.0",
133133
"ts-node": "10.9.2",
134134
"typescript": "5.8.3",
135-
"typescript-eslint": "^8.35.1",
135+
"typescript-eslint": "^8.46.2",
136136
"vite": "^7.1.3",
137137
"vite-plugin-eslint": "^1.8.1",
138138
"vite-plugin-istanbul": "^4.1.0",

0 commit comments

Comments
 (0)