Skip to content

Commit

Permalink
[tools] Add ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyganch committed Jul 15, 2016
1 parent 73e1eb9 commit 2c7443c
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
parserOptions:
ecmaVersion: 6
sourceType: module
env:
es6: true
mocha: true
rules:
no-dupe-args: error
no-dupe-keys: error
no-duplicate-case: error
no-empty: error
no-func-assign: error
no-inner-declarations: error
no-irregular-whitespace: error
no-unexpected-multiline: error
no-unreachable: error
use-isnan: error
valid-jsdoc:
- off
-
prefer:
returns: return
preferType:
Boolean: boolean
Number: number
String: string
array: Array
object: Object
requireReturn: false
requireParamDescription: false
requireReturnDescription: false
valid-typeof: error
dot-location:
- error
- property
eqeqeq: error
no-empty-function: error
no-extend-native: error
no-extra-bind: error
no-multi-spaces: error
no-native-reassign: error
no-redeclare: error
no-return-assign: error
no-unused-expressions: error
radix: error
yoda: error
no-unused-vars: error
array-bracket-spacing: error
comma-spacing: error
indent:
- off
- 2
max-len: error
max-params:
- warn
- 5
no-lonely-if: error
no-nested-ternary: error
no-spaced-func: error
no-trailing-spaces: error
no-var: off
prefer-const: off
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"devDependencies": {
"babel-loader": "^5.3.2",
"coffee-script": "~1.7.1",
"eslint": "^3.0.0",
"jscs": "2.1.0",
"jshint": "2.8.0",
"json-loader": "^0.5.3",
Expand Down
6 changes: 6 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ printf "\n\
----------------\n\n"
test ./node_modules/.bin/jshint ./src

printf "\n\
----------------\n\
Running ESLint\n\
----------------\n\n"
test ./node_modules/.bin/eslint ./src

printf "\n\
--------------\n\
Running JSCS\n\
Expand Down

0 comments on commit 2c7443c

Please sign in to comment.