chore(eslint): set up eslint for use
This commit is contained in:
Родитель
979fc8b663
Коммит
e3597a5a50
|
@ -1,8 +1,8 @@
|
|||
steps:
|
||||
# static checking
|
||||
- script: |
|
||||
npm run tslint
|
||||
displayName: Run TSLint Checks
|
||||
npm run eslint
|
||||
displayName: Run ESLint Checks
|
||||
# cred scan
|
||||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
|
||||
displayName: Run CredScan
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"no-unused-vars": "warn",
|
||||
"no-empty": "warn",
|
||||
"no-prototype-builtins": "warn"
|
||||
}
|
||||
}
|
|
@ -62,7 +62,7 @@
|
|||
"scripts": {
|
||||
"vscode:prepublish": "webpack --mode production",
|
||||
"compile": "tsc -p ./",
|
||||
"tslint": "tslint -t verbose src/**/*.ts",
|
||||
"eslint": "eslint -c ./eslint.json src/**/*.ts",
|
||||
"test": "jest",
|
||||
"test:coverage": "jest --coverage",
|
||||
"webpack": "webpack --mode development"
|
||||
|
@ -73,14 +73,16 @@
|
|||
"@types/jest": "^25.1.2",
|
||||
"@types/node": "^10.12.21",
|
||||
"@types/vscode": "^1.36.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
||||
"@typescript-eslint/parser": "^2.28.0",
|
||||
"cz-conventional-changelog": "^3.1.0",
|
||||
"eslint": "^6.8.0",
|
||||
"glob": "^7.1.4",
|
||||
"jest": "^25.0.1",
|
||||
"prettier": "^1.19.1",
|
||||
"prettier-tslint": "^0.4.2",
|
||||
"ts-jest": "^25.2.0",
|
||||
"ts-loader": "^6.2.1",
|
||||
"tslint": "^5.12.1",
|
||||
"typescript": "^3.3.1",
|
||||
"webpack": "^4.41.2",
|
||||
"webpack-cli": "^3.3.10"
|
||||
|
|
10
tslint.json
10
tslint.json
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": "tslint:recommended",
|
||||
"rules": {
|
||||
"variable-name": [true, "ban-keywords", "check-format"],
|
||||
"interface-name": [true, "never-prefix"],
|
||||
"max-line-length": [true, 120],
|
||||
"no-empty": false,
|
||||
"object-literal-sort-keys": false
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче