JavaScript Style Guidelines for OpenStack.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.eslintrc 31KB

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