Skip to content

Commit

Permalink
chore(package.json): add eslint and lint task
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed May 22, 2015
1 parent fe72d70 commit 71502a2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
},
"ecmaFeatures": {
"arrowFunctions": true,
"classes": true,
"modules": true,
"jsx": true
},
"rules": {
// Possible Errors
"comma-dangle": "always",
// Best Practices
"consistent-return": "never",
"yoda": "always",
// Variables
"no-use-before-define": "nofunc",
// Stylistic Issues
"camelcase": "never",
"no-underscore-dangle": "never",
},
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build": "rm -rf ./lib && babel --stage=1 ./src --out-dir ./lib",
"build_client": "cd examples/gh-pages && npm i && npm run build_client",
"dev": "cd examples/gh-pages && npm i && npm run dev",
"lint": "eslint src",
"test": "jest"
},
"repository": {
Expand Down Expand Up @@ -49,6 +50,8 @@
"devDependencies": {
"babel": "^5.1.13",
"babel-core": "^5.1.13",
"babel-eslint": "^3.1.7",
"eslint": "^0.21.2",
"jest-cli": "^0.4.0",
"tomchentw-npm-dev": "^1.2.0"
},
Expand Down

0 comments on commit 71502a2

Please sign in to comment.