.eslintrc.js 2.7 KB

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