Skip to content

Commit 01ddf41

Browse files
committed
feat: 更新 ts-lint
1 parent 19fa77f commit 01ddf41

File tree

3 files changed

+97
-69
lines changed

3 files changed

+97
-69
lines changed

index.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
export default [{
2-
parser: '@typescript-eslint/parser',
3-
plugins: ['@typescript-eslint'],
4-
extends: [
5-
'eslint:recommended',
6-
'plugin:@typescript-eslint/recommended',
7-
'plugin:prettier/recommended'
8-
],
9-
rules: {
10-
'prettier/prettier': 'warn'
11-
}
12-
}];
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
4+
// export default tseslint.config([{
5+
// parser: '@typescript-eslint/parser',
6+
// plugins: ['@typescript-eslint'],
7+
// extends: [
8+
// 'eslint:recommended',
9+
// 'plugin:@typescript-eslint/recommended',
10+
// 'plugin:prettier/recommended'
11+
// ],
12+
// rules: {
13+
// 'prettier/prettier': 'warn'
14+
// }
15+
// }]);
16+
17+
export default tseslint.config(
18+
eslint.configs.recommended,
19+
...tseslint.configs.recommended
20+
)

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
"registry": "https://registry.npmjs.org/"
2020
},
2121
"dependencies": {
22-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.14",
23-
"@typescript-eslint/parser": "8.0.0-alpha.14",
22+
"@eslint/js": "^9.3.0",
2423
"eslint-config-prettier": "^9.1.0",
25-
"eslint-plugin-prettier": "^5.1.3"
24+
"eslint-plugin-prettier": "^5.1.3",
25+
"typescript-eslint": "^7.9.0"
2626
},
2727
"devDependencies": {
2828
"eslint": "^9.3.0",

pnpm-lock.yaml

Lines changed: 74 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)