Merge pull request #3209 from matklad/eslint

Eslint
This commit is contained in:
Aleksey Kladov 2020-02-18 01:12:29 +01:00 committed by GitHub
commit 784919aec1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 903 additions and 81 deletions

View file

@ -95,5 +95,7 @@ jobs:
- run: npm ci
working-directory: ./editors/code
- run: npm run fmt
working-directory: ./editors/code
- run: npm run package --scripts-prepend-node-path
working-directory: ./editors/code

34
editors/code/.eslintrc.js Normal file
View file

@ -0,0 +1,34 @@
module.exports = {
"env": {
"es6": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/semi": [
"error",
"always"
],
"prefer-const": "error"
}
};

File diff suppressed because it is too large Load diff

View file

@ -22,7 +22,7 @@
"vscode:prepublish": "tsc && rollup -c",
"package": "vsce package -o rust-analyzer.vsix",
"watch": "tsc --watch",
"fmt": "tsfmt -r && tslint -p tsconfig.json -c tslint.json 'src/**/*.ts' --fix"
"fmt": "tsfmt -r && eslint -c .eslintrc.js --ext ts ./src/ --fix"
},
"dependencies": {
"jsonc-parser": "^2.1.0",
@ -37,9 +37,11 @@
"@types/node-fetch": "^2.5.4",
"@types/throttle-debounce": "^2.1.0",
"@types/vscode": "^1.42.0",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",
"eslint": "^6.8.0",
"rollup": "^1.31.1",
"tslib": "^1.10.0",
"tslint": "^5.20.1",
"typescript": "^3.7.5",
"typescript-formatter": "^7.2.2",
"vsce": "^1.73.0"

View file

@ -1,10 +0,0 @@
{
"rules": {
"semicolon": [
true,
"always"
],
"prefer-const": true,
"no-floating-promises": true
}
}