소스 검색

use central jitsi eslint config (#2108)

master
bbaldino 7 년 전
부모
커밋
e2b812a7bc
2개의 변경된 파일3개의 추가작업 그리고 308개의 파일을 삭제
  1. 2
    308
      .eslintrc.js
  2. 1
    0
      package.json

+ 2
- 308
.eslintrc.js 파일 보기

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

+ 1
- 0
package.json 파일 보기

@@ -86,6 +86,7 @@
86 86
     "clean-css": "3.4.25",
87 87
     "css-loader": "0.28.7",
88 88
     "eslint": "4.8.0",
89
+    "eslint-config-jitsi": "jitsi/eslint-config-jitsi#v0.1",
89 90
     "eslint-plugin-flowtype": "2.30.4",
90 91
     "eslint-plugin-import": "2.7.0",
91 92
     "eslint-plugin-jsdoc": "3.1.3",

Loading…
취소
저장