.eslintrc.js 6.9 KB

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