Skip to content

Commit 5a107f5

Browse files
committed
👕 Use Airbnb JavaScript standard
1 parent 4dfef90 commit 5a107f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2942
-2476
lines changed

.babelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"es2015",
55
"es2016",
66
"es2017",
7+
"airbnb",
78
"stage-0"
89
],
910

.eslintrc.json

Lines changed: 37 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,48 @@
11
{
2-
"root" : true,
2+
"root": true,
33

4-
"parser" : "babel-eslint",
5-
"extends" : [ "eslint:recommended", "plugin:react/recommended" ],
6-
"plugins" : [ "react" ],
4+
"parser": "babel-eslint",
5+
"extends": ["airbnb"],
6+
"plugins": ["react", "import", "jsx-a11y"],
77

8-
"env" : {
9-
"es6" : true,
10-
"node" : true,
11-
"browser" : true,
12-
"shared-node-browser" : true
8+
"env": {
9+
"es6": true,
10+
"node": true,
11+
"browser": true,
12+
"shared-node-browser": true
1313
},
1414

15-
"parserOptions" : {
16-
"ecmaVersion" : 6,
17-
"sourceType" : "module",
18-
"ecmaFeatures" : {
19-
"jsx" : true,
20-
"experimentalObjectRestSpread" : true
15+
"parserOptions": {
16+
"ecmaVersion": 6,
17+
"sourceType": "module",
18+
"ecmaFeatures": {
19+
"jsx": true,
20+
"experimentalObjectRestSpread": true
2121
}
2222
},
2323

24-
"globals" : {
25-
"nw" : true
24+
"globals": {
25+
"nw": true
2626
},
2727

28-
"rules" : {
29-
"indent" : [ "error", 4, { "SwitchCase" : 1 } ],
30-
"quotes" : [ "error", "double" ],
31-
"max-depth" : [ "warn", 5 ],
32-
"max-len" : [ "warn", 120 ],
33-
"eol-last" : [ "warn", "always" ],
34-
35-
"semi" : [ "error", "always" ],
36-
"linebreak-style" : [ "error", "unix" ],
37-
38-
"prefer-const" : [ "warn" ],
39-
"prefer-arrow-callback" : [ "warn" ],
40-
41-
"no-var" : [ "error" ],
42-
"no-console" : [ "off" ],
43-
"no-lonely-if" : [ "warn" ],
44-
"no-unused-vars" : [ "warn", { "varsIgnorePattern" : "React" } ],
45-
"no-multi-assign" : [ "warn" ],
46-
"no-await-in-loop" : [ "error" ],
47-
"no-useless-rename" : [ "error" ],
48-
"no-trailing-spaces" : [ "error" ],
49-
"no-duplicate-imports" : [ "error" ],
50-
"no-useless-constructor" : [ "error" ],
51-
"no-multiple-empty-lines" : [ "warn", { "max" : 2 } ],
52-
53-
"space-unary-ops" : [ "error", { "words" : true, "nonwords" : false } ],
54-
"space-infix-ops" : [ "error", { "int32Hint" : false } ],
55-
"space-in-parens" : [ "error", "always" ],
56-
"space-before-blocks" : [ "error", "always" ],
57-
"space-before-function-paren" : [ "error", {
58-
"anonymous" : "always",
59-
"named" : "never",
60-
"asyncArrow" : "ignore"
61-
} ],
62-
63-
"spaced-comment" : [ "warn", "always" ],
64-
"arrow-spacing" : [ "error", { "before" : true, "after" : true } ],
65-
66-
"one-var-declaration-per-line" : [ "error", "always" ],
67-
"one-var" : [ "error", {
68-
"initialized" : "never",
69-
"uninitialized" : "always"
70-
} ],
71-
72-
"block-scoped-var" : [ "error" ],
73-
"padded-blocks" : [ "error", "never" ]
74-
}
28+
"rules": {
29+
"quotes": [1, "double"],
30+
"indent": [2, 4],
31+
32+
"no-console": [0],
33+
"no-param-reassign": [0],
34+
35+
"react/no-danger": [0],
36+
"react/jsx-indent": [2, 4],
37+
"react/jsx-indent-props": [2, 4],
38+
"react/no-array-index-key": [0],
39+
"react/require-default-props": [0],
40+
"react/prefer-stateless-function": [0],
41+
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
42+
43+
"global-require": [0],
44+
"import/first": [0],
45+
"import/prefer-default-export": [0],
46+
"import/no-extraneous-dependencies": [0]
47+
}
7548
}

0 commit comments

Comments
 (0)