Use ESLint and the AirBnB style guide

To help enforce a consistent JS code style and improve code quality by
catching various syntax gotchas.

I'm editing in Atom with the linter-eslint package installed, and it
gives me inline warnings and errors, very handy. I'm not going to run
ESLint on Travis (yet) though, as it spits out far too many errors for
it to be useful.
This commit is contained in:
Oliver Hamlet
2015-12-23 16:11:21 +00:00
parent 534d2eb11a
commit dd77312133
2 changed files with 24 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
env:
es6: true
mocha: true
amd: true
node: true
browser: true
ecmaFeatures:
modules: false
globals:
loot: false
extends:
- "eslint:recommended"
- "airbnb/base"
rules:
strict:
- 2
- global
no-new: 1
+2
View File
@@ -14,6 +14,8 @@
"private": true,
"devDependencies": {
"bower": "^1.7.1",
"eslint": "^1.10.3",
"eslint-config-airbnb": "^2.0.0",
"fs-extra": "^0.26.2",
"vulcanize": "^0.7.11"
}