Skip to content

Commit 767c3f1

Browse files
fameoflightmargox
authored andcommitted
Eslint config and pretty code (margox#161)
* Make getContent to be static * Add eslint to editor * clearn up
1 parent a4ede07 commit 767c3f1

File tree

5 files changed

+11260
-168
lines changed

5 files changed

+11260
-168
lines changed

.eslintrc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": ["airbnb", "prettier", "prettier/react"],
4+
"globals": {
5+
"_": false
6+
},
7+
"env": {
8+
"browser": true,
9+
"node": true
10+
},
11+
"rules": {
12+
"indent": [
13+
"error",
14+
2,
15+
{
16+
"ArrayExpression": "first"
17+
}
18+
],
19+
"comma-dangle": 0,
20+
"max-len": 0,
21+
"jsx-quotes": [2, "prefer-double"],
22+
"quotes": [
23+
2,
24+
"double",
25+
{
26+
"avoidEscape": true
27+
}
28+
],
29+
"arrow-parens": ["error", "always"],
30+
"no-plusplus": [
31+
"error",
32+
{
33+
"allowForLoopAfterthoughts": true
34+
}
35+
],
36+
"eol-last": ["error", "always"],
37+
"class-methods-use-this": 0,
38+
"function-paren-newline": 0,
39+
"react/prefer-stateless-function": 0,
40+
"react/forbid-prop-types": 0,
41+
"jsx-a11y/anchor-is-valid": 0,
42+
"react/sort-comp": 0,
43+
"prefer-destructuring": 0,
44+
"react/require-default-props": 0,
45+
"import/no-extraneous-dependencies": 0,
46+
"import/extensions": 0,
47+
"import/no-unresolved": 0
48+
}
49+
}

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"trailingComma": "all",
3+
"arrowParens": "always"
4+
}

0 commit comments

Comments
 (0)