Browse Source

Use eslint-config-openstack

Instead of explicitly copying all the linting rules between projects,
openstack now publishes a set of rules (much like hacking) that can
be included in projects that want to adhere by our standards. This
patch switches merlin to use this set of rules.

Note: The rules in eslint-config-openstack are a verbatim copy
of what's currently in use in Horizon. Future versions will likely start
activating rules flagged as "TODO", however you can avoid build
instability by avoiding the use of fuzzy version matching in
package.json (which this patch does).

Also, I had to bump down the version of eslint in this patch, because
there was an explicit version conflict. Once we get to the point
of synchronizing dependencies, we'll be able to manage this from a
central location.

Change-Id: I5fa569e314d0b7f936b750e4845295debe5420a8
changes/93/202293/1
Michael Krotscheck 3 years ago
parent
commit
4018c61252
2 changed files with 4 additions and 823 deletions
  1. 2
    822
      .eslintrc
  2. 2
    1
      package.json

+ 2
- 822
.eslintrc View File

@@ -1,833 +1,13 @@
1
-# For a detailed list of all options please see here:
2
-# http://eslint.org/docs/configuring/
3
-
4
-# By default, ESLint uses Espree as its parser.
5
-parser: espree
6
-
7 1
 # Enable eslint-plugin-angular
8 2
 plugins:
9 3
   - angular
10 4
 
5
+extends: openstack
6
+
11 7
 # Set up globals
12 8
 globals:
13 9
   angular: false
14 10
 
15
-# Most environment options are not explicitly enabled or disabled, only
16
-# included here for completeness' sake. They are commented out, because the
17
-# global updates.py script would otherwise override them during a global
18
-# requirements synchronization.
19
-#
20
-# Individual projects should choose which platforms they deploy to.
21
-
22 11
 env:
23
-
24
-  # browser global variables.
25 12
   browser: true
26
-
27
-  # Node.js global variables and Node.js-specific rules.
28
-  # node: true
29
-
30
-  # web workers global variables.
31
-  # worker: true
32
-
33
-  # defines require() and define() as global variables as per the amd spec.
34
-  # amd: true
35
-
36
-  # Adds all of the Jasmine testing global variables for version 1.3 and 2.0.
37 13
   jasmine: true
