Skip to content

Commit 2fdf122

Browse files
author
Artur Charaev
committed
add eslint
1 parent fcdff28 commit 2fdf122

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.eslintrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "airbnb-base",
3+
"parserOptions": {
4+
"ecmaVersion": 6,
5+
},
6+
"rules": {
7+
"no-lonely-if": 2,
8+
"no-nested-ternary": 2,
9+
"prefer-spread": 2,
10+
"no-param-reassign": ["error", {"props": false}],
11+
"no-unused-vars": ["error", { "args": "none" }],
12+
"comma-dangle": ["error", {
13+
"arrays": "always-multiline",
14+
"objects": "always-multiline",
15+
"imports": "always-multiline",
16+
"exports": "always-multiline",
17+
"functions": "never",
18+
}],
19+
}
20+
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"scripts": {
77
"build": "babel src --out-dir lib",
88
"clean": "rimraf lib",
9-
"prepublish": "npm run clean && npm run build",
9+
"lint": "eslint src",
10+
"prepublish": "npm run lint && npm run clean && npm run build",
1011
"test": "echo \"Error: no test specified\" && exit 1"
1112
},
1213
"keywords": [
@@ -26,6 +27,9 @@
2627
"babel-cli": "^6.18.0",
2728
"babel-plugin-transform-object-rest-spread": "^6.20.2",
2829
"babel-preset-es2015": "^6.18.0",
30+
"eslint": "^3.13.1",
31+
"eslint-config-airbnb-base": "^11.0.1",
32+
"eslint-plugin-import": "^2.2.0",
2933
"rimraf": "^2.5.4"
3034
},
3135
"files": [

0 commit comments

Comments
 (0)