天波用户运营管理后台系统
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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