Skip to content

Commit 564de04

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

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
@@ -37,7 +37,7 @@
3737
"build": "npm run build:node && npm run build:esm",
3838
"build:node": "tsc",
3939
"build:esm": "tsc --project tsconfig.esnext.json",
40-
"lint": "eslint --ext js,ts,tsx src",
40+
"lint": "eslint --cache",
4141
"lint:fix": "npm run lint -- --fix",
4242
"typecheck": "tsc --noEmit",
4343
"test": "jest --config jestconfig.json --passWithNoTests",
@@ -47,14 +47,9 @@
4747
"postversion": "git push && git push --tags"
4848
},
4949
"devDependencies": {
50+
"@aboutbits/eslint-config": "^5.1.0",
5051
"@types/jest": "^29.5.12",
51-
"@typescript-eslint/eslint-plugin": "^7.3.1",
52-
"@typescript-eslint/parser": "^7.3.1",
53-
"eslint": "^8.57.0",
54-
"eslint-config-prettier": "^9.1.0",
55-
"eslint-plugin-import": "^2.29.1",
56-
"eslint-plugin-jest": "^27.9.0",
57-
"eslint-plugin-prettier": "^5.1.3",
52+
"eslint": "^9.39.0",
5853
"jest": "^29.7.0",
5954
"jest-environment-jsdom": "^29.7.0",
6055
"prettier": "^3.2.5",

0 commit comments

Comments
 (0)