mirror of
https://github.com/knex/knex.git
synced 2025-06-26 22:00:25 +00:00
Linter warnings are errors in CI
This commit is contained in:
parent
3846b7182c
commit
c292fd5917
26
.eslintrc
26
.eslintrc
@ -1,26 +0,0 @@
|
||||
{
|
||||
"parser": "babel-eslint",
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings"
|
||||
],
|
||||
"plugins": ["import"],
|
||||
"rules": {
|
||||
"comma-dangle": 0,
|
||||
"no-unused-vars": [1, {"vars": "all", "args": "none"}],
|
||||
"no-console": 1,
|
||||
"no-var": 2,
|
||||
"no-debugger": 1,
|
||||
"indent": [1, 2, {"SwitchCase": 1}],
|
||||
"max-len": [1, 100, 2],
|
||||
"prefer-const": 1,
|
||||
"no-fallthrough": 1
|
||||
},
|
||||
"settings": {
|
||||
"import/parser": "babel-eslint"
|
||||
},
|
||||
"env": {
|
||||
"node": true
|
||||
}
|
||||
}
|
28
.eslintrc.js
Normal file
28
.eslintrc.js
Normal file
@ -0,0 +1,28 @@
|
||||
var warning = process.env['CI'] ? 2 : 1;
|
||||
|
||||
module.exports = {
|
||||
"parser": "babel-eslint",
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings"
|
||||
],
|
||||
"plugins": ["import"],
|
||||
"rules": {
|
||||
"comma-dangle": 0,
|
||||
"no-unused-vars": [warning, {"vars": "all", "args": "none"}],
|
||||
"no-console": warning,
|
||||
"no-var": 2,
|
||||
"no-debugger": warning,
|
||||
"indent": [warning, 2, {"SwitchCase": 1}],
|
||||
"max-len": [warning, 100, 2],
|
||||
"prefer-const": warning,
|
||||
"no-fallthrough": warning
|
||||
},
|
||||
"settings": {
|
||||
"import/parser": "babel-eslint"
|
||||
},
|
||||
"env": {
|
||||
"node": true
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user