mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-04-20 23:23:56 +03:00
add basic linter setup
This commit is contained in:
parent
e5abe3d98a
commit
db94a62649
3 changed files with 31 additions and 1 deletions
28
.eslintrc.json
Normal file
28
.eslintrc.json
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"env": {
|
||||
"commonjs": true,
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"ignorePatterns": ["node_modules", "test", "*example.js"],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018
|
||||
},
|
||||
"rules": {
|
||||
"no-irregular-whitespace": "off",
|
||||
"no-mixed-spaces-and-tabs": "off",
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"vars": "all",
|
||||
"args": "none",
|
||||
"ignoreRestSiblings": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ node_js:
|
|||
- 'lts/*'
|
||||
- '10'
|
||||
cache: npm
|
||||
script: npm test
|
||||
script: npm run lint && npm test
|
||||
jobs:
|
||||
include:
|
||||
- name: e2e-test
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"db-stations": "^3.0.0",
|
||||
"eslint": "^6.8.0",
|
||||
"is-coordinates": "^2.0.2",
|
||||
"is-roughly-equal": "^0.1.0",
|
||||
"tap-spec": "^5.0.0",
|
||||
|
@ -67,6 +68,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"e2e-test": "env NODE_ENV=dev node test/e2e/index.js | tap-spec",
|
||||
"lint": "eslint .",
|
||||
"test": "env NODE_ENV=dev node test/index.js | tap-spec",
|
||||
"prepublishOnly": "npm test && npm run e2e-test"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue