|
1 | 1 | module.exports = { |
2 | | - 'env': { |
3 | | - 'browser': true, |
4 | | - 'node': true |
5 | | - }, |
6 | | - |
| 2 | + "env": { |
| 3 | + "node": true, |
| 4 | + "browser": true, |
| 5 | + }, |
7 | 6 | 'globals': { |
| 7 | + // we want to enable a limited sub-set of ES6 features |
| 8 | + // this library should (partially) work even in IE |
8 | 9 | // false meaning this code doesn't define it |
9 | 10 | Promise: false, |
10 | 11 | DataView: false, |
11 | 12 | ArrayBuffer: false, |
12 | 13 | Float32Array: false |
13 | 14 | }, |
14 | | - 'myrules': { |
15 | | - 'consistent-return': 2, |
16 | | - 'curly': 2, |
17 | | - eqeqeq: [2, 'smart'], |
18 | | - 'no-alert': 2, |
19 | | - 'no-eq-null': 2, |
20 | | - 'no-eval': 2, |
21 | | - 'no-extend-native': 2 |
22 | | - }, |
23 | | - 'extends': 'eslint:recommended', |
24 | | - 'rules': { |
25 | | - 'accessor-pairs': 2, |
26 | | - 'array-bracket-spacing': [ |
27 | | - 2, |
28 | | - 'never' |
29 | | - ], |
30 | | - 'array-callback-return': 2, |
31 | | - 'arrow-body-style': 2, |
32 | | - 'arrow-parens': 2, |
33 | | - 'arrow-spacing': 2, |
34 | | - 'block-scoped-var': 1, |
35 | | - 'block-spacing': 2, |
36 | | - 'brace-style': [ |
37 | | - 2, |
38 | | - '1tbs' |
39 | | - ], |
40 | | - 'callback-return': 2, |
41 | | - 'camelcase': [ |
42 | | - 2, |
43 | | - { |
44 | | - 'properties': 'never' |
45 | | - } |
46 | | - ], |
47 | | - 'comma-spacing': 0, |
48 | | - 'comma-style': [ |
49 | | - 2, |
50 | | - 'last' |
51 | | - ], |
52 | | - 'complexity': 2, |
53 | | - 'computed-property-spacing': [ |
54 | | - 2, |
55 | | - 'never' |
56 | | - ], |
57 | | - 'consistent-this': [ 1, 'self', 'that' ], |
58 | | - 'curly': 2, |
59 | | - 'default-case': 2, |
60 | | - 'dot-location': [ |
61 | | - 2, |
62 | | - 'property' |
63 | | - ], |
64 | | - 'dot-notation': [ |
65 | | - 2, |
66 | | - { |
67 | | - 'allowKeywords': true |
68 | | - } |
69 | | - ], |
70 | | - 'eol-last': 2, |
71 | | - 'eqeqeq': [2, 'smart'], |
72 | | - 'func-names': 0, |
73 | | - 'func-style': [ |
74 | | - 2, |
75 | | - 'declaration' |
76 | | - ], |
77 | | - 'generator-star-spacing': 2, |
78 | | - 'global-require': 0, |
79 | | - 'guard-for-in': 2, |
80 | | - 'handle-callback-err': 2, |
81 | | - 'id-blacklist': 2, |
82 | | - 'id-match': 2, |
83 | | - 'indent': [1, 2], |
84 | | - 'jsx-quotes': 2, |
85 | | - 'key-spacing': 2, |
86 | | - 'keyword-spacing': 1, |
87 | | - 'linebreak-style': [ |
88 | | - 2, |
89 | | - 'unix' |
90 | | - ], |
91 | | - 'max-depth': 2, |
92 | | - 'max-len': [ |
93 | | - 1, |
94 | | - { |
95 | | - 'code': 160, |
96 | | - 'tabWidth': 2, |
97 | | - 'ignoreComments': true, |
98 | | - 'ignoreUrls': true |
99 | | - } |
100 | | - ], |
101 | | - 'max-nested-callbacks': 2, |
102 | | - 'max-params': 2, |
103 | | - 'new-cap': 2, |
104 | | - 'new-parens': 2, |
105 | | - 'no-alert': 2, |
106 | | - 'no-array-constructor': 2, |
107 | | - 'no-bitwise': [ |
108 | | - 2, |
109 | | - { |
110 | | - 'int32Hint': true |
111 | | - } |
112 | | - ], |
113 | | - 'no-caller': 2, |
114 | | - 'no-catch-shadow': 2, |
115 | | - 'no-confusing-arrow': 2, |
116 | | - 'no-continue': 2, |
117 | | - 'no-div-regex': 2, |
118 | | - 'no-else-return': 2, |
119 | | - 'no-eq-null': 2, |
120 | | - 'no-eval': 2, |
121 | | - 'no-extend-native': 2, |
122 | | - 'no-extra-bind': 2, |
123 | | - 'no-extra-label': 2, |
124 | | - 'no-floating-decimal': 2, |
125 | | - 'no-implicit-globals': 2, |
126 | | - 'no-implied-eval': 2, |
127 | | - 'no-inner-declarations': [ |
128 | | - 2, |
129 | | - 'functions' |
130 | | - ], |
131 | | - 'no-invalid-this': 2, |
132 | | - 'no-iterator': 2, |
133 | | - 'no-label-var': 2, |
134 | | - 'no-labels': 2, |
135 | | - 'no-lone-blocks': 2, |
136 | | - 'no-lonely-if': 0, |
137 | | - 'no-loop-func': 2, |
138 | | - 'no-multi-spaces': 1, |
139 | | - 'no-multi-str': 2, |
140 | | - 'no-native-reassign': 2, |
141 | | - 'no-negated-condition': 2, |
142 | | - 'no-nested-ternary': 2, |
143 | | - 'no-new': 2, |
144 | | - 'no-new-func': 2, |
145 | | - 'no-new-object': 2, |
146 | | - 'no-new-require': 2, |
147 | | - 'no-new-wrappers': 2, |
148 | | - 'no-octal-escape': 2, |
149 | | - 'no-proto': 2, |
150 | | - 'no-restricted-imports': 2, |
151 | | - 'no-restricted-modules': 2, |
152 | | - 'no-restricted-syntax': 2, |
153 | | - 'no-return-assign': 2, |
154 | | - 'no-script-url': 2, |
155 | | - 'no-self-compare': 2, |
156 | | - 'no-sequences': 2, |
157 | | - 'no-shadow': 2, |
158 | | - 'no-shadow-restricted-names': 2, |
159 | | - 'no-spaced-func': 2, |
160 | | - 'no-throw-literal': 2, |
161 | | - 'no-trailing-spaces': 2, |
162 | | - 'no-undef-init': 2, |
163 | | - 'no-undefined': 2, |
164 | | - 'no-unmodified-loop-condition': 2, |
165 | | - 'no-unneeded-ternary': 2, |
166 | | - 'no-unused-expressions': 2, |
167 | | - 'no-use-before-define': 2, |
168 | | - 'no-useless-call': 2, |
169 | | - 'no-useless-concat': 2, |
170 | | - 'no-useless-constructor': 2, |
171 | | - 'no-void': 2, |
172 | | - 'no-warning-comments': 1, |
173 | | - 'no-whitespace-before-property': 2, |
174 | | - 'no-with': 2, |
175 | | - 'object-curly-spacing': [ |
176 | | - 2, |
177 | | - 'never' |
178 | | - ], |
179 | | - 'one-var-declaration-per-line': 2, |
180 | | - 'operator-assignment': [ |
181 | | - 2, |
182 | | - 'always' |
183 | | - ], |
184 | | - 'operator-linebreak': 2, |
185 | | - 'quote-props': [2, 'as-needed'], |
186 | | - 'quotes': [1, 'single', 'avoid-escape'], |
187 | | - 'radix': 2, |
188 | | - 'require-jsdoc': 2, |
189 | | - 'require-yield': 2, |
190 | | - 'semi': 1, |
191 | | - 'semi-spacing': [ |
192 | | - 2, |
193 | | - { |
194 | | - 'after': true, |
195 | | - 'before': false |
196 | | - } |
197 | | - ], |
198 | | - 'sort-imports': 2, |
199 | | - 'space-before-function-paren': [1, 'never'], |
200 | | - 'space-in-parens': [1, 'never'], |
201 | | - 'space-infix-ops': 1, |
202 | | - 'space-unary-ops': 2, |
203 | | - 'spaced-comment': 1, |
204 | | - 'strict': 2, |
205 | | - 'template-curly-spacing': 2, |
206 | | - 'valid-jsdoc': [2, { |
207 | | - 'requireReturn': false, |
208 | | - 'requireParamDescription': false, |
209 | | - 'requireReturnDescription': false |
210 | | - }], |
211 | | - 'wrap-iife': 2, |
212 | | - 'yoda': [ |
213 | | - 2, |
214 | | - 'never' |
215 | | - ] |
216 | | - } |
| 15 | + "plugins": [ |
| 16 | + "prettier", |
| 17 | + ], |
| 18 | + "extends": [ |
| 19 | + "eslint:recommended", |
| 20 | + "google", |
| 21 | + "prettier", |
| 22 | + ], |
| 23 | + "rules": { |
| 24 | + "prettier/prettier": ["error", {"singleQuote": true, "printWidth": 160}], |
| 25 | + "no-var": "off", |
| 26 | + "prefer-const": "off", |
| 27 | + "prefer-rest-params": "off", |
| 28 | + "prefer-spread": "off", |
| 29 | + } |
217 | 30 | }; |
0 commit comments