Skip to content

Commit e9b27ab

Browse files
AlexXuChendatho7561
authored andcommitted
Migrated TSLint to ESLint
Signed-off-by: AlexXuChen <[email protected]>
1 parent 32154fd commit e9b27ab

25 files changed

+1044
-330
lines changed

.eslintrc.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"env": {
3+
"es2021": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"ecmaVersion": 12,
13+
"sourceType": "module"
14+
},
15+
"plugins": [
16+
"@typescript-eslint"
17+
],
18+
"rules": {
19+
"@typescript-eslint/no-unused-vars": [
20+
"warn",
21+
{
22+
"argsIgnorePattern": "^_"
23+
}
24+
],
25+
"@typescript-eslint/no-namespace": "off",
26+
"@typescript-eslint/no-inferrable-types": "off",
27+
"@typescript-eslint/no-explicit-any": "off",
28+
"@typescript-eslint/no-empty-function": "off",
29+
"@typescript-eslint/no-non-null-assertion": "off",
30+
"no-inner-declarations": "off"
31+
},
32+
"ignorePatterns": [
33+
"./node_modules/*",
34+
"./server/*",
35+
"test-resources",
36+
".vscode-test"
37+
]
38+
}

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- name: Compile extension
2929
run: npm run vscode:prepublish
3030
- run: vsce package
31-
- name: tslint
32-
run: npm run tslint
31+
- name: eslint
32+
run: npm run lint
3333
- name: Tests
3434
run: xvfb-run --auto-servernum npm run test --silent
3535
if: runner.os == 'Linux'

.vscode/extensions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
// See http://go.microsoft.com/fwlink/?LinkId=827846
33
// for the documentation about the extensions.json format
44
"recommendations": [
5-
"ms-vscode.vscode-typescript-tslint-plugin"
5+
"dbaeumer.vscode-eslint"
66
]
7-
}
7+
}

.vscode/tasks.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
"kind": "build",
1515
"isDefault": true
1616
}
17+
},
18+
{
19+
"type": "npm",
20+
"script": "lint",
21+
"problemMatcher": [
22+
"$eslint-stylish"
23+
],
24+
"label": "npm: lint",
25+
"detail": "./node_modules/.bin/eslint -c .eslintrc.json --ext .ts ./src "
1726
}
1827
]
1928
}

0 commit comments

Comments
 (0)