微小悟公众号管理系统

.eslintrc.js 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. module.exports = {
  2. root: true,
  3. env: {
  4. node: true,
  5. },
  6. extends: [
  7. 'plugin:vue/essential',
  8. '@vue/airbnb',
  9. ],
  10. rules: {
  11. // don't require .vue extension when importing
  12. 'import/extensions': ['error', 'always', {
  13. js: 'never',
  14. vue: 'never'
  15. }],
  16. // disallow reassignment of function parameters
  17. // disallow parameter object manipulation except for specific exclusions
  18. 'no-param-reassign': ['error', {
  19. props: true,
  20. ignorePropertyModificationsFor: [
  21. 'state', // for vuex state
  22. 'acc', // for reduce accumulators
  23. 'e' // for e.returnvalue
  24. ]
  25. }],
  26. // allow optionalDependencies
  27. 'import/no-extraneous-dependencies': ['error', {
  28. optionalDependencies: ['test/unit/index.js']
  29. }],
  30. 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  31. 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
  32. 'no-tabs': 0,
  33. 'semi': 0,
  34. "no-restricted-imports": 0,
  35. 'arrow-parens': 0,
  36. 'no-console': 0,
  37. 'import/prefer-default-export': 0,
  38. 'no-restricted-syntax': 0,
  39. 'no-loop-func': 0,
  40. 'no-plusplus': 0,
  41. 'no-continue': 0,
  42. 'quote-props': 0,
  43. 'no-nested-ternary': 0,
  44. 'import/first': 0,
  45. "max-len": [2, 256, 4, {"ignoreUrls": true}],
  46. "prefer-destructuring": [0],
  47. "no-alert": 0,
  48. "linebreak-style": 0,
  49. "no-param-reassign": 0,
  50. "no-multi-assign": 0,
  51. "vue/no-parsing-error": 0,
  52. "import/no-extraneous-dependencies": 0,
  53. "import/no-unresolved": 0,
  54. "import/extensions": 0,
  55. "no-unused-vars": 0,
  56. "prefer-const": 0,
  57. "no-lonely-if": 0,
  58. },
  59. parserOptions: {
  60. parser: 'babel-eslint',
  61. },
  62. };