Skip to content

Commit 2141200

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

3 files changed

Lines changed: 25 additions & 56 deletions

File tree

.eslintrc.json

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

eslint.config.mjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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/order': 'error',
11+
},
12+
},
13+
{
14+
files: ['**/*.ts', '**/*.tsx'],
15+
rules: {
16+
'@typescript-eslint/explicit-function-return-type': 'error',
17+
},
18+
},
19+
{
20+
ignores: ['node_modules', 'dist'],
21+
},
22+
])

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
},
3636
"scripts": {
3737
"build": "tsc",
38-
"lint": "eslint --ext js,ts,tsx src",
38+
"lint": "eslint --cache",
3939
"lint:fix": "npm run lint -- --fix",
4040
"typecheck": "tsc --noEmit",
4141
"test": "jest --config jestconfig.json --passWithNoTests",
@@ -45,15 +45,10 @@
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/node": "^22",
50-
"@typescript-eslint/eslint-plugin": "^7.3.1",
51-
"@typescript-eslint/parser": "^7.3.1",
52-
"eslint": "^8.57.0",
53-
"eslint-config-prettier": "^9.1.0",
54-
"eslint-plugin-import": "^2.29.1",
55-
"eslint-plugin-jest": "^27.9.0",
56-
"eslint-plugin-prettier": "^5.1.3",
51+
"eslint": "^9.39.0",
5752
"jest": "^29.7.0",
5853
"jest-environment-jsdom": "^29.7.0",
5954
"prettier": "^3.2.5",

0 commit comments

Comments
 (0)