Skip to content

Commit ad13d01

Browse files
authored
refactor: lint with @cnblogs/eslint-config-typescript (#85)
* refactor: lint with @cnblogs/eslint-config-typescript * fix(delete-post): fix unnecessary alert of 'post not exist' * fix(delete-category): fix DeletePostCategoriesHandler.handle not called * chore: bump @cnblogs/eslint-config-typescript to 1.0.1 * style: fix problem of @typescript-eslint/member-ordering * chore: update script of ui: package
1 parent 6a326a7 commit ad13d01

File tree

114 files changed

+1391
-1514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+1391
-1514
lines changed

.eslintrc.json

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
11
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
23
"root": true,
4+
"extends": ["@cnblogs/typescript"],
35
"parser": "@typescript-eslint/parser",
46
"parserOptions": {
57
"ecmaVersion": 6,
68
"sourceType": "module",
79
"project": ["./tsconfig.json", "./ui/tsconfig.json"]
810
},
9-
"plugins": ["@typescript-eslint"],
10-
"extends": "eslint:recommended",
11-
"rules": {
12-
"@typescript-eslint/naming-convention": "warn",
13-
"@typescript-eslint/semi": "warn",
14-
"curly": "warn",
15-
"eqeqeq": ["warn", "smart"],
16-
"no-throw-literal": "warn",
17-
"semi": "warn",
18-
"require-await": "warn",
19-
"no-undef": "off",
20-
"@typescript-eslint/no-floating-promises": "warn"
21-
},
11+
"rules": {},
12+
"ignorePatterns": ["out", "dist", "src/test/**", "**/*.d.ts"],
2213
"overrides": [
2314
{
24-
"files": ["*.ts", "*.tsx"],
25-
"rules": {
26-
"no-dupe-class-members": "off"
15+
"files": ["*.config.js"],
16+
"env": {
17+
"node": true
2718
}
2819
}
29-
],
30-
"ignorePatterns": ["out", "dist", "src/test/**", "**/*.d.ts"]
20+
]
3121
}

.github/workflows/build-check.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ jobs:
2121
node-version: ${{ matrix.node-version }}
2222
cache: 'npm'
2323
- run: npm ci
24-
- run: npm run format-check
2524
- run: npm run lint
2625
- run: npm run vscode:prepublish

.prettierrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
...require('@cnblogs/prettier-config'),
3+
tabWidth: 4,
4+
};

.prettierrc.json

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

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"eslint.lintTask.enable": true,
1818
"eslint.run": "onType",
1919
"eslint.debug": false,
20-
"eslint.format.enable": true
20+
"eslint.format.enable": true,
21+
"editor.codeActionsOnSave": {
22+
"source.fixAll": true
23+
}
2124
}

0 commit comments

Comments
 (0)