Skip to content

Releases: vuejs/eslint-plugin-vue

v7.0.0-alpha.8

30 Jun 07:25
Compare
Choose a tag to compare
v7.0.0-alpha.8 Pre-release
Pre-release

🐛 Bug Fixes

  • #1226 #1227 Fixed crash in the vue/no-side-effects-in-computed-properties, vue/no-async-in-computed-properties, vue/no-setup-props-destructure and vue/no-watch-after-await rules.

All commits: v7.0.0-alpha.7 -> v7.0.0-alpha.8

v7.0.0-alpha.7

27 Jun 23:07
Compare
Choose a tag to compare
v7.0.0-alpha.7 Pre-release
Pre-release

💥 Breaking Changes

  • Updated presets configs.
    • Changed plugin:vue/vue3-essential config
      • #1211 Added vue/no-deprecated-destroyed-lifecycle rule.
    • Changed plugin:vue/vue3-strongly-recommended config
      • Same changes as above.
    • Changed plugin:vue/vue3-recommended config
      • Same changes as above.
  • #1107 Changed the default order option for vue/order-in-components rule. Add Nuxt and Vue Router properties.
    • Add options for Vue Router
      • ROUTER_GUARDS (beforeRouteEnter, beforeRouteUpdate and beforeRouteLeave) to after ["provide", "inject"].
    • Add options for Nuxt
      • key to after name.
      • layout, middleware, validate, scrollToTop, transition, loading to after ROUTER_GUARDS (ROUTER_GUARDS was added after ["provide", "inject"]).
      • watchQuery to after watch.
    • Change options for Nuxt
      • head move from after methods to after data .
  • #1214 Change the option name in the vue/no-bare-strings-in-template rule.

✨ Enhancements

New Rules:

  • #1211 Added vue/no-deprecated-destroyed-lifecycle rule reports use of deprecated destroyed and beforeDestroy lifecycle hooks.
  • #1213 Added vue/no-restricted-component-options rule that disallow specific component options.
  • #1218 Added vue/no-multiple-objects-in-class rule disallows to pass multiple objects into array to class.
  • #1222 Added vue/no-empty-component-block rule disallows the <template> <script> <style> block to be empty.

Other changes in Rules:

  • #1204 Added ignoreIncludesComment option to vue/v-on-function-call rule.
  • #1017 Added supports for ES2020 syntaxes to vue/html-indent and vue/script-indent rules.
  • #1212 Added "v-model-argument" and "v-model-custom-modifiers" to the syntax checked by the vue/no-unsupported-features rule.

🐛 Bug Fixes

  • #1204 Fixed wrong autofix in vue/v-on-function-call rule.
  • #1208 Fixed false negatives for TemplateLiteral in vue/prop-name-casing rule.
  • #1206 Fixed crash when is attribute with no value in vue/no-unused-components rule.

⚙️ Chores

  • #1206 Added JSDoc type checking with TypeScript, and refactoring.

All commits: v7.0.0-alpha.6 -> v7.0.0-alpha.7

v7.0.0-alpha.6

07 Jun 10:31
Compare
Choose a tag to compare
v7.0.0-alpha.6 Pre-release
Pre-release

💥 Breaking Changes

  • Updated presets configs.
    • Changed plugin:vue/vue3-essential config
      • #1177 Added vue/no-deprecated-dollar-scopedslots-api rule.
      • #1178 Added vue/require-slots-as-functions rule.
    • Changed plugin:vue/vue3-strongly-recommended config
      • Same changes as above.
    • Changed plugin:vue/vue3-recommended config
      • Same changes as above.
      • #1179 Added vue/no-multiple-slot-args rule.
    • Changed plugin:vue/recommended config
      • #1179 Added vue/no-multiple-slot-args rule.
  • #1189 Changed the default order option for vue/component-tags-order rule.
  • #1181 Changed the default order option for vue/order-in-components rule.
    • Add options for Vue.js 3.x
      • emits to after props.
      • setup to after emits.
      • beforeUnmount and unmounted to LIFECYCLE_HOOKS.
      • renderTracked and renderTriggered to LIFECYCLE_HOOKS.
    • Add options for Vue.js 2.x
      • provide and inject to after mixins.
      • errorCaptured to LIFECYCLE_HOOKS.

