.eslintrc 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ---
  2. env:
  3. browser: true
  4. node: true
  5. es6: true
  6. jquery: true
  7. mocha: true
  8. parser: "babel-eslint"
  9. parserOptions:
  10. ecmaVersion: 7
  11. sourceType: "module"
  12. ecmaFeatures:
  13. arrowFunctions: true
  14. blockBindings: true
  15. classes: true
  16. defaultParams: true
  17. destructuring: true
  18. forOf: false
  19. generators: true
  20. modules: true
  21. objectLiteralComputedProperties: true
  22. objectLiteralDuplicateProperties: true
  23. objectLiteralShorthandMethods: true
  24. objectLiteralShorthandProperties: true
  25. octalLiterals: true
  26. regexUFlag: true
  27. regexYFlag: true
  28. restParams: true
  29. spread: true
  30. superInFunctions: true
  31. templateStrings: true
  32. unicodeCodePointEscapes: true
  33. globalReturn: false
  34. rules:
  35. indent:
  36. - "error"
  37. - 4
  38. -
  39. SwitchCase: 1
  40. semi:
  41. - 2
  42. - "always"
  43. quotes:
  44. - 2
  45. - "single"
  46. strict:
  47. - 2
  48. - "never"
  49. eqeqeq:
  50. - 2
  51. - "smart"
  52. no-var: 2
  53. valid-jsdoc: "error"
  54. no-undef: "error"
  55. no-unused-labels: "error"
  56. no-unused-expressions: "error"
  57. no-useless-concat: "error"
  58. block-scoped-var: 2
  59. camelcase:
  60. - "error"
  61. -
  62. properties: "never"
  63. comma-style:
  64. - 2
  65. - "last"
  66. curly:
  67. - 2
  68. - "all"
  69. dot-notation:
  70. - 2
  71. -
  72. allowKeywords: true
  73. no-caller: 2
  74. no-cond-assign:
  75. - 2
  76. - "except-parens"
  77. no-debugger: 2
  78. no-extend-native: 2
  79. no-extra-parens: 2
  80. no-irregular-whitespace: 2
  81. no-iterator: 2
  82. no-loop-func: 2
  83. no-multi-str: 2
  84. no-new: 2
  85. no-proto: 2
  86. no-script-url: 2
  87. no-sequences: 2
  88. no-unused-vars:
  89. - "error"
  90. -
  91. caughtErrors: "none"
  92. args: "none"
  93. no-with: 2
  94. valid-typeof: 2
  95. wrap-iife:
  96. - 2
  97. - "inside"
  98. no-multi-spaces: "error"
  99. newline-per-chained-call:
  100. - "error"
  101. -
  102. ignoreChainWithDepth: 3
  103. no-duplicate-imports:
  104. - "error"
  105. -
  106. includeExports: true
  107. no-dupe-class-members: "error"
  108. no-const-assign: "error"
  109. no-confusing-arrow: "error"
  110. constructor-super: "error"
  111. babel/generator-star-spacing: 1
  112. babel/new-cap:
  113. - 2
  114. -
  115. capIsNewExceptions:
  116. - "$.Event"
  117. babel/object-shorthand: 1
  118. babel/arrow-parens: 1
  119. babel/no-await-in-loop: 1
  120. flowtype/require-parameter-type: 1
  121. flowtype/require-return-type:
  122. - 1
  123. - "always"
  124. -
  125. annotateUndefined: "never"
  126. flowtype/space-after-type-colon:
  127. - 1
  128. - "always"
  129. flowtype/space-before-type-colon:
  130. - 1
  131. - "never"
  132. flowtype/type-id-match:
  133. - 1
  134. - "^([A-Z][a-z0-9]+)+Type$"
  135. plugins:
  136. - "babel"
  137. - "flowtype"
  138. settings:
  139. flowtype:
  140. onlyFilesWithFlowAnnotation: true