Skip to content

Commit a2930f1

Browse files
authored
Switch to ESLint (#555)
* Initial migration to ESLint * Recommend ESLint instead of TSLint * Fix prefer-const * Fix no-useless-escape * Fix restrict-template-expressions * Fix no-floating-promises * Fix no-unsafe-enum-comparison * Fix ban-types * Fix no-unused-vars * Fix no-array-constructor, no-var * Fix require-await * Fix no-misused-promises * Fix no-unbound-method * Fix no-namespace * Lint telemetryHelper * Lint graphHelper * Delete unused OperationsClient * Lint ServiceConnection* * Lint configure * Another round of lint configuration * Lint restClient * Ignore parseError * Lint in CI * Make it stricter * Better fix for schemaContributor * Add a missing progress notification * Ignore tools for CI, I guess
1 parent ffb2060 commit a2930f1

Some content is hidden

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

45 files changed

+2121
-2067
lines changed

.azure-pipelines/common-steps.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ steps:
2626
env:
2727
DISPLAY: ':99.0'
2828

29+
- script: npm run lint
30+
displayName: Lint
31+
2932
# Acquire the `vsce` tool and use it to package
3033
- script: |
3134
npm install -g vsce

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist
2+
node_modules
3+
out
4+
tools

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* eslint-env node */
2+
module.exports = {
3+
extends: [
4+
'eslint:recommended',
5+
],
6+
env: {
7+
node: true
8+
},
9+
parserOptions: {
10+
ecmaVersion: "latest"
11+
},
12+
root: true,
13+
overrides: [
14+
{
15+
extends: ['plugin:@typescript-eslint/strict-type-checked'],
16+
files: ['./**/*.{ts,tsx}'],
17+
parser: '@typescript-eslint/parser',
18+
parserOptions: {
19+
project: true,
20+
},
21+
plugins: ['@typescript-eslint'],
22+
},
23+
],
24+
};

.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+
}

0 commit comments

Comments
 (0)