元气智驾官网后台前端页面
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

201 行
5.2 KiB

  1. module.exports = {
  2. root: true,
  3. parserOptions: {
  4. parser: 'babel-eslint',
  5. sourceType: 'module'
  6. },
  7. env: {
  8. browser: true,
  9. node: true,
  10. es6: true,
  11. },
  12. extends: ['plugin:vue/recommended', 'eslint:recommended'],
  13. // add your custom rules here
  14. //it is base on https://github.com/vuejs/eslint-config-vue
  15. rules: {
  16. 'vue/html-closing-bracket-spacing': 'off',
  17. 'vue/no-multi-spaces': 'off',
  18. 'no-useless-catch': 'off',
  19. 'vue/require-default-prop': 'off',
  20. 'vue/require-prop-types': 'off',
  21. 'vue/html-self-closing': "off",
  22. "vue/max-attributes-per-line": "off",
  23. "vue/attributes-order": "off",
  24. "vue/html-indent": "off",
  25. "vue/html-quotes": "off",
  26. "vue/html-closing-bracket-newline": "off",
  27. "vue/singleline-html-element-content-newline": "off",
  28. "vue/multiline-html-element-content-newline":"off",
  29. "vue/name-property-casing": ["error", "PascalCase"],
  30. "vue/no-v-html": "off",
  31. 'accessor-pairs': 2,
  32. 'arrow-spacing': [2, {
  33. 'before': true,
  34. 'after': true
  35. }],
  36. 'block-spacing': [2, 'always'],
  37. 'brace-style': [2, '1tbs', {
  38. 'allowSingleLine': true
  39. }],
  40. 'camelcase': [0, {
  41. 'properties': 'always'
  42. }],
  43. 'comma-dangle': [2, 'never'],
  44. 'comma-spacing': [2, {
  45. 'before': false,
  46. 'after': true
  47. }],
  48. 'comma-style': [2, 'last'],
  49. 'constructor-super': 2,
  50. 'curly': [2, 'multi-line'],
  51. 'dot-location': [2, 'property'],
  52. 'eol-last': 2,
  53. 'eqeqeq': ["error", "always", {"null": "ignore"}],
  54. 'generator-star-spacing': [2, {
  55. 'before': true,
  56. 'after': true
  57. }],
  58. 'handle-callback-err': [2, '^(err|error)$'],
  59. /* 'indent': [2, 2, {
  60. 'SwitchCase': 1
  61. }], */
  62. 'indent': "off",
  63. 'jsx-quotes': [2, 'prefer-single'],
  64. 'key-spacing': [2, {
  65. 'beforeColon': false,
  66. 'afterColon': true
  67. }],
  68. 'keyword-spacing': [2, {
  69. 'before': true,
  70. 'after': true
  71. }],
  72. 'new-cap': [2, {
  73. 'newIsCap': true,
  74. 'capIsNew': false
  75. }],
  76. 'new-parens': 2,
  77. 'no-array-constructor': 2,
  78. 'no-caller': 2,
  79. 'no-console': 'off',
  80. 'no-class-assign': 2,
  81. 'no-cond-assign': 2,
  82. 'no-const-assign': 2,
  83. 'no-control-regex': 0,
  84. 'no-delete-var': 2,
  85. 'no-dupe-args': 2,
  86. 'no-dupe-class-members': 2,
  87. 'no-dupe-keys': 2,
  88. 'no-duplicate-case': 2,
  89. 'no-empty-character-class': 2,
  90. 'no-empty-pattern': 2,
  91. 'no-eval': 2,
  92. 'no-ex-assign': 2,
  93. 'no-extend-native': 2,
  94. 'no-extra-bind': 2,
  95. 'no-extra-boolean-cast': 2,
  96. 'no-extra-parens': [2, 'functions'],
  97. 'no-fallthrough': 2,
  98. 'no-floating-decimal': 2,
  99. 'no-func-assign': 2,
  100. 'no-implied-eval': 2,
  101. 'no-inner-declarations': [2, 'functions'],
  102. 'no-invalid-regexp': 2,
  103. 'no-irregular-whitespace': 2,
  104. 'no-iterator': 2,
  105. 'no-label-var': 2,
  106. 'no-labels': [2, {
  107. 'allowLoop': false,
  108. 'allowSwitch': false
  109. }],
  110. 'no-lone-blocks': 2,
  111. 'no-mixed-spaces-and-tabs': 2,
  112. 'no-multi-spaces': 2,
  113. 'no-multi-str': 2,
  114. 'no-multiple-empty-lines': [2, {
  115. 'max': 1
  116. }],
  117. 'no-native-reassign': 2,
  118. 'no-negated-in-lhs': 2,
  119. 'no-new-object': 2,
  120. 'no-new-require': 2,
  121. 'no-new-symbol': 2,
  122. 'no-new-wrappers': 2,
  123. 'no-obj-calls': 2,
  124. 'no-octal': 2,
  125. 'no-octal-escape': 2,
  126. 'no-path-concat': 2,
  127. 'no-proto': 2,
  128. 'no-redeclare': 2,
  129. 'no-regex-spaces': 2,
  130. 'no-return-assign': [2, 'except-parens'],
  131. 'no-self-assign': 2,
  132. 'no-self-compare': 2,
  133. 'no-sequences': 2,
  134. 'no-shadow-restricted-names': 2,
  135. 'no-spaced-func': 2,
  136. 'no-sparse-arrays': 2,
  137. 'no-this-before-super': 2,
  138. 'no-throw-literal': 2,
  139. 'no-trailing-spaces': 'off',
  140. 'no-undef': 2,
  141. 'no-undef-init': 2,
  142. 'no-unexpected-multiline': 2,
  143. 'no-unmodified-loop-condition': 2,
  144. 'no-unneeded-ternary': [2, {
  145. 'defaultAssignment': false
  146. }],
  147. 'no-unreachable': 2,
  148. 'no-unsafe-finally': 2,
  149. 'no-unused-vars': 0,
  150. 'no-useless-call': 2,
  151. 'no-useless-computed-key': 2,
  152. 'no-useless-constructor': 2,
  153. 'no-useless-escape': 0,
  154. 'no-whitespace-before-property': 2,
  155. 'no-with': 2,
  156. 'one-var': [2, {
  157. 'initialized': 'never'
  158. }],
  159. 'operator-linebreak': [2, 'after', {
  160. 'overrides': {
  161. '?': 'before',
  162. ':': 'before'
  163. }
  164. }],
  165. 'padded-blocks': [2, 'never'],
  166. 'quotes': [2, 'single', {
  167. 'avoidEscape': true,
  168. 'allowTemplateLiterals': true
  169. }],
  170. 'semi': [2, 'never'],
  171. 'semi-spacing': [2, {
  172. 'before': false,
  173. 'after': true
  174. }],
  175. 'space-before-blocks': [2, 'always'],
  176. 'space-before-function-paren': [2, 'never'],
  177. 'space-in-parens': [0, 'never'],
  178. 'space-infix-ops': 2,
  179. 'space-unary-ops': [2, {
  180. 'words': true,
  181. 'nonwords': false
  182. }],
  183. 'spaced-comment': [2, 'always', {
  184. 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
  185. }],
  186. 'template-curly-spacing': [2, 'never'],
  187. 'use-isnan': 2,
  188. 'valid-typeof': 2,
  189. 'wrap-iife': [2, 'any'],
  190. 'yield-star-spacing': [2, 'both'],
  191. 'yoda': [2, 'never'],
  192. 'prefer-const': 0,
  193. 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
  194. 'object-curly-spacing': [2, 'always', {
  195. objectsInObjects: false
  196. }],
  197. 'array-bracket-spacing': [2, 'never']
  198. }
  199. }