Bläddra i källkod

use the centralized jitsi eslint config (#623)

* use the centralized jitsi eslint config

* remove redundant extends
master
bbaldino 7 år sedan
förälder
incheckning
06ad4359dc
2 ändrade filer med 3 tillägg och 309 borttagningar
  1. 2
    309
      .eslintrc.js
  2. 1
    0
      package.json

+ 2
- 309
.eslintrc.js Visa fil

@@ -1,312 +1,5 @@
1 1
 module.exports = {
2
-    'env': {
3
-        'browser': true,
4
-        'commonjs': true,
5
-        'es6': true,
6
-        'jasmine': true
7
-    },
8 2
     'extends': [
9
-        'eslint:recommended',
10
-        'plugin:flowtype/recommended'
11
-    ],
12
-    'globals': {
13
-        // The globals that (1) are accessed but not defined within many of our
14
-        // files, (2) are certainly defined, and (3) we would like to use
15
-        // without explicitly specifying them (using a comment) inside of our
16
-        // files.
17
-        '__filename': false
18
-    },
19
-    'parser': 'babel-eslint',
20
-    'parserOptions': {
21
-        'ecmaFeatures': {
22
-            'experimentalObjectRestSpread': true
23
-        },
24
-        'sourceType': 'module'
25
-    },
26
-    'plugins': [
27
-        'flowtype',
28
-
29
-        // ESLint's rule no-duplicate-imports does not understand Flow's import
30
-        // type. Fortunately, eslint-plugin-import understands Flow's import
31
-        // type.
32
-        'import'
33
-    ],
34
-    'rules': {
35
-        // Possible Errors group
36
-        'no-cond-assign': 2,
37
-        'no-console': 0,
38
-        'no-constant-condition': 2,
39
-        'no-control-regex': 2,
40
-        'no-debugger': 2,
41
-        'no-dupe-args': 2,
42
-        'no-dupe-keys': 2,
43
-        'no-duplicate-case': 2,
44
-        'no-empty': 2,
45
-        'no-empty-character-class': 2,
46
-        'no-ex-assign': 2,
47
-        'no-extra-boolean-cast': 2,
48
-        'no-extra-parens': [
49
-            'error',
50
-            'all',
51
-            { 'nestedBinaryExpressions': false }
52
-        ],
53
-        'no-extra-semi': 2,
54
-        'no-func-assign': 2,
55
-        'no-inner-declarations': 2,
56
-        'no-invalid-regexp': 2,
57
-        'no-irregular-whitespace': 2,
58
-        'no-negated-in-lhs': 2,
59
-        'no-obj-calls': 2,
60
-        'no-prototype-builtins': 0,
61
-        'no-regex-spaces': 2,
62
-        'no-sparse-arrays': 2,
63
-        'no-unexpected-multiline': 2,
64
-        'no-unreachable': 2,
65
-        'no-unsafe-finally': 2,
66
-        'use-isnan': 2,
67
-        'valid-typeof': 2,
68
-
69
-        // Best Practices group
70
-        'accessor-pairs': 0,
71
-        'array-callback-return': 2,
72
-        'block-scoped-var': 0,
73
-        'complexity': 0,
74
-        'consistent-return': 0,
75
-        'curly': 2,
76
-        'default-case': 0,
77
-        'dot-location': [ 'error', 'property' ],
78
-        'dot-notation': 2,
79
-        'eqeqeq': 2,
80
-        'guard-for-in': 2,
81
-        'no-alert': 2,
82
-        'no-caller': 2,
83
-        'no-case-declarations': 2,
84
-        'no-div-regex': 0,
85
-        'no-else-return': 2,
86
-        'no-empty-function': 2,
87
-        'no-empty-pattern': 2,
88
-        'no-eq-null': 2,
89
-        'no-eval': 2,
90
-        'no-extend-native': 2,
91
-        'no-extra-bind': 2,
92
-        'no-extra-label': 2,
93
-        'no-fallthrough': 2,
94
-        'no-floating-decimal': 2,
95
-        'no-implicit-coercion': 2,
96
-        'no-implicit-globals': 2,
97
-        'no-implied-eval': 2,
98
-        'no-invalid-this': 2,
99
-        'no-iterator': 2,
100
-        'no-labels': 2,
101
-        'no-lone-blocks': 2,
102
-        'no-loop-func': 2,
103
-        'no-magic-numbers': 0,
104
-        'no-multi-spaces': 2,
105
-        'no-multi-str': 2,
106
-        'no-native-reassign': 2,
107
-        'no-new': 2,
108
-        'no-new-func': 2,
109
-        'no-new-wrappers': 2,
110
-        'no-octal': 2,
111
-        'no-octal-escape': 2,
112
-        'no-param-reassign': 2,
113
-        'no-proto': 2,
114
-        'no-redeclare': 2,
115
-        'no-return-assign': 2,
116
-        'no-script-url': 2,
117
-        'no-self-assign': 2,
118
-        'no-self-compare': 2,
119
-        'no-sequences': 2,
120
-        'no-throw-literal': 2,
121
-        'no-unmodified-loop-condition': 2,
122
-        'no-unused-expressions': [
123
-            'error',
124
-            {
125
-                'allowShortCircuit': true,
126
-                'allowTernary': true
127
-            }
128
-        ],
129
-        'no-unused-labels': 2,
130
-        'no-useless-call': 2,
131
-        'no-useless-concat': 2,
132
-        'no-useless-escape': 2,
133
-        'no-void': 2,
134
-        'no-warning-comments': 0,
135
-        'no-with': 2,
136
-        'radix': 2,
137
-        'vars-on-top': 2,
138
-        'wrap-iife': [ 'error', 'inside' ],
139
-        'yoda': 2,
140
-
141
-        // Strict Mode group
142
-        'strict': 2,
143
-
144
-        // Variables group
145
-        'init-declarations': 0,
146
-        'no-catch-shadow': 2,
147
-        'no-delete-var': 2,
148
-        'no-label-var': 2,
149
-        'no-restricted-globals': 0,
150
-        'no-shadow': 2,
151
-        'no-shadow-restricted-names': 2,
152
-        'no-undef': 2,
153
-        'no-undef-init': 2,
154
-        'no-undefined': 0,
155
-        'no-unused-vars': 2,
156
-        'no-use-before-define': [ 'error', { 'functions': false } ],
157
-
158
-        // Stylistic issues group
159
-        'array-bracket-spacing': [
160
-            'error',
161
-            'always',
162
-            { 'objectsInArrays': true }
163
-        ],
164
-        'block-spacing': [ 'error', 'always' ],
165
-        'brace-style': 2,
166
-        'camelcase': 2,
167
-        'comma-dangle': 2,
168
-        'comma-spacing': 2,
169
-        'comma-style': 2,
170
-        'computed-property-spacing': 2,
171
-        'consistent-this': [ 'error', 'self' ],
172
-        'eol-last': 2,
173
-        'func-names': 0,
174
-        'func-style': 0,
175
-        'id-blacklist': 0,
176
-        'id-length': 0,
177
-        'id-match': 0,
178
-        'indent': [
179
-            'error',
180
-            4,
181
-            {
182
-                'CallExpression': {
183
-                    arguments: 'off'
184
-                },
185
-                'FunctionDeclaration': {
186
-                    parameters: 2
187
-                },
188
-                'FunctionExpression': {
189
-                    parameters: 2
190
-                },
191
-                'MemberExpression': 'off',
192
-                'SwitchCase': 0
193
-            }
194
-        ],
195
-        'key-spacing': 2,
196
-        'keyword-spacing': 2,
197
-        'linebreak-style': [ 'error', 'unix' ],
198
-        'lines-around-comment': [
199
-            'error',
200
-            {
201
-                'allowBlockStart': true,
202
-                'allowObjectStart': true,
203
-                'beforeBlockComment': true,
204
-                'beforeLineComment': true
205
-            }
206
-        ],
207
-        'max-depth': 2,
208
-        'max-len': [ 'error', 80 ],
209
-        'max-lines': 0,
210
-        'max-nested-callbacks': 2,
211
-        'max-params': 2,
212
-        'max-statements': 0,
213
-        'max-statements-per-line': 2,
214
-        'multiline-ternary': 0,
215
-        'new-cap': 2,
216
-        'new-parens': 2,
217
-        'newline-after-var': 2,
218
-        'newline-before-return': 2,
219
-        'newline-per-chained-call': 2,
220
-        'no-array-constructor': 2,
221
-        'no-bitwise': 2,
222
-        'no-continue': 2,
223
-        'no-inline-comments': 0,
224
-        'no-lonely-if': 2,
225
-        'no-mixed-operators': 2,
226
-        'no-mixed-spaces-and-tabs': 2,
227
-        'no-multiple-empty-lines': 2,
228
-        'no-negated-condition': 2,
229
-        'no-nested-ternary': 0,
230
-        'no-new-object': 2,
231
-        'no-plusplus': 0,
232
-        'no-restricted-syntax': 0,
233
-        'no-spaced-func': 2,
234
-        'no-tabs': 2,
235
-        'no-ternary': 0,
236
-        'no-trailing-spaces': 2,
237
-        'no-underscore-dangle': 0,
238
-        'no-unneeded-ternary': 2,
239
-        'no-whitespace-before-property': 2,
240
-        'object-curly-newline': 0,
241
-        'object-curly-spacing': [ 'error', 'always' ],
242
-        'object-property-newline': 2,
243
-        'one-var': 0,
244
-        'one-var-declaration-per-line': 0,
245
-        'operator-assignment': 0,
246
-        'operator-linebreak': [ 'error', 'before' ],
247
-        'padded-blocks': 0,
248
-        'quote-props': 0,
249
-        'quotes': [ 'error', 'single' ],
250
-        'require-jsdoc': [
251
-            'error',
252
-            {
253
-                'require': {
254
-                    'ClassDeclaration': true,
255
-                    'FunctionDeclaration': true,
256
-                    'MethodDefinition': true
257
-                }
258
-            }
259
-        ],
260
-        'semi': [ 'error', 'always' ],
261
-        'semi-spacing': 2,
262
-        'sort-vars': 2,
263
-        'space-before-blocks': 2,
264
-        'space-before-function-paren': [ 'error', 'never' ],
265
-        'space-in-parens': [ 'error', 'never' ],
266
-        'space-infix-ops': 2,
267
-        'space-unary-ops': 2,
268
-        'spaced-comment': 2,
269
-        'unicode-bom': 0,
270
-        'wrap-regex': 0,
271
-
272
-        // ES6 group rules
273
-        'arrow-body-style': [
274
-            'error',
275
-            'as-needed',
276
-            { requireReturnForObjectLiteral: true }
277
-        ],
278
-        'arrow-parens': [ 'error', 'as-needed' ],
279
-        'arrow-spacing': 2,
280
-        'constructor-super': 2,
281
-        'generator-star-spacing': 2,
282
-        'no-class-assign': 2,
283
-        'no-confusing-arrow': 2,
284
-        'no-const-assign': 2,
285
-        'no-dupe-class-members': 2,
286
-        'no-new-symbol': 2,
287
-        'no-restricted-imports': 0,
288
-        'no-this-before-super': 2,
289
-        'no-useless-computed-key': 2,
290
-        'no-useless-constructor': 2,
291
-        'no-useless-rename': 2,
292
-        'no-var': 2,
293
-        'object-shorthand': [
294
-            'error',
295
-            'always',
296
-            { 'avoidQuotes': true }
297
-        ],
298
-        'prefer-arrow-callback': [ 'error', { 'allowNamedFunctions': true } ],
299
-        'prefer-const': 2,
300
-        'prefer-reflect': 0,
301
-        'prefer-rest-params': 2,
302
-        'prefer-spread': 2,
303
-        'prefer-template': 2,
304
-        'require-yield': 2,
305
-        'rest-spread-spacing': 2,
306
-        'sort-imports': 0,
307
-        'template-curly-spacing': 2,
308
-        'yield-star-spacing': 2,
309
-
310
-        'import/no-duplicates': 2
311
-    }
3
+        'eslint-config-jitsi'
4
+    ]
312 5
 };

+ 1
- 0
package.json Visa fil

@@ -34,6 +34,7 @@
34 34
     "babel-preset-es2015": "6.24.1",
35 35
     "babel-preset-stage-1": "6.24.1",
36 36
     "eslint": "4.8.0",
37
+    "eslint-config-jitsi": "jitsi/eslint-config-jitsi#v0.1",
37 38
     "eslint-plugin-flowtype": "2.37.0",
38 39
     "eslint-plugin-import": "2.7.0",
39 40
     "flow-bin": "0.38.0",

Laddar…
Avbryt
Spara