Skip to content

Commit ae46b43

Browse files
committed
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
1 parent 90c5f1a commit ae46b43

File tree

4 files changed

+127
-133
lines changed

4 files changed

+127
-133
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: 5 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.36.0",
6061
"@faker-js/faker": "6.1.2",
6162
"@percy/cli": "^1.27.4",
6263
"@percy/cypress": "3.1.6",
@@ -91,7 +92,7 @@
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",
95+
"@typescript-eslint/parser": "^8.45.0",
9596
"@vitejs/plugin-react": "^5.0.1",
9697
"babel-loader": "^10.0.0",
9798
"bcryptjs": "2.4.3",
@@ -101,8 +102,8 @@
101102
"cross-env": "7.0.3",
102103
"cypress": "15.0.0",
103104
"dotenv": "16.0.0",
104-
"eslint": "^9.30.1",
105-
"eslint-plugin-cypress": "^5.1.0",
105+
"eslint": "^9.36.0",
106+
"eslint-plugin-cypress": "^5.2.0",
106107
"express": "4.20.0",
107108
"express-jwt": "6.1.2",
108109
"express-paginate": "1.0.2",
@@ -132,7 +133,7 @@
132133
"start-server-and-test": "1.14.0",
133134
"ts-node": "10.9.2",
134135
"typescript": "5.8.3",
135-
"typescript-eslint": "^8.35.1",
136+
"typescript-eslint": "^8.45.0",
136137
"vite": "^7.1.3",
137138
"vite-plugin-eslint": "^1.8.1",
138139
"vite-plugin-istanbul": "^4.1.0",

0 commit comments

Comments
 (0)