.eslintrc.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  1. module.exports = {
  2. "parserOptions": {
  3. "ecmaVersion": 5
  4. },
  5. "env": {
  6. "browser": true,
  7. "worker": true,
  8. "node": true
  9. },
  10. "extends": "eslint:recommended",
  11. "rules": {
  12. "accessor-pairs": "error",
  13. "array-bracket-newline": ["error", "consistent"],
  14. "array-bracket-spacing": [
  15. "error",
  16. "never"
  17. ],
  18. "array-callback-return": "error",
  19. "array-element-newline": "off",
  20. "arrow-body-style": "error",
  21. "arrow-parens": "error",
  22. "arrow-spacing": "error",
  23. "block-scoped-var": "error",
  24. "block-spacing": "error",
  25. "brace-style": "off",
  26. "callback-return": "error",
  27. "camelcase": ["error", {"properties": "never"}],
  28. "capitalized-comments": "off",
  29. "class-methods-use-this": "error",
  30. "comma-dangle": "off",
  31. "comma-spacing": "off",
  32. "comma-style": [
  33. "error",
  34. "last"
  35. ],
  36. "complexity": "off",
  37. "computed-property-spacing": [
  38. "error",
  39. "never"
  40. ],
  41. "consistent-return": "off",
  42. "consistent-this": "off",
  43. "curly": "off",
  44. "default-case": "error",
  45. "dot-location": "error",
  46. "dot-notation": "error",
  47. "eol-last": "error",
  48. "eqeqeq": "error",
  49. "for-direction": "error",
  50. "func-call-spacing": "error",
  51. "func-name-matching": "error",
  52. "func-names": [
  53. "error",
  54. "never"
  55. ],
  56. "func-style": "off",
  57. "function-paren-newline": "off",
  58. "generator-star-spacing": "error",
  59. "getter-return": "error",
  60. "global-require": "off",
  61. "guard-for-in": "off",
  62. "handle-callback-err": "error",
  63. "id-blacklist": "error",
  64. "id-length": "off",
  65. "id-match": "error",
  66. "implicit-arrow-linebreak": "error",
  67. "indent": [
  68. "error",
  69. "tab"
  70. ],
  71. "indent-legacy": "off",
  72. "init-declarations": "off",
  73. "jsx-quotes": "error",
  74. "key-spacing": "error",
  75. "keyword-spacing": "off",
  76. "line-comment-position": "off",
  77. "linebreak-style": [
  78. "error",
  79. "unix"
  80. ],
  81. "lines-around-comment": "off",
  82. "lines-around-directive": "off",
  83. "lines-between-class-members": "error",
  84. "max-depth": "off",
  85. "max-len": "off",
  86. "max-lines": "off",
  87. "max-nested-callbacks": "error",
  88. "max-params": "off",
  89. "max-statements": "off",
  90. "max-statements-per-line": "off",
  91. "multiline-comment-style": "off",
  92. "multiline-ternary": [
  93. "error",
  94. "always-multiline"
  95. ],
  96. "new-parens": "error",
  97. "newline-after-var": "off",
  98. "newline-before-return": "off",
  99. "newline-per-chained-call": "off",
  100. "no-alert": "error",
  101. "no-array-constructor": "error",
  102. "no-await-in-loop": "error",
  103. "no-bitwise": "error",
  104. "no-buffer-constructor": "error",
  105. "no-caller": "error",
  106. "no-catch-shadow": "off",
  107. "no-cond-assign": [
  108. "error",
  109. "except-parens"
  110. ],
  111. "no-confusing-arrow": "error",
  112. "no-console": "off",
  113. "no-continue": "off",
  114. "no-div-regex": "error",
  115. "no-duplicate-imports": "error",
  116. "no-else-return": "off",
  117. "no-empty": ["error", {"allowEmptyCatch": true}],
  118. "no-empty-function": "off",
  119. "no-eq-null": "error",
  120. "no-eval": "error",
  121. "no-extend-native": "error",
  122. "no-extra-bind": "error",
  123. "no-extra-label": "error",
  124. "no-extra-parens": "off",
  125. "no-floating-decimal": "error",
  126. "no-implicit-globals": "error",
  127. "no-implied-eval": "error",
  128. "no-inline-comments": "off",
  129. "no-inner-declarations": [
  130. "error",
  131. "functions"
  132. ],
  133. "no-invalid-this": "off",
  134. "no-iterator": "error",
  135. "no-label-var": "error",
  136. "no-labels": "error",
  137. "no-lone-blocks": "error",
  138. "no-lonely-if": "error",
  139. "no-loop-func": "error",
  140. "no-magic-numbers": "off",
  141. "no-mixed-operators": "off",
  142. "no-mixed-requires": "error",
  143. "no-multi-assign": "error",
  144. "no-multi-spaces": "off",
  145. "no-multi-str": "error",
  146. "no-multiple-empty-lines": "off",
  147. "no-native-reassign": "error",
  148. "no-negated-condition": "off",
  149. "no-negated-in-lhs": "error",
  150. "no-nested-ternary": "off",
  151. "no-new": "error",
  152. "no-new-func": "error",
  153. "no-new-object": "error",
  154. "no-new-require": "error",
  155. "no-new-wrappers": "error",
  156. "no-octal-escape": "error",
  157. "no-param-reassign": "off",
  158. "no-path-concat": "off",
  159. "no-plusplus": "off",
  160. "no-process-env": "error",
  161. "no-process-exit": "error",
  162. "no-proto": "error",
  163. "no-prototype-builtins": "error",
  164. "no-restricted-globals": "error",
  165. "no-restricted-imports": "error",
  166. "no-restricted-modules": "error",
  167. "no-restricted-properties": "error",
  168. "no-restricted-syntax": "error",
  169. "no-return-assign": "error",
  170. "no-return-await": "error",
  171. "no-script-url": "error",
  172. "no-self-compare": "error",
  173. "no-sequences": "error",
  174. "no-shadow": "off",
  175. "no-shadow-restricted-names": "error",
  176. "no-spaced-func": "error",
  177. "no-sync": ["error", {"allowAtRootLevel": true}],
  178. "no-tabs": "off",
  179. "no-template-curly-in-string": "error",
  180. "no-ternary": "off",
  181. "no-throw-literal": "error",
  182. "no-trailing-spaces": "error",
  183. "no-undef-init": "error",
  184. "no-undefined": "off",
  185. "no-underscore-dangle": "off",
  186. "no-unmodified-loop-condition": "off",
  187. "no-unneeded-ternary": "error",
  188. "no-unused-expressions": "off",
  189. "no-unused-vars": ["error", {"args": "none"}],
  190. "no-use-before-define": "off",
  191. "no-useless-call": "error",
  192. "no-useless-computed-key": "error",
  193. "no-useless-concat": "error",
  194. "no-useless-constructor": "error",
  195. "no-useless-rename": "error",
  196. "no-useless-return": "off",
  197. "no-var": "off",
  198. "no-void": "error",
  199. "no-warning-comments": "error",
  200. "no-whitespace-before-property": "error",
  201. "no-with": "error",
  202. "nonblock-statement-body-position": [
  203. "error",
  204. "any"
  205. ],
  206. "object-curly-newline": ["error", {"consistent": true}],
  207. "object-curly-spacing": "off",
  208. "object-shorthand": "off",
  209. "one-var": "off",
  210. "one-var-declaration-per-line": "off",
  211. "operator-assignment": [
  212. "error",
  213. "always"
  214. ],
  215. "operator-linebreak": "off",
  216. "padded-blocks": "off",
  217. "padding-line-between-statements": "error",
  218. "prefer-arrow-callback": "off",
  219. "prefer-const": "error",
  220. "prefer-destructuring": "off",
  221. "prefer-numeric-literals": "error",
  222. "prefer-promise-reject-errors": "error",
  223. "prefer-reflect": "off",
  224. "prefer-rest-params": "off",
  225. "prefer-spread": "error",
  226. "prefer-template": "off",
  227. "quote-props": "off",
  228. "quotes": "off",
  229. "radix": [
  230. "error",
  231. "as-needed"
  232. ],
  233. "require-await": "error",
  234. "require-jsdoc": "off",
  235. "rest-spread-spacing": "error",
  236. "semi": "error",
  237. "semi-spacing": "error",
  238. "semi-style": [
  239. "error",
  240. "last"
  241. ],
  242. "sort-imports": "error",
  243. "sort-keys": "off",
  244. "sort-vars": "off",
  245. "space-before-blocks": "error",
  246. "space-before-function-paren": [
  247. "error",
  248. "never"
  249. ],
  250. "space-in-parens": [
  251. "error",
  252. "never"
  253. ],
  254. "space-infix-ops": "error",
  255. "space-unary-ops": [
  256. "error",
  257. {
  258. "nonwords": false,
  259. "words": false
  260. }
  261. ],
  262. "spaced-comment": "off",
  263. "strict": "off",
  264. "switch-colon-spacing": "error",
  265. "symbol-description": "error",
  266. "template-curly-spacing": "error",
  267. "template-tag-spacing": "error",
  268. "unicode-bom": [
  269. "error",
  270. "never"
  271. ],
  272. "valid-jsdoc": "off",
  273. "vars-on-top": "off",
  274. "wrap-iife": "off",
  275. "wrap-regex": "off",
  276. "yield-star-spacing": "error",
  277. "yoda": "off"
  278. }
  279. };