.eslintrc.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. module.exports = {
  2. root: true,
  3. parserOptions: {
  4. parser: 'babel-eslint',
  5. sourceType: 'module'
  6. },
  7. // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
  8. extends: [
  9. 'standard',
  10. 'plugin:vue/recommended'
  11. ],
  12. // required to lint *.vue files
  13. plugins: [
  14. 'vue'
  15. ],
  16. // add your custom rules here
  17. rules: {
  18. // allow paren-less arrow functions
  19. 'arrow-parens': 0,
  20. // allow async-await
  21. 'generator-star-spacing': 0,
  22. // allow debugger during development
  23. 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  24. // Webpack 4 update commit, most of these probably should be fixed and removed in a separate MR
  25. // A lot of errors come from .vue files that are now properly linted
  26. 'vue/valid-v-if': 1,
  27. 'vue/use-v-on-exact': 1,
  28. 'vue/no-parsing-error': 1,
  29. 'vue/require-v-for-key': 1,
  30. 'vue/valid-v-for': 1,
  31. 'vue/require-prop-types': 1,
  32. 'vue/no-use-v-if-with-v-for': 1,
  33. 'indent': 1,
  34. 'import/first': 1,
  35. 'object-curly-spacing': 1,
  36. 'prefer-promise-reject-errors': 1,
  37. 'eol-last': 1,
  38. 'no-return-await': 1,
  39. 'no-multi-spaces': 1,
  40. 'no-trailing-spaces': 1,
  41. 'no-unused-expressions': 1,
  42. 'no-mixed-operators': 1,
  43. 'camelcase': 1,
  44. 'no-multiple-empty-lines': 1
  45. }
  46. }