Skip to content

Commit

Permalink
Switch to ESLint (#555)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
winstliu authored Nov 20, 2023
1 parent ffb2060 commit a2930f1
Show file tree
Hide file tree
Showing 45 changed files with 2,121 additions and 2,067 deletions.
3 changes: 3 additions & 0 deletions .azure-pipelines/common-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ steps:
env:
DISPLAY: ':99.0'

- script: npm run lint
displayName: Lint

# Acquire the `vsce` tool and use it to package
- script: |
npm install -g vsce
Expand Down
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
node_modules
out
tools
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* eslint-env node */
module.exports = {
extends: [
'eslint:recommended',
],
env: {
node: true
},
parserOptions: {
ecmaVersion: "latest"
},
root: true,
overrides: [
{
extends: ['plugin:@typescript-eslint/strict-type-checked'],
files: ['./**/*.{ts,tsx}'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
plugins: ['@typescript-eslint'],
},
],
};
4 changes: 2 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin"
"dbaeumer.vscode-eslint"
]
}
}
Loading

0 comments on commit a2930f1

Please sign in to comment.