Skip to content

Commit

Permalink
Merge pull request #1020 from Feder1co5oave/lint
Browse files Browse the repository at this point in the history
[linting] Use eslint to lint code + minor refactoring + Travis CI setup
  • Loading branch information
Feder1co5oave committed Feb 25, 2018
2 parents cb8277b + dfe3d1d commit 56d1bcf
Show file tree
Hide file tree
Showing 9 changed files with 1,849 additions and 267 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,27 @@
{
"extends": "standard",
"plugins": [
"standard"
],
"parserOptions": { "ecmaVersion": 5 },
"rules": {
"semi": "off",
"indent": ["warn", 2, {
"VariableDeclarator": { "var": 2 },
"SwitchCase": 1,
"outerIIFEBody": 0
}],
"space-before-function-paren": "off",
"operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }],
"no-cond-assign": "off",
"no-useless-escape": "off",
"no-return-assign": "off",
"one-var": "off",
"no-control-regex": "off"
},
"env": {
"node": true,
"browser": true,
"amd": true
}
}
15 changes: 13 additions & 2 deletions .travis.yml
@@ -1,5 +1,16 @@
language: node_js
node_js:
- "0.10"
- "0.8"
- "0.6"
- "4"
- "lts/*"
- "node"
script: |
if [ `node --version | cut -d . -f 1,2` = "v0.10" ]; then
sed -i s/0o755/0755/ test/index.js;
npm test;
else
npm run lint && npm test;
fi
cache:
directories:
- node_modules

0 comments on commit 56d1bcf

Please sign in to comment.