Skip to content

Commit

Permalink
Add eslint with basic rules.
Browse files Browse the repository at this point in the history
Run with:
npm run lint

Add lint fix command too:
npm run lint-fix

Closes #34
  • Loading branch information
jcvernaleo committed Dec 13, 2016
1 parent 01d3a88 commit 0bc0b4c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
]
}
};
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"test": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 mocha --retries 2 --compilers js:babel-register --recursive --require ./test/setup.js test/**/*.spec.js",
"test-watch": "npm test -- --watch",
"test-e2e": "cross-env NODE_ENV=test BABEL_DISABLE_CACHE=1 mocha --retries 2 --compilers js:babel-register --require ./test/setup.js ./test/e2e.js",
"lint": "eslint --ignore-path .gitignore --format=node_modules/eslint-formatter-pretty app test *.js",
"lint": "./node_modules/.bin/eslint --ignore-path .gitignore *.js app",
"lint-fix": "npm run lint -- --fix",
"hot-server": "cross-env NODE_ENV=development node --max_old_space_size=2096 -r babel-register server.js",
"build-main": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.electron.js --progress --profile --colors",
"build-renderer": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.production.js --progress --profile --colors",
Expand Down Expand Up @@ -117,9 +118,9 @@
"electron-builder": "^8.3.0",
"electron-devtools-installer": "^2.0.1",
"enzyme": "^2.5.1",
"eslint": "^3.9.1",
"eslint": "^3.12.1",
"eslint-config-airbnb": "^13.0.0",
"eslint-formatter-pretty": "^1.1.0",
"eslint-config-standard": "^6.2.1",
"eslint-import-resolver-webpack": "^0.7.0",
"eslint-loader": "^1.6.0",
"eslint-plugin-flowtype-errors": "^1.5.0",
Expand All @@ -128,6 +129,7 @@
"eslint-plugin-mocha": "^4.7.0",
"eslint-plugin-promise": "^3.3.0",
"eslint-plugin-react": "^6.7.1",
"eslint-plugin-standard": "^2.0.1",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^1.0.1",
"fbjs-scripts": "^0.7.1",
Expand Down

0 comments on commit 0bc0b4c

Please sign in to comment.