.eslintrc.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* global module */
  2. module.exports = {
  3. 'env': {
  4. 'browser': true,
  5. 'es6': true,
  6. },
  7. 'parserOptions': {
  8. 'sourceType': 'module',
  9. 'ecmaVersion': 9,
  10. 'ecmaFeatures': {
  11. 'jsx': true,
  12. },
  13. },
  14. 'plugins': [
  15. 'eslint-plugin-html',
  16. 'eslint-plugin-optional-comma-spacing',
  17. 'eslint-plugin-one-variable-per-var',
  18. 'eslint-plugin-require-trailing-comma',
  19. ],
  20. 'extends': 'eslint:recommended',
  21. 'rules': {
  22. 'no-alert': 2,
  23. 'no-array-constructor': 2,
  24. 'no-caller': 2,
  25. 'no-catch-shadow': 2,
  26. 'no-const-assign': 2,
  27. 'no-eval': 2,
  28. 'no-extend-native': 2,
  29. 'no-extra-bind': 2,
  30. 'no-implied-eval': 2,
  31. 'no-inner-declarations': 0,
  32. 'no-iterator': 2,
  33. 'no-label-var': 2,
  34. 'no-labels': 2,
  35. 'no-lone-blocks': 0,
  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. 'prefer-object-spread': 2,
  59. 'consistent-return': 2,
  60. 'curly': [2, 'all'],
  61. 'no-extra-parens': [2, 'functions'],
  62. 'eqeqeq': 2,
  63. 'new-cap': 2,
  64. 'new-parens': 2,
  65. 'semi-spacing': [2, {'before': false, 'after': true}],
  66. 'space-infix-ops': 2,
  67. 'space-unary-ops': [2, { 'words': true, 'nonwords': false }],
  68. 'yoda': [2, 'never'],
  69. 'brace-style': [2, '1tbs', { 'allowSingleLine': false }],
  70. 'camelcase': [0],
  71. 'comma-spacing': 0,
  72. 'comma-dangle': 0,
  73. 'comma-style': [2, 'last'],
  74. 'optional-comma-spacing/optional-comma-spacing': [2, {'after': true}],
  75. 'dot-notation': 0,
  76. 'eol-last': [0],
  77. 'global-strict': [0],
  78. 'key-spacing': [0],
  79. 'no-comma-dangle': [0],
  80. 'no-irregular-whitespace': 2,
  81. 'no-multi-spaces': [0],
  82. 'no-loop-func': 0,
  83. 'no-obj-calls': 2,
  84. 'no-redeclare': [0],
  85. 'no-shadow': [0],
  86. 'no-undef': [2],
  87. 'no-unreachable': 2,
  88. 'one-variable-per-var/one-variable-per-var': [2],
  89. 'quotes': [2, 'single'],
  90. 'require-atomic-updates': 0,
  91. 'require-trailing-comma/require-trailing-comma': [2],
  92. 'require-yield': 0,
  93. 'semi': [2, 'always'],
  94. 'strict': [2, 'global'],
  95. 'space-before-function-paren': [2, 'never'],
  96. 'keyword-spacing': [1, {'before': true, 'after': true, 'overrides': {}} ],
  97. },
  98. 'overrides': [
  99. {
  100. 'files': [
  101. 'Gruntfile.js',
  102. 'fix.js',
  103. ],
  104. 'parserOptions': {
  105. 'sourceType': 'script',
  106. },
  107. },
  108. ],
  109. };