forked from mozilla/web-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
166 lines (163 loc) · 4.9 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"arrowFunctions": true,
"blockBindings": true,
"classes": true,
"destructuring": true,
"defaultParams": true,
"modules": true,
"restParams": true,
"spread": true
},
"babelConfig": {
"configFile": "./.babelrc"
},
"requireConfigFile": false
},
"plugins": [
"async-await",
"ft-flow",
"import"
],
"settings": {
"ft-flow": {
"onlyFilesWithFlowAnnotation": true
}
},
"env": {
"node": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:ft-flow/recommended"
],
"globals": {
"exports": false,
"module": false,
"require": false
},
"rules": {
"arrow-parens": 2,
"arrow-spacing": 2,
"block-scoped-var": 0,
"brace-style": [2, "1tbs", {"allowSingleLine": false}],
"camelcase": 0,
"comma-dangle": [2, "always-multiline"],
"comma-spacing": 2,
"comma-style": [2, "last"],
"curly": [2, "all"],
"dot-notation": [2, {"allowKeywords": true}],
"eqeqeq": [2, "allow-null"],
"guard-for-in": 0,
"key-spacing": 2,
"keyword-spacing": 2,
"new-cap": [2, {"capIsNewExceptions": ["Deferred"]}],
"no-bitwise": 2,
"no-caller": 2,
"no-cond-assign": [2, "except-parens"],
"no-console": 2,
"no-debugger": 2,
"no-empty": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-parens": 0,
"no-extra-semi": 2,
"no-implicit-coercion": [2, {
"boolean": true,
"number": true,
"string": true,
}],
"no-irregular-whitespace": 2,
"no-iterator": 2,
"no-loop-func": 0,
"no-mixed-spaces-and-tabs": 2,
"no-multi-str": 2,
"no-multi-spaces": 2,
"no-multiple-empty-lines": [2, {"max": 2}],
"no-new": 2,
"no-plusplus": 0,
"no-proto": 2,
"no-redeclare": 0,
"no-shadow": [2, {"builtinGlobals": true}],
"no-shadow-restricted-names": 2,
"no-script-url": 2,
"no-sequences": 2,
"no-template-curly-in-string": 2,
"no-trailing-spaces": [2, {"skipBlankLines": false}],
"no-undef": 2,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 2,
"no-unused-vars": 2,
"no-with": 2,
"object-property-newline": [2, {
"allowMultiplePropertiesPerLine": true
}],
"object-shorthand": 2,
"one-var": [2, "never"],
"prefer-const": 2,
"prefer-template": 2,
"quotes": [2, "single", "avoid-escape"],
"require-yield": 2,
"semi": [2, "always"],
"space-before-blocks": [2, "always"],
"space-infix-ops": 2,
"strict": [2, "never"],
"valid-typeof": 2,
"wrap-iife": [2, "inside"],
"async-await/space-after-async": 2,
"async-await/space-after-await": 2,
"ft-flow/define-flow-type": 1,
"ft-flow/use-flow-type": 1,
"ft-flow/space-after-type-colon": [1, "always"],
// This makes sure imported modules exist.
"import/no-unresolved": 2,
// This makes sure imported names exist.
"import/named": 2,
// This will catch accidental default imports when no default is defined.
"import/default": 2,
// This makes sure `*' imports are dereferenced to real exports.
"import/namespace": 2,
// This catches any export mistakes.
"import/export": 2,
// This catches default names that conflict with actual exported names.
// For example, this was probably a typo:
// import foo from 'bar';
// that should be corrected as:
// import { foo } from 'bar';
"import/no-named-as-default": 2,
// This catches possible typos like trying to access a real export on a
// default import.
"import/no-named-as-default-member": 2,
// This prevents exporting a mutable variable.
"import/no-mutable-exports": 2,
// This makes sure package.json defines dev vs. prod dependencies correctly.
"import/no-extraneous-dependencies": [2, {
// The following are not allowed to be imported. See .eslintrc in other
// directories (like ./test) for where this gets overidden.
"devDependencies":["Gruntfile.js", "webpack.*.js", "tasks/*.js"],
"optionalDependencies": false, "peerDependencies": false
}],
// This ensures imports are at the top of the file.
"import/imports-first": 2,
// This catches duplicate exports.
"import/no-duplicates": 2,
// This ensures import statements never provide a file extension in the path.
// NOTE: disabled due to https://github.com/import-js/eslint-plugin-import/issues/2104
"import/extensions": [0, "never"],
// This ensures imports are organized by type and that groups are separated
// by a new line.
"import/order": [2, {
"groups": [
"builtin", "external", "internal", ["parent", "sibling"], "index"
],
"newlines-between": "always"
}],
// This ensures a new line after all import statements.
"import/newline-after-import": 2,
}
}