✨ Enhancements

New Rules:

  • #1177 Added vue/no-deprecated-dollar-scopedslots-api rule that reports use of deprecated $scopedSlots. RFC0006
  • #1178 Added vue/require-slots-as-functions rule enforces the properties of $slots to be used as a function. RFC0006
  • #1179 Added vue/no-multiple-slot-args rule disallows to pass multiple arguments to scoped slots.
  • #1185 Added vue/no-bare-strings-in-template rule that disallows the use of bare strings in <template>.
  • #1186 Added vue/no-useless-v-bind rule that reports v-bind with a string literal value.
  • #1187 Added vue/no-useless-mustaches rule that reports mustache interpolation with a string literal value.
  • #1191 Added vue/no-restricted-v-bind rule that disallow specific argument in v-bind.
  • #1192 Added vue/no-restricted-static-attribute rule that disallow specific attribute.
  • #1193 Added vue/object-property-newline rule that applies object-property-newline rule to expressions in <template>.
  • #1194 Added vue/object-curly-newline rule that applies object-curly-newline rule to expressions in <template>.
  • #1200 Added vue/operator-linebreak rule that applies operator-linebreak rule to expressions in <template>.
  • #1201 Added vue/func-call-spacing rule that applies func-call-spacing rule to expressions in <template>.

Other changes in Rules:

  • #1180 Changed vue/no-ref-as-operand rule to additionally track variables generated by computed, toRef, customRef and shallowRef.
  • #1180 Changed vue/no-ref-as-operand rule to report incorrect use of TemplateLiteral and MemberExpression.
  • #1183 Improved autofix of vue/order-in-components rule to understand "Nullish Coalescing".
  • #1184 Changed to not report that a value is required when parsing error for vue/valid-v-bind-sync, vue/valid-v-bind, vue/valid-v-else-if, vue/valid-v-for, vue/valid-v-html, vue/valid-v-if, vue/valid-v-model, vue/valid-v-on, vue/valid-v-show, vue/valid-v-slot and vue/valid-v-text rules.
  • #1189 Changed vue/component-tags-order rule to allow name array to be specified with one order option.

🐛 Bug Fixes

  • #1190 Fixed false positives for getter/setter in vue/no-dupe-keys rule.
  • #1198 Fixed false positives for render props and template refs in vue/no-unused-properties rule.
  • #1199 Fixed false positives for Vue 3 functional component in vue/require-direct-export rule.

All commits: v7.0.0-alpha.5 -> v7.0.0-alpha.6

v7.0.0-alpha.5

30 May 03:49
Compare
Choose a tag to compare
v7.0.0-alpha.5 Pre-release
Pre-release

💥 Breaking Changes

  • Updated presets configs.
    • Changed plugin:vue/essential config and plugin:vue/vue3-essential config
      • #1166 Added vue/custom-event-name-casing rule
    • Changed plugin:vue/strongly-recommended config and plugin:vue/vue3-strongly-recommended config
      • Same changes as above.
    • Changed plugin:vue/recommended config and plugin:vue/vue3-recommended config
      • Same changes as above.

✨ Enhancements

Core:

  • #1167 Added reportUnusedDisableDirectives option to vue/comment-directive.

New Rules:

  • #1166 Added vue/custom-event-name-casing rule that enforces using kebab-case custom event names.
  • #1171 Added vue/no-useless-concat rule that applies no-useless-concat rule to expressions in <template>.
  • #1173 Added vue/dot-notation rule that applies dot-notation rule to expressions in <template>.

Other changes in Rules:

  • #1162 Added closeBracket.startTag, closeBracket.endTag and closeBracket.selfClosingTag options to vue/html-indent rule.
    So that the closeBracket offset value can be set for each tag type.
  • #1162 Changed vue/html-indent rule to calculate the base point of the indent offset of the closing bracket of the end tag by the start tag.

