.eslintrc.js 583 B

123456789101112131415161718192021222324
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. },
  6. extends: ['plugin:vue/essential', 'eslint:recommended'],
  7. parserOptions: {
  8. parser: 'babel-eslint',
  9. },
  10. rules: {
  11. 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  12. 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
  13. //在rules中添加自定义规则
  14. 'vue/multi-word-component-names': 'off',
  15. },
  16. overrides: [
  17. {
  18. files: ['**/__tests__/*.{j,t}s?(x)', '**/tests/unit/**/*.spec.{j,t}s?(x)'],
  19. env: {
  20. jest: true,
  21. },
  22. },
  23. ],
  24. };