38
-
39
-  # phantomjs global variables.
40
-  # phantomjs: true
41
-
42
-  # jquery global variables.
43
-  # jquery: true
44
-
45
-  # prototypejs global variables.
46
-  # prototypejs: true
47
-
48
-  # shelljs global variables.
49
-  # shelljs: true
50
-
51
-  # meteor global variables.
52
-  # meteor: true
53
-
54
-  # OpenStack uses Jasmine, not Mocha.
55
-  mocha: false
56
-
57
-  # Openstack does not support ES6 at its present level of adoption.
58
-  es6: false
59
-
60
-
61
-# Below we activate and configure the linting rules for all javascript in
62
-# OpenStack. These will be synchronized across all projects that make use of
63
-# them.
64
-rules:
65
-
66
-  #############################################################################
67
-  # Possible Errors
68
-  #############################################################################
69
-
70
-  # Disallow trailing commas, as those break some browsers.
71
-  # http://eslint.org/docs/rules/comma-dangle
72
-  comma-dangle:
73
-    - 2
74
-    - "never"
75
-
76
-  # Prevent the assignment of a variable in a conditional.
77
-  # http://eslint.org/docs/rules/no-cond-assign
78
-  no-cond-assign: 2
79
-
80
-  # Do not permit the use of console logging statements.
81
-  # http://eslint.org/docs/rules/no-console
82
-  no-console: 2
83
-
84
-  # Do not permit if (true) or if(false)
85
-  # http://eslint.org/docs/rules/no-constant-condition
86
-  no-constant-condition: 2
87
-
88
-  # Do not permit ASCII 0-31 (control characters) in regular expressions.
89
-  # http://eslint.org/docs/rules/no-control-regex
90
-  no-control-regex: 2
91
-
92
-  # Do not permit debugger; statements.
93
-  # http://eslint.org/docs/rules/no-debugger
94
-  no-debugger: 2
95
-
96
-  # Do not permit duplicate argument names in function declaration.
97
-  # http://eslint.org/docs/rules/no-dupe-args
98
-  no-dupe-args: 2
99
-
100
-  # Do not permit duplicate keys in object declarations.
101
-  # http://eslint.org/docs/rules/no-dupe-keys
102
-  no-dupe-keys: 2
103
-
104
-  # Do not permit duplicate cases in switch statements.
105
-  # http://eslint.org/docs/rules/no-duplicate-case
106
-  no-duplicate-case: 2
107
-
108
-  # Disallow empty regex character classes. (/[]/)
109
-  # http://eslint.org/docs/rules/no-empty-character-class
110
-  no-empty-character-class: 2
111
-
112
-  # Disallow empty block statements.
113
-  # http://eslint.org/docs/rules/no-empty
114
-  no-empty: 0 # TODO(krotscheck): Activate & Fix
115
-
116
-  # Disallow assigning of the exception parameter in a catch block.
117
-  # http://eslint.org/docs/rules/no-ex-assign
118
-  no-ex-assign: 2
119
-
120
-  # Disallow the use of double negation (!!foo) if already in a boolean context
121
-  # http://eslint.org/docs/rules/no-extra-boolean-cast
122
-  no-extra-boolean-cast: 2
123
-
124
-  # Disallow extraneous parentheses around functions.
125
-  # http://eslint.org/docs/rules/no-extra-parens
126
-  no-extra-parens:
127
-    - 0 # TODO(krotscheck): Activate & Fix
128
-    - "functions"
129
-
130
-  # Disallow extraneous semicolons.
131
-  # http://eslint.org/docs/rules/no-extra-semi
132
-  no-extra-semi: 2
133
-
134
-  # Disallow overwriting functions written as function declarations
135
-  # http://eslint.org/docs/rules/no-func-assign
136
-  no-func-assign: 2
137
-
138
-  # Disallow function or variable declarations in nested blocks
139
-  # http://eslint.org/docs/rules/no-inner-declarations
140
-  no-inner-declarations: 2
141
-
142
-  # Disallow invalid regular expression strings in the RegExp constructor
143
-  # http://eslint.org/docs/rules/no-invalid-regexp
144
-  no-invalid-regexp: 2
145
-
146
-  # Disallow irregular whitespace outside of strings and comments
147
-  # http://eslint.org/docs/rules/no-irregular-whitespace
148
-  no-irregular-whitespace: 2
149
-
150
-  # Disallow negation of the left operand of an in expression
151
-  # http://eslint.org/docs/rules/no-negated-in-lhs
152
-  no-negated-in-lhs: 2
153
-
154
-  # Disallow the use of object properties of the global object (Math and JSON) as functions
155
-  # http://eslint.org/docs/rules/no-obj-calls
156
-  no-obj-calls: 2
157
-
158
-  # Disallow multiple spaces in a regular expression literal
159
-  # http://eslint.org/docs/rules/no-regex-spaces
160
-  no-regex-spaces: 2
161
-
162
-  # Disallow reserved words being used as object literal keys
163
-  # Disabled- this is for ECMA3 backwards compatibility only.
164
-  # http://eslint.org/docs/rules/no-reserved-keys
165
-  no-reserved-keys: 0
166
-
167
-  # Disallow sparse arrays
168
-  # http://eslint.org/docs/rules/no-sparse-arrays
169
-  no-sparse-arrays: 2
170
-
171
-  # Disallow unreachable statements
172
-  # http://eslint.org/docs/rules/no-unreachable
173
-  no-unreachable: 2
174
-
175
-  # Disallow comparisons with the value NaN
176
-  # http://eslint.org/docs/rules/use-isnan
177
-  use-isnan: 2
178
-
179
-  # Ensure JSDoc comments are valid
180
-  # http://eslint.org/docs/rules/valid-jsdoc
181
-  valid-jsdoc: 0 # TODO(krotscheck): Activate & Fix
182
-
183
-  # Ensure that the results of typeof are compared against a valid string
184
-  # http://eslint.org/docs/rules/valid-typeof
185
-  valid-typeof: 2
186
-
187
-  #############################################################################
188
-  # Best Practices
189
-  #############################################################################
190
-
191
-  # Enforces getter/setter pairs in objects
192
-  # http://eslint.org/docs/rules/accessor-pairs
193
-  accessor-pairs: 2
194
-
195
-  # Treat var statements as if they were block scoped
196
-  # http://eslint.org/docs/rules/block-scoped-var
197
-  block-scoped-var: 0 # TODO(krotscheck): Activate & Fix
198
-
199
-  # Specify the maximum cyclomatic complexity allowed in a program
200
-  # http://eslint.org/docs/rules/complexity
201
-  complexity:
202
-    - 1
203
-    - 10
204
-
205
-  # Require return statements to either always or never specify values
206
-  # http://eslint.org/docs/rules/consistent-return
207
-  consistent-return: 0 # TODO(krotscheck): Activate & Fix
208
-
209
-  # Specify curly brace conventions for all control statements
210
-  # http://eslint.org/docs/rules/curly
211
-  curly: 2
212
-
213
-  # Require default case in switch statements
214
-  # http://eslint.org/docs/rules/default-case
215
-  default-case: 0 # TODO(krotscheck): Activate & Fix
216
-
217
-  # encourages use of dot notation whenever possible
218
-  # http://eslint.org/docs/rules/dot-notation
219
-  dot-notation: 2
220
-
221
-  # Enforces consistent newlines before or after dots
222
-  # http://eslint.org/docs/rules/dot-location
223
-  dot-location: 0
224
-
225
-  # Require the use of === and !==
226
-  # http://eslint.org/docs/rules/eqeqeq
227
-  eqeqeq: 0 # TODO(krotscheck): Activate & Fix
228
-
229
-  # Make sure for-in loops have an if statement
230
-  # http://eslint.org/docs/rules/guard-for-in
231
-  guard-for-in: 1
232
-
233
-  # Disallow the use of alert, confirm, and prompt
234
-  # http://eslint.org/docs/rules/no-alert
235
-  no-alert: 2
236
-
237
-  # Disallow use of arguments.caller or arguments.callee
238
-  # http://eslint.org/docs/rules/no-caller
239
-  no-caller: 2
240
-
241
-  # Disallow division operators explicitly at beginning of regular expression
242
-  # http://eslint.org/docs/rules/no-div-regex
243
-  no-div-regex: 2
244
-
245
-  # Disallow else after a return in an if
246
-  # http://eslint.org/docs/rules/no-else-return
247
-  no-else-return: 0 # TODO(krotscheck): Activate & Fix
248
-
249
-  # Disallow use of labels for anything other then loops and switches
250
-  # http://eslint.org/docs/rules/no-empty-label
251
-  no-empty-label: 2
252
-
253
-  # Disallow comparisons to null without a type-checking operator
254
-  # http://eslint.org/docs/rules/no-eq-null
255
-  no-eq-null: 2
256
-
257
-  # Disallow use of eval()
258
-  # http://eslint.org/docs/rules/no-eval
259
-  no-eval: 2
260
-
261
-  # Disallow adding to native types
262
-  # http://eslint.org/docs/rules/no-extend-native
263
-  no-extend-native: 2
264
-
265
-  # Disallow unnecessary function binding
266
-  # http://eslint.org/docs/rules/no-extra-bind
267
-  no-extra-bind: 2
268
-
269
-  # Disallow fallthrough of case statements
270
-  # http://eslint.org/docs/rules/no-fallthrough
271
-  no-fallthrough: 2
272
-
273
-  # Disallow the use of leading or trailing decimal points in numeric literals
274
-  # http://eslint.org/docs/rules/no-floating-decimal
275
-  no-floating-decimal: 2
276
-
277
-  # Disallow use of eval()-like methods
278
-  # http://eslint.org/docs/rules/no-implied-eval
279
-  no-implied-eval: 2
280
-
281
-  # Disallow usage of __iterator__ property
282
-  # http://eslint.org/docs/rules/no-iterator
283
-  no-iterator: 2
284
-
285
-  # Disallow use of labeled statements
286
-  # http://eslint.org/docs/rules/no-labels
287
-  no-labels: 2
288
-
289
-  # Disallow unnecessary nested blocks
290
-  # http://eslint.org/docs/rules/no-lone-blocks
291
-  no-lone-blocks: 2
292
-
293
-  # Disallow creation of functions within loops
294
-  # http://eslint.org/docs/rules/no-loop-func
295
-  no-loop-func: 2
296
-
297
-  # Disallow use of multiple spaces
298
-  # http://eslint.org/docs/rules/no-multi-spaces
299
-  no-multi-spaces: 0 # TODO(krotscheck): Activate & Fix
300
-
301
-  # Disallow use of multiline strings
302
-  # http://eslint.org/docs/rules/no-multi-str
303
-  no-multi-str: 2
304
-
305
-  # Disallow reassignments of native objects
306
-  # http://eslint.org/docs/rules/no-native-reassign
307
-  no-native-reassign: 2
308
-
309
-  # Disallow use of new operator for Function object
310
-  # http://eslint.org/docs/rules/no-new-func
311
-  no-new-func: 2
312
-
313
-  # Disallows creating new instances of String,Number, and Boolean
314
-  # http://eslint.org/docs/rules/no-new-wrappers
315
-  no-new-wrappers: 2
316
-
317
-  # Disallow use of new operator when not part of the assignment or comparison
318
-  # http://eslint.org/docs/rules/no-new
319
-  no-new: 0 # TODO(krotscheck): Activate & Fix
320
-
321
-  # Disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251";
322
-  # http://eslint.org/docs/rules/no-octal-escape
323
-  no-octal-escape: 2
324
-
325
-  # Disallow use of octal literals
326
-  # http://eslint.org/docs/rules/no-octal
327
-  no-octal: 2
328
-
329
-  # Disallow reassignment of function parameters
330
-  # http://eslint.org/docs/rules/no-param-reassign
331
-  no-param-reassign: 0 # TODO(krotscheck): Activate & Fix
332
-
333
-  # Disallow use of process.env
334
-  #
335
-  # Please consolidate all your env access to one single file, and apply
336
-  # by-line exceptions there.
337
-  #
338
-  # http://eslint.org/docs/rules/no-process-env
339
-  no-process-env: 2
340
-
341
-  # Disallow usage of __proto__ property
342
-  # http://eslint.org/docs/rules/no-proto
343
-  no-proto: 2
344
-
345
-  # Disallow declaring the same variable more than once
346
-  # http://eslint.org/docs/rules/no-redeclare
347
-  no-redeclare: 0 # TODO(krotscheck): Activate & Fix
348
-
349
-  # Disallow use of assignment in return statement
350
-  # http://eslint.org/docs/rules/no-return-assign
351
-  no-return-assign: 2
352
-
353
-  # Disallow use of javascript: urls.
354
-  # http://eslint.org/docs/rules/no-script-url
355
-  no-script-url: 2
356
-
357
-  # Disallow comparisons where both sides are exactly the same
358
-  # http://eslint.org/docs/rules/no-self-compare
359
-  no-self-compare: 2
360
-
361
-  # Disallow use of comma operator
362
-  # http://eslint.org/docs/rules/no-sequences
363
-  no-sequences: 2
364
-
365
-  # Restrict what can be thrown as an exception
366
-  # http://eslint.org/docs/rules/no-throw-literal
367
-  no-throw-literal: 2
368
-
369
-  # Disallow usage of expressions in statement position
370
-  # http://eslint.org/docs/rules/no-unused-expressions
371
-  no-unused-expressions: 2
372
-
373
-  # Disallow use of void operator
374
-  # http://eslint.org/docs/rules/no-void
375
-  no-void: 2
376
-
377
-  # Disallow usage of configurable warning terms in comments - e.g. TODO
378
-  # http://eslint.org/docs/rules/no-warning-comments
379
-  no-warning-comments:
380
-    - 1
381
-    - terms:
382
-      - "todo"
383
-      - "xxx"
384
-      - "fixme"
385
-
386
-  # Disallow use of the with statement
387
-  # http://eslint.org/docs/rules/no-with
388
-  no-with: 2
389
-
390
-  # Require use of the second argument for parseInt()
391
-  # http://eslint.org/docs/rules/radix
392
-  radix: 0 # TODO(krotscheck): Activate & Fix
393
-
394
-  # Requires to declare all vars on top of their containing scope
395
-  #
396
-  # http://eslint.org/docs/rules/vars-on-top
397
-  vars-on-top: 0
398
-
399
-  # Require immediate function invocation to be wrapped in parentheses
400
-  # http://eslint.org/docs/rules/wrap-iife
401
-  wrap-iife:
402
-    - 2
403
-    - "any"
404
-
405
-  # Require or disallow Yoda conditions.
406
-  # http://eslint.org/docs/rules/yoda
407
-  yoda:
408
-    - 0 # TODO(krotscheck): Activate & Fix
409
-    - "never"
410
-
411
-
412
-  #############################################################################
413
-  # Strict Mode
414
-  #############################################################################
415
-  # (Deprecated) require or disallow the "use strict" pragma in global scope
416
-  # http://eslint.org/docs/rules/global-strict
417
-  global-strict: 0
418
-
419
-  # (Deprecated) disallow unnecessary use of "use strict";
420
-  # http://eslint.org/docs/rules/no-extra-strict
421
-  no-extra-strict: 0
422
-
423
-  # controls location of Use Strict Directives
424
-  # http://eslint.org/docs/rules/strict
425
-  strict:
426
-    - 0 # TODO(krotscheck): Activate & Fix
427
-    - "function"
428
-
429
-  #############################################################################
430
-  # Variable declaration rules
431
-  #############################################################################
432
-  # Disallow the catch clause parameter name being the same as a variable in
433
-  # the outer scope
434
-  # http://eslint.org/docs/rules/no-catch-shadow
435
-  no-catch-shadow: 2
436
-
437
-  # Disallow deletion of variables
438
-  # http://eslint.org/docs/rules/no-delete-var
439
-  no-delete-var: 2
440
-
441
-  # Disallow labels that share a name with a variable
442
-  # http://eslint.org/docs/rules/no-label-var
443
-  no-label-var: 2
444
-
445
-  # Disallow shadowing of names such as arguments
446
-  # http://eslint.org/docs/rules/no-shadow-restricted-names
447
-  no-shadow-restricted-names: 2
448
-
449
-  # Disallow declaration of variables already declared in the outer scope
450
-  # http://eslint.org/docs/rules/no-shadow
451
-  no-shadow: 0 # TODO(krotscheck): Activate & Fix
452
-
453
-  # Disallow use of undefined when initializing variables
454
-  # http://eslint.org/docs/rules/no-undef-init
455
-  no-undef-init: 2
456
-
457
-  # Disallow use of undeclared variables unless mentioned in a /*global */ block
458
-  # http://eslint.org/docs/rules/no-undef
459
-  no-undef: 0 # TODO(krotscheck): Activate & Fix
460
-
461
-  # Disallow use of undefined variable
462
-  # http://eslint.org/docs/rules/no-undefined
463
-  no-undefined: 0 # TODO(krotscheck): Activate & Fix
464
-
465
-  # Disallow declaration of variables that are not used in the code
466
-  # http://eslint.org/docs/rules/no-unused-vars
467
-  no-unused-vars: 0 # TODO(krotscheck): Activate & Fix
468
-
469
-  # Disallow use of variables before they are defined
470
-  # http://eslint.org/docs/rules/no-use-before-define
471
-  no-use-before-define: 0 # TODO(krotscheck): Activate & Fix
472
-
473
-  #############################################################################
474
-  # Node.js rules
475
-  #############################################################################
476
-
477
-  # Enforces error handling in callbacks
478
-  # http://eslint.org/docs/rules/handle-callback-err
479
-  handle-callback-err: 2
480
-
481
-  # Disallow mixing regular variable and require declarations
482
-  # http://eslint.org/docs/rules/no-mixed-requires
483
-  no-mixed-requires: 2
484
-
485
-  # Disallow use of new operator with the require function
486
-  # http://eslint.org/docs/rules/no-new-require
487
-  no-new-require: 2
488
-
489
-  # Disallow string concatenation with __dirname and __filename
490
-  # http://eslint.org/docs/rules/no-path-concat
491
-  no-path-concat: 2
492
-
493
-  # Disallow process.exit()
494
-  # http://eslint.org/docs/rules/no-process-exit
495
-  no-process-exit: 2
496
-
497
-  # Restrict usage of specified node modules
498
-  # http://eslint.org/docs/rules/no-restricted-modules
499
-  no-restricted-modules: 0
500
-
501
-  # Disallow use of synchronous methods
502
-  # http://eslint.org/docs/rules/no-sync
503
-  no-sync: 2
504
-
505
-
506
-  #############################################################################
507
-  # Stylistic Changes
508
-  #############################################################################
509
-
510
-  # Enforce one true brace style
511
-  # http://eslint.org/docs/rules/brace-style
512
-  brace-style: 0 # TODO(krotscheck): Activate & Fix
513
-
514
-  # Require camel case names
515
-  # http://eslint.org/docs/rules/camelcase
516
-  camelcase:
517
-   - 2
518
-   - properties: "never"
519
-
520
-  # Enforce spacing before and after comma
521
-  # http://eslint.org/docs/rules/comma-spacing
522
-  comma-spacing: 0 # TODO(krotscheck): Activate & Fix
523
-
524
-  # Enforce one true comma style
525
-  # http://eslint.org/docs/rules/comma-style
526
-  comma-style: 2
527
-
528
-  # Enforces consistent naming when capturing the current execution context
529
-  # http://eslint.org/docs/rules/consistent-this
530
-  consistent-this:
531
-    - 0 # TODO(krotscheck): Activate & Fix
532
-    - "self"
533
-
534
-  # Enforce newline at the end of file, with no multiple empty lines
535
-  # http://eslint.org/docs/rules/eol-last
536
-  eol-last: 2
537
-
538
-  # Require function expressions to have a name
539
-  # http://eslint.org/docs/rules/func-names
540
-  func-names: 0 # TODO(krotscheck): Activate & Fix
541
-
542
-  # Enforces use of function declarations or expressions
543
-  # http://eslint.org/docs/rules/func-style
544
-  func-style: 0
545
-
546
-  # This option sets a specific tab width for your code
547
-  # http://eslint.org/docs/rules/indent
548
-  indent:
549
-    - 2 # TODO(krotscheck): Activate & Fix
550
-    - 2
551
-
552
-  # Enforces spacing between keys and values in object literal properties
553
-  # http://eslint.org/docs/rules/key-spacing
554
-  key-spacing: 0 # TODO(krotscheck): Activate & Fix
555
-
556
-  # Enforces empty lines around comments
557
-  # http://eslint.org/docs/rules/lines-around-comment
558
-  lines-around-comment: 0 # TODO(krotscheck): Activate & Fix
559
-
560
-  # Disallow mixed 'LF' and 'CRLF' as linebreaks
561
-  # http://eslint.org/docs/rules/linebreak-style
562
-  linebreak-style:
563
-    - 2
564
-    - "unix"
565
-
566
-  # Specify the maximum depth callbacks can be nested
567
-  # http://eslint.org/docs/rules/max-nested-callbacks
568
-  max-nested-callbacks:
569
-    - 0 # TODO(krotscheck): Activate & Fix
570
-    - 3
571
-
572
-  # Require a capital letter for constructors
573
-  # http://eslint.org/docs/rules/new-cap
574
-  new-cap: 0 # TODO(krotscheck): Activate & Fix
575
-
576
-  # Disallow the omission of parentheses when invoking a constructor
577
-  # http://eslint.org/docs/rules/new-parens
578
-  new-parens: 2
579
-
580
-  # allow/disallow an empty newline after var statement
581
-  # http://eslint.org/docs/rules/newline-after-var
582
-  newline-after-var: 0
583
-
584
-  # Disallow use of the Array constructor
585
-  # http://eslint.org/docs/rules/no-array-constructor
586
-  no-array-constructor: 0 # TODO(krotscheck): Activate & Fix
587
-
588
-  # Disallow use of the continue statement
589
-  # http://eslint.org/docs/rules/no-continue
590
-  no-continue: 0
591
-
592
-  # Disallow comments inline after code
593
-  # http://eslint.org/docs/rules/no-inline-comments
594
-  no-inline-comments: 0
595
-
596
-  # disallow if as the only statement in an else block
597
-  # http://eslint.org/docs/rules/no-lonely-if
598
-  no-lonely-if: 0
599
-
600
-  # Disallow mixed spaces and tabs for indentation
601
-  # http://eslint.org/docs/rules/no-mixed-spaces-and-tabs
602
-  no-mixed-spaces-and-tabs: 2
603
-
604
-  # Disallow multiple empty lines
605
-  # http://eslint.org/docs/rules/no-multiple-empty-lines
606
-  no-multiple-empty-lines:
607
-    - 2
608
-    - max: 1
609
-
610
-  # Disallow nested ternary expressions
611
-  # http://eslint.org/docs/rules/no-nested-ternary
612
-  no-nested-ternary: 0
613
-
614
-  # Disallow use of the Object constructor
615
-  # http://eslint.org/docs/rules/no-new-object
616
-  no-new-object: 1
617
-
618
-  # (Deprecated) Disallow space before semicolon
619
-  # http://eslint.org/docs/rules/no-space-before-semi
620
-  no-space-before-semi: 0
621
-
622
-  # Disallow space between function identifier and application
623
-  # http://eslint.org/docs/rules/no-spaced-func
624
-  no-spaced-func: 0 # TODO(krotscheck): Activate & Fix
625
-
626
-  # Disallow the use of ternary operators
627
-  # http://eslint.org/docs/rules/no-ternary
628
-  no-ternary: 0
629
-
630
-  # Disallow trailing whitespace at the end of lines
631
-  # http://eslint.org/docs/rules/no-trailing-spaces
632
-  no-trailing-spaces: 2
633
-
634
-  # Disallow dangling underscores in identifiers
635
-  # http://eslint.org/docs/rules/no-underscore-dangle
636
-  no-underscore-dangle: 0 # TODO(krotscheck): Activate & Fix
637
-
638
-  # Disallow the use of Boolean literals in conditional expressions
639
-  # http://eslint.org/docs/rules/no-unneeded-ternary
640
-  no-unneeded-ternary: 0 # TODO(krotscheck): Activate & Fix
641
-
642
-  # Disallow wrapping of non-IIFE statements in parens
643
-  # http://eslint.org/docs/rules/no-wrap-func
644
-  no-wrap-func: 0 # TODO(krotscheck): Activate & Fix
645
-
646
-  # Require or disallow padding inside curly braces
647
-  # http://eslint.org/docs/rules/object-curly-spacing
648
-  object-curly-spacing: 0 # TODO(krotscheck): Activate & Fix
649
-
650
-  # Allow or disallow one variable declaration per function
651
-  # http://eslint.org/docs/rules/one-var
652
-  one-var:
653
-    - 2
654
-    - uninitialized: "always"
655
-      initialized: "never"
656
-
657
-  # Prevent assignment operator shorthand where possible
658
-  # http://eslint.org/docs/rules/operator-assignment
659
-  operator-assignment:
660
-    - 0 # TODO(krotscheck): Activate & Fix
661
-    - "never"
662
-
663
-  # Enforce operators to be placed before or after line breaks
664
-  # http://eslint.org/docs/rules/operator-linebreak
665
-  operator-linebreak: 2
666
-
667
-  # Enforce padding within blocks
668
-  # http://eslint.org/docs/rules/padded-blocks
669
-  padded-blocks: 0
670
-
671
-  # Require quotes around object literal property names
672
-  # http://eslint.org/docs/rules/quote-props
673
-  quote-props: 0 # TODO(krotscheck): Activate & Fix
674
-
675
-  # Specify whether backticks, double or single quotes should be used
676
-  # http://eslint.org/docs/rules/quotes
677
-  quotes:
678
-    - 0 # TODO(krotscheck): Activate & Fix
679
-    - 'single'
680
-
681
-  # Enforce spacing before and after semicolons
682
-  # http://eslint.org/docs/rules/semi-spacing
683
-  semi-spacing: 0 # TODO(krotscheck): Activate & Fix
684
-
685
-  # Require or disallow use of semicolons instead of ASI
686
-  # http://eslint.org/docs/rules/semi
687
-  semi:
688
-    - 2
689
-    - 'always'
690
-
691
-  # Sort variables within the same declaration block
692
-  # http://eslint.org/docs/rules/sort-vars
693
-  sort-vars: 0
694
-
695
-  # (Deprecated) Require a space after function names
696
-  # http://eslint.org/docs/rules/space-after-function-name
697
-  space-after-function-name: 0
698
-
699
-  # Require a space after certain keywords
700
-  # http://eslint.org/docs/rules/space-after-keywords
701
-  space-after-keywords: 2
702
-
703
-  # require or disallow space before blocks
704
-  # http://eslint.org/docs/rules/space-before-blocks
705
-  space-before-blocks:
706
-   - 2
707
-   - "always"
708
-
709
-  # Require or disallow space before function opening parenthesis
710
-  # http://eslint.org/docs/rules/space-before-function-paren
711
-  space-before-function-paren:
712
-    - 0 # TODO(krotscheck): Activate & Fix
713
-    - "always"
714
-
715
-  # (Deprecated) Require or disallow space before function parentheses
716
-  # http://eslint.org/docs/rules/space-before-function-parentheses
717
-  space-before-function-parentheses: 0
718
-
719
-  # Require or disallow spaces inside brackets
720
-  # http://eslint.org/docs/rules/space-in-brackets
721
-  space-in-brackets: 0 # TODO(krotscheck): Activate & Fix
722
-
723
-  # require or disallow spaces inside parentheses
724
-  # http://eslint.org/docs/rules/space-in-parens
725
-  space-in-parens: 0 # TODO(krotscheck): Activate & Fix
726
-
727
-  # Require spaces around operators
728
-  # http://eslint.org/docs/rules/space-infix-ops
729
-  space-infix-ops: 2
730
-
731
-  # Require a space after return, throw, and case
732
-  # http://eslint.org/docs/rules/space-return-throw-case
733
-  space-return-throw-case: 2
734
-
735
-  # Require or disallow spaces before/after unary operators (words on by default, nonwords)
736
-  # http://eslint.org/docs/rules/space-unary-ops
737
-  space-unary-ops:
738
-    - 2
739
-    - words: true
740
-      nonwords: false
741
-
742
-  # (deprecated) Require or disallow spaces before/after unary operators (words on by default, nonwords)
743
-  # http://eslint.org/docs/rules/space-unary-word-ops
744
-  space-unary-word-ops: 0
745
-
746
-  # Require or disallow a space immediately following the // in a line comment
747
-  # http://eslint.org/docs/rules/spaced-line-comment
748
-  spaced-line-comment: 0 # TODO(krotscheck): Activate & Fix
749
-
750
-  # require regex literals to be wrapped in parentheses
751
-  # http://eslint.org/docs/rules/wrap-regex
752
-  wrap-regex: 0
753
-
754
-
755
-  #############################################################################
756
-  # ECMAScript 6 (All Off)
757
-  #############################################################################
758
-  # enforce the spacing around the * in generator functions
759
-  # http://eslint.org/docs/rules/generator-star-spacing
760
-  generator-star-spacing: 0
761
-
762
-  # (deprecated) enforce the position of the * in generator functions
763
-  # http://eslint.org/docs/rules/generator-star
764
-  generator-star: 0
765
-
766
-  # require let or const instead of var
767
-  # http://eslint.org/docs/rules/no-var
768
-  no-var: 0
769
-
770
-  # require method and property shorthand syntax for object literals
771
-  # http://eslint.org/docs/rules/object-shorthand
772
-  object-shorthand: 0
773
-
774
-  # suggest using of const declaration for variables that are never modified after declared
775
-  # http://eslint.org/docs/rules/prefer-const
776
-  prefer-const: 0
777
-
778
-
779
-  #############################################################################
780
-  # Legacy
781
-  #############################################################################
782
-  # specify the maximum depth that blocks can be nested
783
-  # http://eslint.org/docs/rules/max-depth
784
-  max-depth: 0
785
-
786
-  # specify the maximum length of a line in your program
787
-  # http://eslint.org/docs/rules/max-len
788
-  max-len:
789
-    - 2 # TODO(krotscheck): Activate & Fix
790
-    - 100
791
-
792
-  # Limits the number of parameters that can be used in function declaration.
793
-  # http://eslint.org/docs/rules/max-params
794
-  max-params: 0
795
-
796
-  # Specify the maximum number of statements allowed in a function
797
-  # http://eslint.org/docs/rules/max-statements
798
-  max-statements: 0
799
-
800
-  # Disallow use of bitwise operators
801
-  # http://eslint.org/docs/rules/no-bitwise
802
-  no-bitwise: 0
803
-
804
-  # Disallow use of unary operators, ++ and --
805
-  # http://eslint.org/docs/rules/no-plusplus
806
-  no-plusplus: 0
807
-
808
-
809
-# We only support ECMA5, disable everything else.
810
-ecmaFeatures:
811
-  arrowFunctions: false
812
-  binaryLiterals: false
813
-  blockBindings: false
814
-  classes: false
815
-  defaultParams: false
816
-  destructuring: false
817
-  forOf: false
818
-  generators: false
819
-  modules: false
820
-  objectLiteralComputedProperties: false
821
-  objectLiteralDuplicateProperties: false
822
-  objectLiteralShorthandMethods: false
823
-  objectLiteralShorthandProperties: false
824
-  octalLiterals: false
825
-  regexUFlag: false
826
-  regexYFlag: false
827
-  restParams: false
828
-  spread: false
829
-  superInFunctions: false
830
-  templateStrings: false
831
-  unicodeCodePointEscapes: false
832
-  globalReturn: false
833
-  jsx: false

+ 2
- 1
package.json View File

@@ -4,7 +4,8 @@
4 4
   "private": true,
5 5
   "devDependencies": {
6 6
     "bower": "1.3.12",
7
-    "eslint": "0.24.0",
7
+    "eslint": "^0.23.0",
8
+    "eslint-config-openstack": "1.2.0",
8 9
     "eslint-plugin-angular": "0.0.15",
9 10
     "grunt": "0.4.5",
10 11
     "grunt-bower-task": "0.4.0",

Loading…
Cancel
Save