🐛 Bug Fixes

  • #1163 Fixed false negatives when using ignorePattern for vue/no-unused-var rule.
  • #1164 Fixed false negatives when v-for and v-slot mixed or use destructuring for vue/no-unused-var rule.
  • #1169 Fixed false positives for watch with properties in vue/no-unused-properties rule.
  • #1170 Fixed an error for v-slot in vue/comma-style rule.

All commits: v7.0.0-alpha.4 -> v7.0.0-alpha.5

v7.0.0-alpha.4

24 May 00:03
Compare
Choose a tag to compare
v7.0.0-alpha.4 Pre-release
Pre-release

💥 Breaking Changes

  • Updated presets configs.
    • Changed plugin:vue/essential config and plugin:vue/vue3-essential config
      • #1148 Added vue/no-mutating-props rule
      • #1156 Added vue/no-arrow-functions-in-watch rule.
    • Changed plugin:vue/strongly-recommended config and plugin:vue/vue3-strongly-recommended config
      • Same changes as above.
      • #1149 Added vue/one-component-per-file rule
    • Changed plugin:vue/recommended config and plugin:vue/vue3-recommended config
      • Same changes as above.

✨ Enhancements

Core:

  • #1152 Changed casing conversion logic to behave like Vue core logic.

New Rules:

  • #627 #1144 Added vue/no-duplicate-attr-inheritance rule that warn to apply inheritAttrs: false when it detects v-bind="$attrs" being used.
  • #871 #1145 Added vue/no-unused-properties rule that report unused properties.
  • #633 #1148 Added vue/no-mutating-props rule that reports mutation of component props.
  • #1140 Added vue/comma-spacing rule that applies comma-spacing rule to expressions in <template>.
  • #1141 Added vue/prefer-template rule that applies prefer-template rule to expressions in <template>.
  • #1142 Added vue/template-curly-spacing rule that applies template-curly-spacing rule to expressions in <template>.
  • #671 Added vue/one-component-per-file rule that checks if there is only one component per file.
  • #1072 Added vue/no-potential-property-typo rule that disallow a potential typo in your component options.
  • #1155 Added vue/no-arrow-functions-in-watch rule that disallow use an arrow function to define a watcher.
  • #1157 Added vue/space-in-parens rule that applies space-in-parens rule to expressions in <template>.
  • #1159 Added vue/comma-style rule that applies comma-style rule to expressions in <template>.
  • #1158 Added vue/no-extra-parens rule that applies no-extra-parens rule to expressions in <template>.

Other changes in Rules:

  • #1143 Changed vue/no-deprecated-dollar-listeners-api and vue/no-deprecated-events-api rules to track the this variable.
  • #1154 Changed vue/no-side-effects-in-computed-properties rule to track the this variable.
  • #1160 Changed vue/require-valid-default-prop rule to track the return statement in the function defined in default.
  • #1160 Changed vue/require-valid-default-prop rule to check BigInt.
  • #1160 Improved the location of reporting errors in vue/require-valid-default-prop rule.

🐛 Bug Fixes

  • #1139 Fixed false positives for target instance is given, in vue/no-lifecycle-after-await rule.
  • #1138 Fixed false positives for arrow function in vue/return-in-emits-validatorrule.
  • #1146 Fixed false positives for member call and autofix error in vue/v-on-function-call rule.
  • #1152 Fixed some casing issues.
  • #1154 #1283 Fixed false positives for spread elements in vue/no-side-effects-in-computed rule.

All commits: v7.0.0-alpha.3 -> v7.0.0-alpha.4

v7.0.0-alpha.3

17 May 01:05
Compare
Choose a tag to compare
v7.0.0-alpha.3 Pre-release
Pre-release

💥 Breaking Changes

  • Updated presets configs.
    • Changed plugin:vue/vue3-essential config.
    • Changed plugin:vue/vue3-strongly-recommended config.
    • Changed plugin:vue/vue3-recommended config.
      • #1129 Added vue/return-in-emits-validator rule.
      • #1130 Added vue/no-deprecated-v-on-native-modifier rule.
      • #1133 Added vue/no-deprecated-dollar-listeners-api rule.
  • #1120 Added the support of descriptions in directive comments.
  • #1120 Added the support for block-level directive comments.

