Skip to content

Commit

Permalink
Adding eslint to testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabriskie committed Jul 15, 2015
1 parent 3d64f57 commit b08cf8e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "eslint-config-airbnb",
"env": {
"browser": true,
"mocha": true,
"node": true
},
"rules": {
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2
},
"plugins": [
"react"
]
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
"dependencies": {
"babel": "^5.5.8",
"babel-core": "^5.5.6",
"babel-eslint": "^3.1.23",
"babel-loader": "^5.1.4",
"eslint": "^0.24.1",
"eslint-config-airbnb": "0.0.6",
"eslint-plugin-react": "^2.7.0",
"karma": "^0.12.36",
"karma-chrome-launcher": "^0.1.12",
"karma-cli": "0.0.4",
Expand Down
6 changes: 5 additions & 1 deletion tasks/test
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ if [ "$1" == "--ci" ]; then
CI="--single-run"
fi

NODE_ENV=test $RACKT_PATH/node_modules/.bin/karma start $RACKT_PATH/karma.conf.js "$@" "$CI"
eslint=$RACKT_PATH/node_modules/.bin/eslint
karma=$RACKT_PATH/node_modules/.bin/karma

$eslint -c $RACKT_PATH/.eslintrc lib examples && \
NODE_ENV=test $karma start $RACKT_PATH/karma.conf.js "$@" "$CI"

0 comments on commit b08cf8e

Please sign in to comment.