.eslintrc.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. },
  6. 'extends': [
  7. 'plugin:vue/strongly-recommended',
  8. '@vue/standard',
  9. ],
  10. rules: {
  11. 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  12. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  13. 'comma-dangle': ['error', 'always-multiline'],
  14. 'space-before-function-paren': [
  15. 'error',
  16. {
  17. anonymous: 'always',
  18. named: 'never',
  19. asyncArrow: 'always',
  20. },
  21. ],
  22. 'eqeqeq': ['warn'],
  23. 'no-eval': ['warn'],
  24. 'vue/require-component-is': 'never',
  25. 'vue/no-parsing-error': [
  26. 2,
  27. {
  28. 'x-invalid-end-tag': false,
  29. },
  30. ],
  31. 'vue/max-attributes-per-line': [
  32. 'error', {
  33. 'singleline': 3,
  34. 'multiline': {
  35. 'max': 1,
  36. 'allowFirstLine': false,
  37. },
  38. },
  39. ],
  40. 'vue/html-closing-bracket-spacing': [
  41. 'error',
  42. {
  43. 'selfClosingTag': 'never',
  44. },
  45. ],
  46. 'vue/singleline-html-element-content-newline': 'off',
  47. 'vue/require-default-prop': 'off',
  48. },
  49. parserOptions: {
  50. parser: 'babel-eslint',
  51. },
  52. }