✨ Enhancements

Core:

  • #1120 Added the support of descriptions in directive HTML comments.
  • #1120 Added the support for block-level directive HTML comments.

New Rules:

  • #1114 Added vue/no-unregistered-components rule that disallow using components that are not registered inside templates.
  • #1124 Added vue/require-explicit-emits rule that reports event triggers not declared with the emits option. RFC0030
  • #1129 Added vue/return-in-emits-validator rule enforces that a return statement is present in emits validators. RFC0030
  • #1130 Added vue/no-deprecated-v-on-native-modifier rule that reports use of deprecated .native modifier on v-on directive. RFC0031
  • #1133 Added vue/no-deprecated-dollar-listeners-api rule that reports use of deprecated $listeners. RFC0031
  • #755 Added vue/html-comment-indent rule that enforce consistent indentation in HTML comments.
  • #755 Added vue/html-comment-content-newline rule that enforce unified line brake in HTML comments.
  • #755 Added vue/html-comment-content-spacing rule that enforce unified spacing in HTML comments.

🐛 Bug Fixes

  • #1125 Fixed wrong autofix in vue/no-deprecated-v-on-number-modifiers rule.

All commits: v7.0.0-alpha.2 -> v7.0.0-alpha.3

v7.0.0-alpha.2

10 May 07:45
Compare
Choose a tag to compare
v7.0.0-alpha.2 Pre-release
Pre-release

💥 Breaking Changes

  • Updated presets configs.
    • Changed plugin:vue/vue3-essential config.
    • Changed plugin:vue/vue3-strongly-recommended config.
    • Changed plugin:vue/vue3-recommended config.
      • #1117 Added vue/no-deprecated-html-element-is rule.
      • #1118 Added vue/no-deprecated-vue-config-keycodes rule.
      • #1119 Added vue/no-deprecated-functional-template rule.
  • #1105 Renamed vue/require-v-if-inside-transition rule to vue/require-toggle-inside-transition.

✨ Enhancements

Core:

  • #1077 Supports ESLint v7.x.

New Rules:

  • #1117 Added vue/no-deprecated-html-element-is rule that reports deprecated the is attribute on HTML elements (removed in Vue.js v3.0.0+). RFC0027
  • #1118 Added vue/no-deprecated-vue-config-keycodes rule that reports use of deprecated Vue.config.keyCodes (removed in Vue.js 3.0.0+). RFC0014
  • #1119 Added vue/no-deprecated-functional-template rule that reports deprecated the functional template (removed in Vue.js 3.0.0+). RFC0007

Other changes in Rules:

  • #1105 Renamed vue/require-v-if-inside-transition rule to vue/require-toggle-inside-transition.
  • #1116 Added disallowVueBuiltInComponents and disallowVue3BuiltInComponents option that reports Vue built-in component names to the vue/no-reserved-component-names rule.

All commits: v7.0.0-alpha.1 -> v7.0.0-alpha.2

v7.0.0-alpha.1

21 Apr 23:10
Compare
Choose a tag to compare
v7.0.0-alpha.1 Pre-release
Pre-release

💥 Breaking Changes

  • Updated presets configs.
    • Changed plugin:vue/vue3-essential config
    • Changed plugin:vue/vue3-strongly-recommended config
    • Changed plugin:vue/vue3-recommended config
      • Added vue/no-deprecated-v-on-number-modifiers rule
      • Added vue/no-deprecated-data-object-declaration rule
      • Added vue/no-deprecated-events-api rule
      • Added vue/no-watch-after-await rule
      • Added vue/require-v-if-inside-transition rule
      • Added vue/no-deprecated-inline-template rule
  • #1088 Updated the rules of this plugin to detect Vue.js 3.x components.

✨ Enhancements

Core:

  • #1088 Updated the rules of this plugin to detect Vue.js 3.x components.

