.eslintrc.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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': 'off',
  12. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  13. 'generator-star-spacing': 'off',
  14. 'no-mixed-operators': 0,
  15. 'space-before-function-paren': 0,
  16. 'vue/max-attributes-per-line': [
  17. 2,
  18. {
  19. 'singleline': 5,
  20. 'multiline': {
  21. 'max': 1,
  22. 'allowFirstLine': false
  23. }
  24. }
  25. ],
  26. 'vue/max-attributes-per-line': 0,
  27. 'vue/attribute-hyphenation': 0,
  28. 'vue/html-self-closing': 0,
  29. 'vue/component-name-in-template-casing': 0,
  30. 'vue/html-closing-bracket-spacing': 0,
  31. 'vue/singleline-html-element-content-newline': 0,
  32. 'vue/no-unused-components': 0,
  33. 'vue/multiline-html-element-content-newline': 0,
  34. 'vue/no-use-v-if-with-v-for': 0,
  35. 'vue/html-closing-bracket-newline': 0,
  36. 'vue/no-parsing-error': 0,
  37. 'no-tabs': 0,
  38. 'spaced-comment': 0,
  39. 'quotes': [
  40. 0,
  41. 'single',
  42. {
  43. 'avoidEscape': true,
  44. 'allowTemplateLiterals': true
  45. }
  46. ],
  47. 'semi': [
  48. 0,
  49. 'never',
  50. {
  51. 'beforeStatementContinuationChars': 'never'
  52. }
  53. ],
  54. 'comma-dangle': 0,
  55. 'no-delete-var': 2,
  56. 'prefer-const': [
  57. 2,
  58. {
  59. 'ignoreReadBeforeAssign': false
  60. }
  61. ],
  62. 'template-curly-spacing': 'off',
  63. 'indent': 'off'
  64. },
  65. parserOptions: {
  66. parser: 'babel-eslint'
  67. },
  68. overrides: [
  69. {
  70. files: [
  71. '**/__tests__/*.{j,t}s?(x)',
  72. '**/tests/unit/**/*.spec.{j,t}s?(x)'
  73. ],
  74. env: {
  75. jest: true
  76. }
  77. }
  78. ]
  79. }