Linter warnings are errors in CI

This commit is contained in:
Rhys van der Waerden 2016-05-17 01:14:01 +10:00
parent 3846b7182c
commit c292fd5917
2 changed files with 28 additions and 26 deletions

View File

@ -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
View 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
}
};