mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Migrate to eslint
This commit is contained in:
parent
326556b090
commit
07a77ffb35
35
editors/code/.eslintrc.js
Normal file
35
editors/code/.eslintrc.js
Normal file
@ -0,0 +1,35 @@
|
||||
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/no-floating-promises": "error",
|
||||
"@typescript-eslint/semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"prefer-const": "error"
|
||||
}
|
||||
};
|
892
editors/code/package-lock.json
generated
892
editors/code/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"rules": {
|
||||
"semicolon": [
|
||||
true,
|
||||
"always"
|
||||
],
|
||||
"prefer-const": true,
|
||||
"no-floating-promises": true
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user