.eslintrc.js 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. module.exports = {
  2. "env": {
  3. "browser": true,
  4. "es6": true,
  5. },
  6. "parserOptions": {
  7. "ecmaVersion": 8,
  8. },
  9. "plugins": [
  10. "eslint-plugin-html",
  11. "eslint-plugin-optional-comma-spacing",
  12. "eslint-plugin-one-variable-per-var",
  13. "eslint-plugin-require-trailing-comma",
  14. ],
  15. "extends": "eslint:recommended",
  16. "rules": {
  17. "no-alert": 2,
  18. "no-array-constructor": 2,
  19. "no-caller": 2,
  20. "no-catch-shadow": 2,
  21. "no-const-assign": 2,
  22. "no-eval": 2,
  23. "no-extend-native": 2,
  24. "no-extra-bind": 2,
  25. "no-implied-eval": 2,
  26. "no-inner-declarations": 0,
  27. "no-iterator": 2,
  28. "no-label-var": 2,
  29. "no-labels": 2,
  30. "no-lone-blocks": 0,
  31. "no-loop-func": 2,
  32. "no-multi-str": 2,
  33. "no-native-reassign": 2,
  34. "no-new": 2,
  35. "no-new-func": 2,
  36. "no-new-object": 2,
  37. "no-new-wrappers": 2,
  38. "no-octal-escape": 2,
  39. "no-process-exit": 2,
  40. "no-proto": 2,
  41. "no-return-assign": 2,
  42. "no-script-url": 2,
  43. "no-sequences": 2,
  44. "no-shadow-restricted-names": 2,
  45. "no-spaced-func": 2,
  46. "no-trailing-spaces": 2,
  47. "no-undef-init": 2,
  48. "no-unused-expressions": 2,
  49. "no-use-before-define": 0,
  50. "no-var": 2,
  51. "no-with": 2,
  52. "prefer-const": 2,
  53. "consistent-return": 2,
  54. "curly": [2, "all"],
  55. "no-extra-parens": [2, "functions"],
  56. "eqeqeq": 2,
  57. "new-cap": 2,
  58. "new-parens": 2,
  59. "semi-spacing": [2, {"before": false, "after": true}],
  60. "space-infix-ops": 2,
  61. "space-unary-ops": [2, { "words": true, "nonwords": false }],
  62. "yoda": [2, "never"],
  63. "brace-style": [2, "1tbs", { "allowSingleLine": false }],
  64. "camelcase": [0],
  65. "comma-spacing": 0,
  66. "comma-dangle": 0,
  67. "comma-style": [2, "last"],
  68. "optional-comma-spacing/optional-comma-spacing": [2, {"after": true}],
  69. "dot-notation": 0,
  70. "eol-last": [0],
  71. "global-strict": [0],
  72. "key-spacing": [0],
  73. "no-comma-dangle": [0],
  74. "no-irregular-whitespace": 2,
  75. "no-multi-spaces": [0],
  76. "no-obj-calls": 2,
  77. "no-redeclare": [0],
  78. "no-shadow": [0],
  79. "no-undef": [2],
  80. "no-unreachable": 2,
  81. "one-variable-per-var/one-variable-per-var": [2],
  82. "quotes": [2, "single"],
  83. "require-trailing-comma/require-trailing-comma": [2],
  84. "semi": [2, "always"],
  85. "strict": [2, "global"],
  86. "space-before-function-paren": [2, "never"],
  87. "keyword-spacing": [1, {"before": true, "after": true, "overrides": {}} ],
  88. },
  89. };