Skip to content

Commit 6180c6c

Browse files
committed
feat: 支持 eslint9
1 parent 01ddf41 commit 6180c6c

File tree

3 files changed

+68
-76
lines changed

3 files changed

+68
-76
lines changed

index.js

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import eslint from '@eslint/js';
22
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-
// }]);
3+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
164

175
export default tseslint.config(
186
eslint.configs.recommended,
19-
...tseslint.configs.recommended
7+
...tseslint.configs.recommended,
8+
eslintPluginPrettierRecommended,
9+
{
10+
rules: {
11+
'prettier/prettier': 'warn',
12+
},
13+
},
2014
)

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@loongwoo/eslint-config-typescript-prettier",
3-
"version": "1.2.1",
4-
"description": " 一个 TypeScript 的 ESLint 配置,使用 Prettier 格式化代码。",
3+
"version": "1.3.0",
4+
"description": "ESLint configuration for TypeScript, using Prettier to format code.",
55
"main": "index.js",
66
"keywords": [
77
"eslint",
@@ -22,7 +22,7 @@
2222
"@eslint/js": "^9.3.0",
2323
"eslint-config-prettier": "^9.1.0",
2424
"eslint-plugin-prettier": "^5.1.3",
25-
"typescript-eslint": "^7.9.0"
25+
"typescript-eslint": "8.0.0-alpha.14"
2626
},
2727
"devDependencies": {
2828
"eslint": "^9.3.0",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)