New Rules:

  • #1079 Added vue/no-deprecated-v-on-number-modifiers rule that reports use of deprecated KeyboardEvent.keyCode modifier on v-on directive. RFC0014
  • #1083 Added vue/no-deprecated-data-object-declaration rule that reports use of deprecated object declaration on data property. RFC0019
  • #1086 Added vue/no-template-no-target-blank rule that disallows using target="_blank" attribute without rel="noopener noreferrer" to avoid a security vulnerability.
  • #1097 Added vue/no-deprecated-events-api rule that reports use of deprecated $on, $off and $once api (removed in Vue.js v3.0.0+). RFC0020
  • #1068 Added vue/no-watch-after-await rule that reports the watch() after await expression. RFC0013
  • #1099 Added vue/require-v-if-inside-transition rule that reports elements inside <transition> that do not control the display. RFC0017
  • #1100 Add vue/no-deprecated-inline-template rule that reports deprecated inline-template attributes (removed in Vue.js v3.0.0+) RFC0016

Other changes in Rules:

  • #1082 Changed vue/no-dupe-key, vue/no-reserved-keys rule to handle setup.

All commits: v7.0.0-alpha.0 -> v7.0.0-alpha.1

v7.0.0-alpha.0

14 Mar 09:28
Compare
Choose a tag to compare
v7.0.0-alpha.0 Pre-release
Pre-release

💥 Breaking Changes

  • #1036 Updated presets configs.
    • Changed plugin:vue/essential config
      • Added vue/valid-v-bind-sync rule
      • Added vue/valid-v-slot rule
      • Added vue/no-custom-modifiers-on-v-model rule
      • Added vue/no-multiple-template-root rule
      • Added vue/no-v-model-argument rule
    • Changed plugin:vue/strongly-recommended config
      • Added vue/component-definition-name-casing rule
      • Added vue/v-slot-style rule
      • Removed vue/name-property-casing rule
    • Changed plugin:vue/recommended config
      • Added vue/component-tags-order rule
  • #1036 Changed vue/name-property-casing rule to be deprecate.
  • #1038 Changed to remove a single root element check from vue/valid-template-root rule.
  • #1039 Changed vue/valid-v-model rule to allow v-model argument. RFC0011
  • #1039 Changed vue/valid-v-model rule to allow v-model custom modifiers. RFC0011

✨ Enhancements

Core:

  • #1038, #1039, 1043, #1061, #1065, #1066, #1067 and #1073 Support for Vue.js 3.x.
  • #1073 Updated the rules of this plugin to detect Vue.js 3.x components.
  • #1064 Updated the rules of this plugin to be able to analyze the arrow function component options.

New Rulesets:

  • #1061 Added plugin:vue/vue3-essential config
  • #1061 Added plugin:vue/vue3-strongly-recommended config
  • #1061 Added plugin:vue/vue3-recommended config

New Rules:

  • #1038 Added vue/no-multiple-template-root rule to template to check for a single root element. This rule has been separated from the previous vue/valid-template-root.
  • #1039 Added vue/no-v-model-argument rule that does not allow argument to v-model.
  • #1039 Added vue/no-deprecated-v-bind-sync rule that reports when deprecated .sync modifier is used on v-bind directive. RFC0005
  • #1039 Added vue/no-custom-modifiers-on-v-model rule that reports when v-model is used with custom modifiers on Vue Component.
  • #1043 Added vue/no-deprecated-filter rule that reports usage of filters syntax removed in Vue.js 3.0.0+. RFC0015
  • #1065 Added vue/no-ref-as-operand rule that reports cases where a ref is used incorrectly as an operand. RFC0013
  • #1066 Added vue/no-setup-props-destructure rule that reports the destructuring of props passed to setup causing the value to lose reactivity. RFC0013
  • #1067 Added vue/no-lifecycle-after-await rule that reports the lifecycle hooks after await expression. RFC0013

New Options:

  • #1070 Added ignorePattern option to vue/no-unsed-vars rule to disables reporting of variable names that match the regular expression.

All commits: v6.2.2 -> v7.0.0-alpha.0

v6.2.2

08 Mar 09:36
Compare
Choose a tag to compare

🐛 Bug Fixes

  • #1071 Fixed vue/no-use-v-if-with-v-for error when using destructuring for iteration or using iteration of expression

All commits: v6.2.1 -> v6.2.2