Skip to content

Commit cedeb38

Browse files
committed
Refactor ESLint configuration: replace .eslintrc.json with eslint.config.js and update lint script in package.json
1 parent ec23919 commit cedeb38

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ coverage
1111
.vscode
1212
README.md
1313
docker-compose.yml
14-
.eslintrc.json
14+
eslint.config.js

.eslintrc.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

eslint.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
4+
export default tseslint.config(
5+
js.configs.recommended,
6+
...tseslint.configs.recommended,
7+
{
8+
files: ['src/**/*.ts'],
9+
languageOptions: {
10+
ecmaVersion: 2022,
11+
sourceType: 'module',
12+
},
13+
rules: {
14+
'@typescript-eslint/no-explicit-any': 'warn',
15+
'@typescript-eslint/explicit-function-return-type': 'off',
16+
'@typescript-eslint/explicit-module-boundary-types': 'off',
17+
},
18+
},
19+
{
20+
ignores: ['dist/**', 'node_modules/**', '*.js', '*.config.js'],
21+
}
22+
);

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"build": "tsc",
88
"dev": "tsx watch src/index.ts",
99
"start": "node dist/index.js",
10-
"lint": "eslint src --ext .ts",
10+
"lint": "eslint src",
1111
"test": "jest"
1212
},
1313
"keywords": [
@@ -37,9 +37,11 @@
3737
"@jest/globals": "^29.7.0",
3838
"@types/jest": "^29.5.14",
3939
"@types/node": "^22.10.2",
40+
"@eslint/js": "^9.17.0",
4041
"@typescript-eslint/eslint-plugin": "^8.18.1",
4142
"@typescript-eslint/parser": "^8.18.1",
4243
"eslint": "^9.17.0",
44+
"typescript-eslint": "^8.18.1",
4345
"jest": "^29.7.0",
4446
"ts-jest": "^29.2.5",
4547
"tsx": "^4.19.2",

0 commit comments

Comments
 (0)