.eslintrc 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. {
  2. "root": true,
  3. "env": {
  4. "browser": true,
  5. "node": true,
  6. "es6": true
  7. },
  8. "parser": "@babel/eslint-parser",
  9. "parserOptions": {
  10. "ecmaVersion": 7,
  11. "sourceType": "module",
  12. "requireConfigFile": false
  13. },
  14. "rules": {
  15. "accessor-pairs": 2,
  16. "array-bracket-spacing": 0,
  17. "block-scoped-var": 0,
  18. "brace-style": [2, "1tbs", { "allowSingleLine": true }],
  19. "camelcase": 0,
  20. "comma-dangle": [2, "never"],
  21. "comma-spacing": [2, { "before": false, "after": true }],
  22. "comma-style": [2, "last"],
  23. "complexity": 0,
  24. "computed-property-spacing": 0,
  25. "consistent-return": 0,
  26. "consistent-this": 0,
  27. "constructor-super": 2,
  28. "curly": [2, "multi-line"],
  29. "default-case": 0,
  30. "dot-location": [2, "property"],
  31. "dot-notation": 0,
  32. "eol-last": 2,
  33. "eqeqeq": [2, "allow-null"],
  34. "func-names": 0,
  35. "func-style": 0,
  36. "generator-star-spacing": [2, { "before": true, "after": true }],
  37. "guard-for-in": 0,
  38. "handle-callback-err": [2, "^(err|error)$" ],
  39. "indent": [2, 4, { "SwitchCase": 1 }],
  40. "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
  41. "linebreak-style": 0,
  42. "lines-around-comment": 0,
  43. "max-nested-callbacks": 0,
  44. "new-cap": [2, { "newIsCap": true, "capIsNew": false }],
  45. "new-parens": 2,
  46. "newline-after-var": 0,
  47. "no-alert": 0,
  48. "no-array-constructor": 2,
  49. "no-caller": 2,
  50. "no-catch-shadow": 0,
  51. "no-cond-assign": 2,
  52. "no-console": 0,
  53. "no-constant-condition": 0,
  54. "no-continue": 0,
  55. "no-control-regex": 2,
  56. "no-debugger": 2,
  57. "no-delete-var": 2,
  58. "no-div-regex": 0,
  59. "no-dupe-args": 2,
  60. "no-dupe-keys": 2,
  61. "no-duplicate-case": 2,
  62. "no-else-return": 0,
  63. "no-empty": 0,
  64. "no-empty-character-class": 2,
  65. "no-eq-null": 0,
  66. "no-eval": 2,
  67. "no-ex-assign": 2,
  68. "no-extend-native": 2,
  69. "no-extra-bind": 2,
  70. "no-extra-boolean-cast": 2,
  71. "no-extra-parens": 0,
  72. "no-extra-semi": 0,
  73. "no-fallthrough": 2,
  74. "no-floating-decimal": 2,
  75. "no-func-assign": 2,
  76. "no-implied-eval": 2,
  77. "no-inline-comments": 0,
  78. "no-inner-declarations": [2, "functions"],
  79. "no-invalid-regexp": 2,
  80. "no-irregular-whitespace": 2,
  81. "no-iterator": 2,
  82. "no-label-var": 2,
  83. "no-labels": 2,
  84. "no-lone-blocks": 2,
  85. "no-lonely-if": 0,
  86. "no-loop-func": 0,
  87. "no-mixed-requires": 0,
  88. "no-mixed-spaces-and-tabs": 2,
  89. "no-multi-spaces": 2,
  90. "no-multi-str": 2,
  91. "no-multiple-empty-lines": [2, { "max": 1 }],
  92. "no-native-reassign": 2,
  93. "no-negated-in-lhs": 2,
  94. "no-nested-ternary": 0,
  95. "no-new": 2,
  96. "no-new-func": 0,
  97. "no-new-object": 2,
  98. "no-new-require": 2,
  99. "no-new-wrappers": 2,
  100. "no-obj-calls": 2,
  101. "no-octal": 2,
  102. "no-octal-escape": 2,
  103. "no-param-reassign": 0,
  104. "no-path-concat": 0,
  105. "no-process-env": 0,
  106. "no-process-exit": 0,
  107. "no-proto": 0,
  108. "no-redeclare": 2,
  109. "no-regex-spaces": 2,
  110. "no-restricted-modules": 0,
  111. "no-return-assign": 2,
  112. "no-script-url": 0,
  113. "no-self-compare": 2,
  114. "no-sequences": 2,
  115. "no-shadow": 0,
  116. "no-shadow-restricted-names": 2,
  117. "no-spaced-func": 2,
  118. "no-sparse-arrays": 2,
  119. "no-sync": 0,
  120. "no-ternary": 0,
  121. "no-this-before-super": 2,
  122. "no-throw-literal": 2,
  123. "no-trailing-spaces": 2,
  124. "no-undef": 2,
  125. "no-undef-init": 2,
  126. "no-undefined": 0,
  127. "no-underscore-dangle": 0,
  128. "no-unexpected-multiline": 2,
  129. "no-unneeded-ternary": 2,
  130. "no-unreachable": 2,
  131. "no-unused-expressions": 0,
  132. "no-unused-vars": [2, { "vars": "all", "args": "none" }],
  133. "no-use-before-define": 0,
  134. "no-var": 0,
  135. "no-void": 0,
  136. "no-warning-comments": 0,
  137. "no-with": 2,
  138. "object-curly-spacing": 0,
  139. "object-shorthand": 0,
  140. "one-var": [2, { "initialized": "never" }],
  141. "operator-assignment": 0,
  142. "operator-linebreak": [2, "after", { "overrides": { "?": "before", ":": "before" } }],
  143. "padded-blocks": 0,
  144. "prefer-const": 0,
  145. "quote-props": 0,
  146. "quotes": [2, "single", "avoid-escape"],
  147. "radix": 2,
  148. "semi": [2, "always"],
  149. "semi-spacing": 0,
  150. "sort-vars": 0,
  151. "keyword-spacing": [2, {"after": true, "overrides": {"throw": { "after": true}, "return": { "before": true }}}],
  152. "space-before-blocks": [2, "always"],
  153. "space-before-function-paren": [2, "never"],
  154. "space-in-parens": [2, "never"],
  155. "space-infix-ops": 2,
  156. "space-unary-ops": [2, { "words": true, "nonwords": false }],
  157. "spaced-comment": [2, "always", { "markers": ["global", "globals", "eslint", "eslint-disable", "*package", "!"] }],
  158. "strict": 0,
  159. "use-isnan": 2,
  160. "valid-jsdoc": 0,
  161. "valid-typeof": 2,
  162. "vars-on-top": 0,
  163. "wrap-iife": [2, "any"],
  164. "wrap-regex": 0,
  165. "yoda": [2, "never"]
  166. }
  167. }