.eslintrc.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. module.exports = {
  2. root: true,
  3. parserOptions: {
  4. sourceType: 'module'
  5. },
  6. parser: 'vue-eslint-parser',
  7. env: {
  8. browser: true,
  9. node: true,
  10. es6: true,
  11. },
  12. rules: {
  13. 'no-console': 'off',
  14. "no-unused-vars":"off", //重要 var 变量为引入
  15. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  16. 'generator-star-spacing': 'off',
  17. 'no-mixed-operators': 0,
  18. // 'vue/max-attributes-per-line': [
  19. // 2,
  20. // {
  21. // 'singleline': 10,
  22. // 'multiline': {
  23. // 'max': 1,
  24. // 'allowFirstLine': false
  25. // }
  26. // }
  27. // ],
  28. 'vue/attribute-hyphenation': 0,
  29. 'vue/html-self-closing': 0,
  30. 'vue/component-name-in-template-casing': 0,
  31. 'vue/html-closing-bracket-spacing': 0,
  32. 'vue/singleline-html-element-content-newline': 0,
  33. 'vue/no-unused-components': 0,
  34. 'vue/multiline-html-element-content-newline': 0,
  35. 'vue/no-use-v-if-with-v-for': 0,
  36. 'vue/html-closing-bracket-newline': 0,
  37. 'vue/no-parsing-error': 0,
  38. 'no-tabs': 0,
  39. 'quotes': 0,
  40. 'semi': 0,
  41. 'no-delete-var': 2,
  42. 'prefer-const': 0,
  43. 'template-curly-spacing': 'off',
  44. //'indent': 'off',
  45. 'indent': ["off", 2]
  46. },
  47. overrides: [
  48. {
  49. files: [
  50. '**/__tests__/*.{j,t}s?(x)',
  51. '**/tests/unit/**/*.spec.{j,t}s?(x)'
  52. ],
  53. env: {
  54. jest: true
  55. }
  56. }
  57. ]
  58. }