Skip to content

Commit bd2d95b

Browse files
committed
update eslint rules
1 parent 63d95c6 commit bd2d95b

File tree

2 files changed

+62
-7
lines changed

2 files changed

+62
-7
lines changed

.eslintrc.json

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,67 @@
11
{
2-
"extends": ["airbnb"],
2+
"extends": [
3+
"eslint:recommended",
4+
"plugin:import/errors",
5+
"plugin:import/warnings"
6+
],
7+
"plugins": ["react"],
8+
"parserOptions": {
9+
"ecmaVersion": 6,
10+
"sourceType": "module",
11+
"ecmaFeatures": {
12+
"jsx": true
13+
}
14+
},
315
"env": {
16+
"es6": true,
417
"browser": true,
5-
"node": true
18+
"node": true,
19+
"jquery": true,
20+
"mocha": true
621
},
722
"rules": {
8-
"no-console": "off",
9-
"comma-dangle": "off",
10-
"react/jsx-filename-extension": "off"
23+
"quotes": ["error", "single"],
24+
"no-console": 1,
25+
"no-debugger": 1,
26+
"no-var": 1,
27+
"semi": [1, "always"],
28+
"no-trailing-spaces": 0,
29+
"eol-last": 0,
30+
"no-unused-vars": 0,
31+
"no-underscore-dangle": 0,
32+
"no-alert": 0,
33+
"no-lone-blocks": 0,
34+
"jsx-quotes": 1,
35+
"react/display-name": [1, { "ignoreTranspilerName": false }],
36+
"react/forbid-prop-types": [1, { "forbid": ["any"] }],
37+
"react/jsx-boolean-value": 1,
38+
"react/jsx-closing-bracket-location": 0,
39+
"react/jsx-curly-spacing": 1,
40+
"react/jsx-indent-props": 0,
41+
"react/jsx-key": 1,
42+
"react/jsx-max-props-per-line": 0,
43+
"react/jsx-no-bind": 1,
44+
"react/jsx-no-duplicate-props": 1,
45+
"react/jsx-no-literals": 0,
46+
"react/jsx-no-undef": 1,
47+
"react/jsx-pascal-case": 1,
48+
"react/jsx-sort-prop-types": 0,
49+
"react/jsx-sort-props": 0,
50+
"react/jsx-uses-react": 1,
51+
"react/jsx-uses-vars": 1,
52+
"react/no-danger": 1,
53+
"react/no-did-mount-set-state": 1,
54+
"react/no-did-update-set-state": 1,
55+
"react/no-direct-mutation-state": 1,
56+
"react/no-multi-comp": 1,
57+
"react/no-set-state": 0,
58+
"react/no-unknown-property": 1,
59+
"react/prefer-es6-class": 1,
60+
"react/prop-types": 1,
61+
"react/react-in-jsx-scope": 1,
62+
"react/require-extension": "off",
63+
"react/self-closing-comp": 1,
64+
"react/sort-comp": 1,
65+
"react/jsx-wrap-multilines": 1
1166
}
1267
}

src/client/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ ReactDOM.render(
77
<BrowserRouter>
88
<App />
99
</BrowserRouter>,
10-
document.getElementById('root'),
11-
);
10+
document.getElementById('root')
11+
); // eslint-disable-line

0 commit comments

Comments
 (0)