Skip to content

Commit 5b790ce

Browse files
committed
fix(eslint): remove @jenssimon/eslint-config-typescript
1 parent 406ec91 commit 5b790ce

File tree

7 files changed

+196
-244
lines changed

7 files changed

+196
-244
lines changed

demo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const main = async () => {
7373
}
7474
}
7575

76-
main()
76+
void main()
7777

7878
effect(() => {
7979
console.debug('show loader: %o', sig.value)

eslint.config.js

Lines changed: 50 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import path from 'node:path'
22
import { fileURLToPath } from 'node:url'
33

4+
import tseslint from 'typescript-eslint'
5+
import vitest from '@vitest/eslint-plugin'
6+
47
import globals from 'globals'
58

69
import { FlatCompat } from '@eslint/eslintrc'
@@ -16,7 +19,7 @@ const compat = new FlatCompat({
1619
})
1720

1821

19-
export default [
22+
export default tseslint.config(
2023
{
2124
ignores: [
2225
'.yarn/',
@@ -28,46 +31,38 @@ export default [
2831
},
2932

3033
...fixupConfigRules(compat.config({
31-
parserOptions: {
32-
project: 'tsconfig.json',
33-
},
3434
extends: [
3535
'@jenssimon/base',
3636
],
37-
overrides: [
38-
{
39-
files: [
40-
'*.ts',
41-
],
42-
extends: [
43-
'@jenssimon/typescript',
44-
],
45-
rules: {
46-
'@typescript-eslint/naming-convention': 'off',
37+
})),
38+
39+
tseslint.configs.recommendedTypeChecked,
40+
tseslint.configs.stylisticTypeChecked,
41+
{
42+
languageOptions: {
43+
parserOptions: {
44+
projectService: {
45+
allowDefaultProject: [
46+
'*.js',
47+
'demo/*.js',
48+
],
4749
},
50+
tsconfigRootDir: import.meta.dirname,
4851
},
49-
{
50-
files: [
51-
'**/*.test.*',
52-
'**/*.spec.*',
53-
'**/__tests__/**',
54-
'**/__mocks__/**',
55-
],
56-
plugins: [
57-
'@vitest',
58-
],
59-
extends: [
60-
'plugin:@vitest/legacy-recommended',
61-
],
62-
},
63-
],
64-
})).map((rule) => ({
52+
},
53+
},
54+
55+
{
6556
files: [
66-
'**/*.js',
67-
'**/*.ts',
57+
'src/loader.ts',
58+
'src/__tests__/loader.test.ts',
59+
'demo/index.js',
6860
],
69-
...rule,
70-
})),
61+
rules: {
62+
'no-void': 'off',
63+
'sonarjs/void-use': 'off',
64+
},
65+
},
7166

7267
{
7368
files: [
@@ -84,6 +79,26 @@ export default [
8479
'no-restricted-syntax': 'off',
8580
'promise/prefer-await-to-then': 'off',
8681
'unicorn/prefer-top-level-await': 'off',
82+
'@typescript-eslint/no-unsafe-argument': 'off',
83+
'@typescript-eslint/no-unsafe-assignment': 'off',
84+
'@typescript-eslint/no-unsafe-call': 'off',
85+
'@typescript-eslint/no-unsafe-member-access': 'off',
86+
'@typescript-eslint/no-unsafe-return': 'off',
87+
},
88+
},
89+
90+
{
91+
files: [
92+
'**/*.test.*',
93+
'**/*.spec.*',
94+
'**/__tests__/**',
95+
'**/__mocks__/**',
96+
],
97+
plugins: {
98+
vitest,
99+
},
100+
rules: {
101+
...vitest.configs.recommended.rules,
87102
},
88103
},
89-
]
104+
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
"@eslint/compat": "^1.2.4",
4444
"@eslint/eslintrc": "^3.2.0",
4545
"@jenssimon/eslint-config-base": "8.1.0",
46-
"@jenssimon/eslint-config-typescript": "5.3.34",
4746
"@preact/signals-core": "^1.6.0",
4847
"@types/node": "22.10.5",
4948
"@vitest/coverage-v8": "^3.0.0",
@@ -62,6 +61,7 @@
6261
"stylelint-config-recess-order": "^6.0.0",
6362
"stylelint-config-standard": "^37.0.0",
6463
"typescript": "5.7.3",
64+
"typescript-eslint": "^8.24.1",
6565
"vite": "^6.0.0",
6666
"vitest": "^3.0.0"
6767
},

0 commit comments

Comments
 (0)