-
Notifications
You must be signed in to change notification settings - Fork 40
/
.eslintrc
112 lines (112 loc) · 2.82 KB
/
.eslintrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{
/**
// There's another .eslintrc file that extends this one specifically for tests.
// It's at /fec/fec/tests/.eslintrc
*/
"env": {
"browser": true,
"es6": true,
"jquery": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:import/recommended"
],
"globals": {
"document": true,
"window": true,
"context": true,
"require": true,
"module": true,
"setTimeout": true,
"clearTimeout": true,
"ga": true,
"grecaptcha": true,
"navigator": true
},
"rules": {
"array-bracket-spacing": ["error", "never", { "objectsInArrays": false }],
"comma-dangle": ["error", "never"],
"eol-last": ["error", "always"],
// "eqeqeq": ["warn", "smart"],
"jsx-quotes": ["error", "prefer-double"],
"key-spacing": [2, {
"singleLine": { "beforeColon": false },
"multiLine": { "beforeColon": false }
}],
"max-len": ["error", {
"code": 200,
"comments": 250,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}],
"no-console": "error",
"no-empty-function": "error",
"no-lone-blocks": "error",
"no-useless-escape": [0],
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 1, "maxEOF": 1 }],
"no-tabs": "error",
"no-trailing-spaces": "error",
// "no-unreachable-loop": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": ["error", "always", { "arraysInObjects": true, "objectsInObjects": true } ],
"quote-props": ["error", "as-needed", { "numbers": true }],
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/prop-types": "off",
"semi": [ "error", "always" ],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal", ["parent", "sibling"]],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
},
"overrides": [{
"files": ["./fec/fec/static/tests/js/*.js"],
"rules": {
"sort-imports": "off",
"import/order": ["off"]
}
}],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
},
"babelOptions": {
"plugins": [
"@babel/plugin-syntax-import-assertions"
],
"presets": ["@babel/preset-react"]
}
},
"plugins": [
"react",
"import"
],
"settings": {
"react": {
"version": "16"
}
}
}