Skip to content

Commit 35989aa

Browse files
committed
Integrates ESLint and fixes errors exposed by the Airbnb style guide
1 parent f9fbb94 commit 35989aa

File tree

6 files changed

+377
-357
lines changed

6 files changed

+377
-357
lines changed

.eslintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": "airbnb",
3+
"plugins": [
4+
"react",
5+
"import"
6+
],
7+
"env": {
8+
"browser": true,
9+
"node": true
10+
},
11+
"parserOptions": {
12+
"ecmaFeatures": {
13+
"jsx": true
14+
}
15+
}
16+
}

package.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,29 @@
88
],
99
"scripts": {
1010
"build": "webpack -p",
11-
"dev": "webpack --watch"
11+
"dev": "webpack --watch",
12+
"lint": "eslint --ext .jsx --ext .js src/ --ignore-path .gitignore; exit 0",
13+
"fix": "eslint --ext .jsx --ext .js src/ --ignore-path .gitignore --fix; exit 0"
1214
},
1315
"author": "",
1416
"license": "ISC",
1517
"dependencies": {
18+
"path": "^0.12.7",
19+
"prop-types": "^15.5.10",
20+
"styled-components": "^2.1.1",
21+
"webpack": "^2.2.0",
22+
"webpack-node-externals": "^1.6.0"
23+
},
24+
"devDependencies": {
1625
"babel-cli": "^6.24.1",
1726
"babel-core": "^6.25.0",
1827
"babel-loader": "^7.1.1",
1928
"babel-preset-es2015": "^6.24.1",
2029
"babel-preset-react": "^6.24.1",
21-
"path": "^0.12.7",
22-
"styled-components": "^2.1.1",
23-
"webpack": "^2.2.0",
24-
"webpack-node-externals": "^1.6.0"
30+
"eslint": "^3.19.0",
31+
"eslint-config-airbnb": "^15.0.2",
32+
"eslint-plugin-import": "^2.7.0",
33+
"eslint-plugin-jsx-a11y": "^5.1.1",
34+
"eslint-plugin-react": "^7.1.0"
2535
}
2636
}

0 commit comments

Comments
 (0)