index.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. /*
  2. * IMPORTANT!
  3. * This file has been automatically generated,
  4. * in order to update its content execute "npm run update"
  5. */
  6. 'use strict'
  7. const plugin = {
  8. meta: require('./meta'),
  9. configs: {
  10. // eslintrc configs
  11. base: require('./configs/base'),
  12. essential: require('./configs/vue2-essential'),
  13. 'no-layout-rules': require('./configs/no-layout-rules'),
  14. recommended: require('./configs/vue2-recommended'),
  15. 'strongly-recommended': require('./configs/vue2-strongly-recommended'),
  16. 'vue3-essential': require('./configs/vue3-essential'),
  17. 'vue3-recommended': require('./configs/vue3-recommended'),
  18. 'vue3-strongly-recommended': require('./configs/vue3-strongly-recommended'),
  19. // flat configs
  20. 'flat/base': require('./configs/flat/base.js'),
  21. 'flat/vue2-essential': require('./configs/flat/vue2-essential.js'),
  22. 'flat/vue2-recommended': require('./configs/flat/vue2-recommended.js'),
  23. 'flat/vue2-strongly-recommended': require('./configs/flat/vue2-strongly-recommended.js'),
  24. // in flat configs, non-prefixed config is for Vue 3 (unlike eslintrc configs)
  25. 'flat/essential': require('./configs/flat/vue3-essential.js'),
  26. 'flat/recommended': require('./configs/flat/vue3-recommended.js'),
  27. 'flat/strongly-recommended': require('./configs/flat/vue3-strongly-recommended.js')
  28. },
  29. rules: {
  30. 'array-bracket-newline': require('./rules/array-bracket-newline'),
  31. 'array-bracket-spacing': require('./rules/array-bracket-spacing'),
  32. 'array-element-newline': require('./rules/array-element-newline'),
  33. 'arrow-spacing': require('./rules/arrow-spacing'),
  34. 'attribute-hyphenation': require('./rules/attribute-hyphenation'),
  35. 'attributes-order': require('./rules/attributes-order'),
  36. 'block-lang': require('./rules/block-lang'),
  37. 'block-order': require('./rules/block-order'),
  38. 'block-spacing': require('./rules/block-spacing'),
  39. 'block-tag-newline': require('./rules/block-tag-newline'),
  40. 'brace-style': require('./rules/brace-style'),
  41. camelcase: require('./rules/camelcase'),
  42. 'comma-dangle': require('./rules/comma-dangle'),
  43. 'comma-spacing': require('./rules/comma-spacing'),
  44. 'comma-style': require('./rules/comma-style'),
  45. 'comment-directive': require('./rules/comment-directive'),
  46. 'component-api-style': require('./rules/component-api-style'),
  47. 'component-definition-name-casing': require('./rules/component-definition-name-casing'),
  48. 'component-name-in-template-casing': require('./rules/component-name-in-template-casing'),
  49. 'component-options-name-casing': require('./rules/component-options-name-casing'),
  50. 'component-tags-order': require('./rules/component-tags-order'),
  51. 'custom-event-name-casing': require('./rules/custom-event-name-casing'),
  52. 'define-emits-declaration': require('./rules/define-emits-declaration'),
  53. 'define-macros-order': require('./rules/define-macros-order'),
  54. 'define-props-declaration': require('./rules/define-props-declaration'),
  55. 'dot-location': require('./rules/dot-location'),
  56. 'dot-notation': require('./rules/dot-notation'),
  57. 'enforce-style-attribute': require('./rules/enforce-style-attribute'),
  58. eqeqeq: require('./rules/eqeqeq'),
  59. 'first-attribute-linebreak': require('./rules/first-attribute-linebreak'),
  60. 'func-call-spacing': require('./rules/func-call-spacing'),
  61. 'html-button-has-type': require('./rules/html-button-has-type'),
  62. 'html-closing-bracket-newline': require('./rules/html-closing-bracket-newline'),
  63. 'html-closing-bracket-spacing': require('./rules/html-closing-bracket-spacing'),
  64. 'html-comment-content-newline': require('./rules/html-comment-content-newline'),
  65. 'html-comment-content-spacing': require('./rules/html-comment-content-spacing'),
  66. 'html-comment-indent': require('./rules/html-comment-indent'),
  67. 'html-end-tags': require('./rules/html-end-tags'),
  68. 'html-indent': require('./rules/html-indent'),
  69. 'html-quotes': require('./rules/html-quotes'),
  70. 'html-self-closing': require('./rules/html-self-closing'),
  71. 'jsx-uses-vars': require('./rules/jsx-uses-vars'),
  72. 'key-spacing': require('./rules/key-spacing'),
  73. 'keyword-spacing': require('./rules/keyword-spacing'),
  74. 'match-component-file-name': require('./rules/match-component-file-name'),
  75. 'match-component-import-name': require('./rules/match-component-import-name'),
  76. 'max-attributes-per-line': require('./rules/max-attributes-per-line'),
  77. 'max-len': require('./rules/max-len'),
  78. 'max-lines-per-block': require('./rules/max-lines-per-block'),
  79. 'max-props': require('./rules/max-props'),
  80. 'max-template-depth': require('./rules/max-template-depth'),
  81. 'multi-word-component-names': require('./rules/multi-word-component-names'),
  82. 'multiline-html-element-content-newline': require('./rules/multiline-html-element-content-newline'),
  83. 'multiline-ternary': require('./rules/multiline-ternary'),
  84. 'mustache-interpolation-spacing': require('./rules/mustache-interpolation-spacing'),
  85. 'new-line-between-multi-line-property': require('./rules/new-line-between-multi-line-property'),
  86. 'next-tick-style': require('./rules/next-tick-style'),
  87. 'no-arrow-functions-in-watch': require('./rules/no-arrow-functions-in-watch'),
  88. 'no-async-in-computed-properties': require('./rules/no-async-in-computed-properties'),
  89. 'no-bare-strings-in-template': require('./rules/no-bare-strings-in-template'),
  90. 'no-boolean-default': require('./rules/no-boolean-default'),
  91. 'no-child-content': require('./rules/no-child-content'),
  92. 'no-computed-properties-in-data': require('./rules/no-computed-properties-in-data'),
  93. 'no-console': require('./rules/no-console'),
  94. 'no-constant-condition': require('./rules/no-constant-condition'),
  95. 'no-custom-modifiers-on-v-model': require('./rules/no-custom-modifiers-on-v-model'),
  96. 'no-deprecated-data-object-declaration': require('./rules/no-deprecated-data-object-declaration'),
  97. 'no-deprecated-delete-set': require('./rules/no-deprecated-delete-set'),
  98. 'no-deprecated-destroyed-lifecycle': require('./rules/no-deprecated-destroyed-lifecycle'),
  99. 'no-deprecated-dollar-listeners-api': require('./rules/no-deprecated-dollar-listeners-api'),
  100. 'no-deprecated-dollar-scopedslots-api': require('./rules/no-deprecated-dollar-scopedslots-api'),
  101. 'no-deprecated-events-api': require('./rules/no-deprecated-events-api'),
  102. 'no-deprecated-filter': require('./rules/no-deprecated-filter'),
  103. 'no-deprecated-functional-template': require('./rules/no-deprecated-functional-template'),
  104. 'no-deprecated-html-element-is': require('./rules/no-deprecated-html-element-is'),
  105. 'no-deprecated-inline-template': require('./rules/no-deprecated-inline-template'),
  106. 'no-deprecated-model-definition': require('./rules/no-deprecated-model-definition'),
  107. 'no-deprecated-props-default-this': require('./rules/no-deprecated-props-default-this'),
  108. 'no-deprecated-router-link-tag-prop': require('./rules/no-deprecated-router-link-tag-prop'),
  109. 'no-deprecated-scope-attribute': require('./rules/no-deprecated-scope-attribute'),
  110. 'no-deprecated-slot-attribute': require('./rules/no-deprecated-slot-attribute'),
  111. 'no-deprecated-slot-scope-attribute': require('./rules/no-deprecated-slot-scope-attribute'),
  112. 'no-deprecated-v-bind-sync': require('./rules/no-deprecated-v-bind-sync'),
  113. 'no-deprecated-v-is': require('./rules/no-deprecated-v-is'),
  114. 'no-deprecated-v-on-native-modifier': require('./rules/no-deprecated-v-on-native-modifier'),
  115. 'no-deprecated-v-on-number-modifiers': require('./rules/no-deprecated-v-on-number-modifiers'),
  116. 'no-deprecated-vue-config-keycodes': require('./rules/no-deprecated-vue-config-keycodes'),
  117. 'no-dupe-keys': require('./rules/no-dupe-keys'),
  118. 'no-dupe-v-else-if': require('./rules/no-dupe-v-else-if'),
  119. 'no-duplicate-attr-inheritance': require('./rules/no-duplicate-attr-inheritance'),
  120. 'no-duplicate-attributes': require('./rules/no-duplicate-attributes'),
  121. 'no-empty-component-block': require('./rules/no-empty-component-block'),
  122. 'no-empty-pattern': require('./rules/no-empty-pattern'),
  123. 'no-export-in-script-setup': require('./rules/no-export-in-script-setup'),
  124. 'no-expose-after-await': require('./rules/no-expose-after-await'),
  125. 'no-extra-parens': require('./rules/no-extra-parens'),
  126. 'no-invalid-model-keys': require('./rules/no-invalid-model-keys'),
  127. 'no-irregular-whitespace': require('./rules/no-irregular-whitespace'),
  128. 'no-lifecycle-after-await': require('./rules/no-lifecycle-after-await'),
  129. 'no-lone-template': require('./rules/no-lone-template'),
  130. 'no-loss-of-precision': require('./rules/no-loss-of-precision'),
  131. 'no-multi-spaces': require('./rules/no-multi-spaces'),
  132. 'no-multiple-objects-in-class': require('./rules/no-multiple-objects-in-class'),
  133. 'no-multiple-slot-args': require('./rules/no-multiple-slot-args'),
  134. 'no-multiple-template-root': require('./rules/no-multiple-template-root'),
  135. 'no-mutating-props': require('./rules/no-mutating-props'),
  136. 'no-parsing-error': require('./rules/no-parsing-error'),
  137. 'no-potential-component-option-typo': require('./rules/no-potential-component-option-typo'),
  138. 'no-ref-as-operand': require('./rules/no-ref-as-operand'),
  139. 'no-ref-object-destructure': require('./rules/no-ref-object-destructure'),
  140. 'no-ref-object-reactivity-loss': require('./rules/no-ref-object-reactivity-loss'),
  141. 'no-required-prop-with-default': require('./rules/no-required-prop-with-default'),
  142. 'no-reserved-component-names': require('./rules/no-reserved-component-names'),
  143. 'no-reserved-keys': require('./rules/no-reserved-keys'),
  144. 'no-reserved-props': require('./rules/no-reserved-props'),
  145. 'no-restricted-block': require('./rules/no-restricted-block'),
  146. 'no-restricted-call-after-await': require('./rules/no-restricted-call-after-await'),
  147. 'no-restricted-class': require('./rules/no-restricted-class'),
  148. 'no-restricted-component-names': require('./rules/no-restricted-component-names'),
  149. 'no-restricted-component-options': require('./rules/no-restricted-component-options'),
  150. 'no-restricted-custom-event': require('./rules/no-restricted-custom-event'),
  151. 'no-restricted-html-elements': require('./rules/no-restricted-html-elements'),
  152. 'no-restricted-props': require('./rules/no-restricted-props'),
  153. 'no-restricted-static-attribute': require('./rules/no-restricted-static-attribute'),
  154. 'no-restricted-syntax': require('./rules/no-restricted-syntax'),
  155. 'no-restricted-v-bind': require('./rules/no-restricted-v-bind'),
  156. 'no-restricted-v-on': require('./rules/no-restricted-v-on'),
  157. 'no-root-v-if': require('./rules/no-root-v-if'),
  158. 'no-setup-props-destructure': require('./rules/no-setup-props-destructure'),
  159. 'no-setup-props-reactivity-loss': require('./rules/no-setup-props-reactivity-loss'),
  160. 'no-shared-component-data': require('./rules/no-shared-component-data'),
  161. 'no-side-effects-in-computed-properties': require('./rules/no-side-effects-in-computed-properties'),
  162. 'no-spaces-around-equal-signs-in-attribute': require('./rules/no-spaces-around-equal-signs-in-attribute'),
  163. 'no-sparse-arrays': require('./rules/no-sparse-arrays'),
  164. 'no-static-inline-styles': require('./rules/no-static-inline-styles'),
  165. 'no-template-key': require('./rules/no-template-key'),
  166. 'no-template-shadow': require('./rules/no-template-shadow'),
  167. 'no-template-target-blank': require('./rules/no-template-target-blank'),
  168. 'no-textarea-mustache': require('./rules/no-textarea-mustache'),
  169. 'no-this-in-before-route-enter': require('./rules/no-this-in-before-route-enter'),
  170. 'no-undef-components': require('./rules/no-undef-components'),
  171. 'no-undef-properties': require('./rules/no-undef-properties'),
  172. 'no-unsupported-features': require('./rules/no-unsupported-features'),
  173. 'no-unused-components': require('./rules/no-unused-components'),
  174. 'no-unused-emit-declarations': require('./rules/no-unused-emit-declarations'),
  175. 'no-unused-properties': require('./rules/no-unused-properties'),
  176. 'no-unused-refs': require('./rules/no-unused-refs'),
  177. 'no-unused-vars': require('./rules/no-unused-vars'),
  178. 'no-use-computed-property-like-method': require('./rules/no-use-computed-property-like-method'),
  179. 'no-use-v-else-with-v-for': require('./rules/no-use-v-else-with-v-for'),
  180. 'no-use-v-if-with-v-for': require('./rules/no-use-v-if-with-v-for'),
  181. 'no-useless-concat': require('./rules/no-useless-concat'),
  182. 'no-useless-mustaches': require('./rules/no-useless-mustaches'),
  183. 'no-useless-template-attributes': require('./rules/no-useless-template-attributes'),
  184. 'no-useless-v-bind': require('./rules/no-useless-v-bind'),
  185. 'no-v-for-template-key-on-child': require('./rules/no-v-for-template-key-on-child'),
  186. 'no-v-for-template-key': require('./rules/no-v-for-template-key'),
  187. 'no-v-html': require('./rules/no-v-html'),
  188. 'no-v-model-argument': require('./rules/no-v-model-argument'),
  189. 'no-v-text-v-html-on-component': require('./rules/no-v-text-v-html-on-component'),
  190. 'no-v-text': require('./rules/no-v-text'),
  191. 'no-watch-after-await': require('./rules/no-watch-after-await'),
  192. 'object-curly-newline': require('./rules/object-curly-newline'),
  193. 'object-curly-spacing': require('./rules/object-curly-spacing'),
  194. 'object-property-newline': require('./rules/object-property-newline'),
  195. 'object-shorthand': require('./rules/object-shorthand'),
  196. 'one-component-per-file': require('./rules/one-component-per-file'),
  197. 'operator-linebreak': require('./rules/operator-linebreak'),
  198. 'order-in-components': require('./rules/order-in-components'),
  199. 'padding-line-between-blocks': require('./rules/padding-line-between-blocks'),
  200. 'padding-line-between-tags': require('./rules/padding-line-between-tags'),
  201. 'padding-lines-in-component-definition': require('./rules/padding-lines-in-component-definition'),
  202. 'prefer-define-options': require('./rules/prefer-define-options'),
  203. 'prefer-import-from-vue': require('./rules/prefer-import-from-vue'),
  204. 'prefer-prop-type-boolean-first': require('./rules/prefer-prop-type-boolean-first'),
  205. 'prefer-separate-static-class': require('./rules/prefer-separate-static-class'),
  206. 'prefer-template': require('./rules/prefer-template'),
  207. 'prefer-true-attribute-shorthand': require('./rules/prefer-true-attribute-shorthand'),
  208. 'prop-name-casing': require('./rules/prop-name-casing'),
  209. 'quote-props': require('./rules/quote-props'),
  210. 'require-component-is': require('./rules/require-component-is'),
  211. 'require-default-export': require('./rules/require-default-export'),
  212. 'require-default-prop': require('./rules/require-default-prop'),
  213. 'require-direct-export': require('./rules/require-direct-export'),
  214. 'require-emit-validator': require('./rules/require-emit-validator'),
  215. 'require-explicit-emits': require('./rules/require-explicit-emits'),
  216. 'require-explicit-slots': require('./rules/require-explicit-slots'),
  217. 'require-expose': require('./rules/require-expose'),
  218. 'require-macro-variable-name': require('./rules/require-macro-variable-name'),
  219. 'require-name-property': require('./rules/require-name-property'),
  220. 'require-prop-comment': require('./rules/require-prop-comment'),
  221. 'require-prop-type-constructor': require('./rules/require-prop-type-constructor'),
  222. 'require-prop-types': require('./rules/require-prop-types'),
  223. 'require-render-return': require('./rules/require-render-return'),
  224. 'require-slots-as-functions': require('./rules/require-slots-as-functions'),
  225. 'require-toggle-inside-transition': require('./rules/require-toggle-inside-transition'),
  226. 'require-typed-object-prop': require('./rules/require-typed-object-prop'),
  227. 'require-typed-ref': require('./rules/require-typed-ref'),
  228. 'require-v-for-key': require('./rules/require-v-for-key'),
  229. 'require-valid-default-prop': require('./rules/require-valid-default-prop'),
  230. 'return-in-computed-property': require('./rules/return-in-computed-property'),
  231. 'return-in-emits-validator': require('./rules/return-in-emits-validator'),
  232. 'script-indent': require('./rules/script-indent'),
  233. 'script-setup-uses-vars': require('./rules/script-setup-uses-vars'),
  234. 'singleline-html-element-content-newline': require('./rules/singleline-html-element-content-newline'),
  235. 'sort-keys': require('./rules/sort-keys'),
  236. 'space-in-parens': require('./rules/space-in-parens'),
  237. 'space-infix-ops': require('./rules/space-infix-ops'),
  238. 'space-unary-ops': require('./rules/space-unary-ops'),
  239. 'static-class-names-order': require('./rules/static-class-names-order'),
  240. 'template-curly-spacing': require('./rules/template-curly-spacing'),
  241. 'this-in-template': require('./rules/this-in-template'),
  242. 'use-v-on-exact': require('./rules/use-v-on-exact'),
  243. 'v-bind-style': require('./rules/v-bind-style'),
  244. 'v-for-delimiter-style': require('./rules/v-for-delimiter-style'),
  245. 'v-if-else-key': require('./rules/v-if-else-key'),
  246. 'v-on-event-hyphenation': require('./rules/v-on-event-hyphenation'),
  247. 'v-on-function-call': require('./rules/v-on-function-call'),
  248. 'v-on-handler-style': require('./rules/v-on-handler-style'),
  249. 'v-on-style': require('./rules/v-on-style'),
  250. 'v-slot-style': require('./rules/v-slot-style'),
  251. 'valid-attribute-name': require('./rules/valid-attribute-name'),
  252. 'valid-define-emits': require('./rules/valid-define-emits'),
  253. 'valid-define-options': require('./rules/valid-define-options'),
  254. 'valid-define-props': require('./rules/valid-define-props'),
  255. 'valid-model-definition': require('./rules/valid-model-definition'),
  256. 'valid-next-tick': require('./rules/valid-next-tick'),
  257. 'valid-template-root': require('./rules/valid-template-root'),
  258. 'valid-v-bind-sync': require('./rules/valid-v-bind-sync'),
  259. 'valid-v-bind': require('./rules/valid-v-bind'),
  260. 'valid-v-cloak': require('./rules/valid-v-cloak'),
  261. 'valid-v-else-if': require('./rules/valid-v-else-if'),
  262. 'valid-v-else': require('./rules/valid-v-else'),
  263. 'valid-v-for': require('./rules/valid-v-for'),
  264. 'valid-v-html': require('./rules/valid-v-html'),
  265. 'valid-v-if': require('./rules/valid-v-if'),
  266. 'valid-v-is': require('./rules/valid-v-is'),
  267. 'valid-v-memo': require('./rules/valid-v-memo'),
  268. 'valid-v-model': require('./rules/valid-v-model'),
  269. 'valid-v-on': require('./rules/valid-v-on'),
  270. 'valid-v-once': require('./rules/valid-v-once'),
  271. 'valid-v-pre': require('./rules/valid-v-pre'),
  272. 'valid-v-show': require('./rules/valid-v-show'),
  273. 'valid-v-slot': require('./rules/valid-v-slot'),
  274. 'valid-v-text': require('./rules/valid-v-text')
  275. },
  276. processors: {
  277. '.vue': require('./processor'),
  278. vue: require('./processor')
  279. },
  280. environments: {
  281. // TODO Remove in the next major version
  282. /** @deprecated */
  283. 'setup-compiler-macros': {
  284. globals: {
  285. defineProps: 'readonly',
  286. defineEmits: 'readonly',
  287. defineExpose: 'readonly',
  288. withDefaults: 'readonly'
  289. }
  290. }
  291. }
  292. }
  293. module.exports = plugin