Skip to content

Commit 4c849ed

Browse files
lukasviceCopilot
andcommitted
update to eslint 9
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9f39452 commit 4c849ed

4 files changed

Lines changed: 30 additions & 48 deletions

File tree

.eslintignore

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

.eslintrc.json

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

eslint.config.mjs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import jest from '@aboutbits/eslint-config/configs/jest'
2+
import ts from '@aboutbits/eslint-config/configs/ts'
3+
import { defineConfig } from 'eslint/config'
4+
5+
export default defineConfig([
6+
ts,
7+
jest,
8+
{
9+
rules: {
10+
'import/namespace': 'off',
11+
'import/order': 'error',
12+
'@typescript-eslint/no-var-requires': 'off',
13+
'@typescript-eslint/no-explicit-any': 'off',
14+
'@typescript-eslint/explicit-function-return-type': 'off',
15+
},
16+
},
17+
{
18+
files: ['**/*.ts', '**/*.tsx'],
19+
rules: {
20+
'@typescript-eslint/explicit-function-return-type': 'error',
21+
},
22+
},
23+
{
24+
ignores: ['dist', 'node_modules'],
25+
},
26+
])

package.json

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"build": "tsc",
3636
"clear": "rm -rf src/*",
3737
"generate": "node generator.js",
38-
"lint": "eslint --cache --ext js,ts,tsx,json .",
39-
"lint:fix": "npm run lint -- --cache --fix",
38+
"lint": "eslint --cache",
39+
"lint:fix": "npm run lint -- --fix",
4040
"typecheck": "tsc --noEmit",
4141
"test": "jest --config jestconfig.json --passWithNoTests",
4242
"prepare": "npm run build",
@@ -45,17 +45,12 @@
4545
"postversion": "git push && git push --tags"
4646
},
4747
"devDependencies": {
48+
"@aboutbits/eslint-config": "^5.1.0",
4849
"@types/jest": "^29.5.12",
4950
"@types/react": "^18.2.69",
5051
"@types/react-dom": "^18.2.22",
51-
"@typescript-eslint/eslint-plugin": "^7.3.1",
52-
"@typescript-eslint/parser": "^7.3.1",
5352
"axios": "^1.6.8",
54-
"eslint": "^8.57.0",
55-
"eslint-config-prettier": "^9.1.0",
56-
"eslint-plugin-import": "^2.29.1",
57-
"eslint-plugin-jest": "^27.9.0",
58-
"eslint-plugin-prettier": "^5.1.3",
53+
"eslint": "^9.39.0",
5954
"jest": "^29.7.0",
6055
"jest-environment-jsdom": "^29.7.0",
6156
"prettier": "^3.2.5",

0 commit comments

Comments
 (0)