Skip to content

Releases: vuejs/eslint-plugin-vue

v7.6.0

15 Feb 01:06
Compare
Choose a tag to compare

✨ Enhancements

New Rules:

  • #1001, #1432 Added vue/html-button-has-type rule.

Other changes in Rules:

  • #1429 Added "SLOT" option to vue/attributes-order rule to specify v-slot order.
  • #1430 Changed the option schema for the following rules to be stricter. Incorrect options are reported as errors.
    • vue/attributes-order rule.
    • vue/component-tags-order rule.
    • vue/max-attributes-per-line rule.
    • vue/new-line-between-multi-line-property rule.
    • vue/no-bare-strings-in-template rule.
    • vue/no-duplicate-attributes rule.
    • vue/no-potential-component-option-typo rule.
    • vue/no-reserved-component-names rule.
    • vue/no-use-v-if-with-v-for rule.
    • vue/no-useless-mustaches rule.
    • vue/no-useless-v-bind rule.
    • vue/valid-v-slot rule.
  • #1436 Improved autofix of vue/no-deprecated-slot-attribute rule when slot name contains _.

🐛 Bug Fixes

  • #1434 Fixed false negatives for v-bind="object" in vue/attributes-order rule.

⚙️ Updates

  • #1440 Upgrade vue-eslint-parser to v7.5.0.
    This change fixes an issue that caused a crash when using some queries with vue/no-restricted-syntax rule.

All commits: v7.5.0 -> v7.6.0

v7.5.0

22 Jan 01:09
Compare
Choose a tag to compare

✨ Enhancements

New Rules:

  • #1401 Added vue/no-constant-condition rule applies no-constant-condition rule to expressions in <template>, v-if, v-show and v-else-if.
  • #1400 Added vue/next-tick-style rule that enforces whether the callback version or Promise version should be used in Vue.nextTick and this.$nextTick.
  • #1404 Added vue/valid-next-tick rule that enforce valid nextTick function calls.

Other changes in Rules:

  • #1396 Make vue/no-ref-as-operand rule fixable.

🐛 Bug Fixes

  • #1398 Added computed() support to vue/no-async-in-computed-properties rule.
  • #1406 Added computed() support to vue/return-in-computed-property rule.
  • #1407 Added computed() support to vue/no-side-effects-in-computed-properties rule.
  • #1419 Fixed false positives for mixin() in vue/one-component-per-file and vue/require-name-property rules.
  • #1421 Fixed crash for toLocaleString() in vue/no-unused-properties rule.
  • #1420 Fixed false positives for quoted 'emits' in vue/require-explicit-emits rule.

⚙️ Updates

  • #1422 Upgrade vue-eslint-parser to 7.4.1

⚙️ Chores

  • #1392 Refactor vue/attributes-order rule.
  • #1405 Refactor vue/no-async-in-computed-properties rule.

All commits: v7.4.1 -> v7.5.0

v7.4.1

05 Jan 01:36
Compare
Choose a tag to compare

🐛 Bug Fixes

  • d176d6b Fixed false positives for assignments in no-ref-as-operand rule

All commits: v7.4.0 -> v7.4.1

v7.4.0

27 Dec 23:33
Compare
Choose a tag to compare

✨ Enhancements

New Rules:

  • #1381 Added vue/no-restricted-call-after-await rule that reports your restricted calls after the await expression.
  • #1388 Added vue/v-on-event-hyphenation rule that enforces using hyphenated v-on event names on custom components in Vue templates.
  • #1389 Added vue/no-restricted-block rule that allows you to specify block names that you don't want to use in your application.

Other changes in Rules:

  • #1387 Added deepData option to vue/no-unused-properties rule.

🐛 Bug Fixes

  • #1382 Fixed multiple reporting of same warnings in vue/no-unregistered-component rule.
  • #1391 Fixed false positives for v-bind="object" syntax in vue/attributes-order rule.

All commits: v7.3.0 -> v7.4.0

v7.3.0

16 Dec 06:00
Compare
Choose a tag to compare

✨ Enhancements

  • #1080 Added vue/new-line-between-multiline-property rule that enforces new lines between multi-line properties.
  • #1376 Added vue/no-restricted-props rule that disallows prop names that you don't want to use.
  • #1377 Added vue/no-restricted-custom-event rule that disallows custom event names that you don't want to use.

⚙️ Updates


All commits: v7.2.0 -> v7.3.0

v7.2.0

04 Dec 04:25
Compare
Choose a tag to compare

✨ Enhancements

  • #1364 Added casing option to vue/custom-event-name-casing rule.

⚙️ Updates

🐛 Bug Fixes

  • #1335 Fixed false positives when using is attr in vue/valid-v-bind-sync rule.
  • #1366 Fixed false positives when using v-for variable for v-slot in vue/valid-v-slot rule
  • #1367 Fixed false positives when using in vue/valid-v-slot and vue/valid-v-model rule
  • #1368 Fixed false negatives when using handler property in vue/no-arrow-functions-in-watch rule
  • #1369 Fixed false positives for methods whose arguments should not be changed in vue/v-on-function-call rule.

All commits: v7.1.0 -> v7.2.0

v7.1.0

18 Oct 13:48
Compare
Choose a tag to compare

✨ Enhancements

New Rules:

  • #1328 Added vue/block-tag-newline rule that enforces a line break (or no line break) after opening and before closing block tags.
  • #1326 Added vue/array-bracket-newline rule applies array-bracket-newline rule to expressions in <template>.

Other changes in Rules:

  • #1321 Added ignores option to vue/custom-event-name-casing rule.
  • #1330 Added allowModifiers option to vue/valid-v-slot rule.

🐛 Bug Fixes

  • #1332 Fixed CRLF issues.
  • #1305 Fixed false positives for recursive components in vue/no-unregistered-components rule.
  • #1324 Fixed false positives when used via argument in vue/no-unused-properties

⚙️ Updates

  • #1322 Changed not to use ESLint internal modules.

⚙️ Chores

  • #1337 Added Types for ES2021.
  • #1332 Upgraded vue-eslint-parser to 7.1.1

All commits: v7.0.1 -> v7.1.0

v7.0.1

05 Oct 01:55
Compare
Choose a tag to compare

🐛 Bug Fixes

  • #1317 Avoid redundant global self-require of the plugin.

All commits: v7.0.0 -> v7.0.1

v7.0.0

30 Sep 04:23
Compare
Choose a tag to compare

🚀 Highlight

  • Support for Vue.js 3.0 "One Piece".
  • Support for ESLint 7.x.
  • Support for ECMAScript 2020.
  • Added 66 new rules.

💥 Breaking Changes

  • #1209 Change support version of ESLint from 6.0.0 to 6.2.0.
  • Updated presets configs.
    • Changed plugin:vue/base config.
      • #1237 Removed jsx:true from shareable configs.
      • #1209 Changed parserOptions.ecmaVersion to 2020.
      • #1303 Added vue/experimental-script-setup-vars rule.
    • Changed plugin:vue/essential config.
      • Same changes as above.
      • #1036 Added vue/valid-v-bind-sync rule.
      • #1036 Added vue/valid-v-slot rule.
      • #1036 Added vue/no-custom-modifiers-on-v-model rule.
      • #1036 Added vue/no-multiple-template-root rule.
      • #1036 Added vue/no-v-model-argument rule.
      • #1148 Added vue/no-mutating-props rule.
      • #1156 Added vue/no-arrow-functions-in-watch rule.
      • #1166 Added vue/custom-event-name-casing rule.
      • #1239 Added vue/no-dupe-v-else-if rule.
      • #1281 Added vue/no-v-for-template-key rule.
    • Changed plugin:vue/strongly-recommended config.
      • Same changes as above.
      • #1036 Added vue/component-definition-name-casing rule.
      • #1036 Added vue/v-slot-style rule.
      • #1036 Removed vue/name-property-casing rule.
      • #1149 Added vue/one-component-per-file rule.
    • Changed plugin:vue/recommended config.
      • Same changes as above.
      • #1036 Added vue/component-tags-order rule.
      • #1179 Added vue/no-multiple-slot-args rule.
      • #1238 Added vue/no-lone-template rule.
  • #1036 Changed vue/name-property-casing rule to be deprecate.
  • #1120 Added the support of descriptions in directive comments.
  • #1120 Added the support for block-level directive comments.
  • Changed the default order option for vue/order-in-components rule.
    • Add options for Vue.js 3.x.
      • #1181 emits to after props.
      • #1181 setup to after emits.
      • #1181 beforeUnmount and unmounted to LIFECYCLE_HOOKS.
      • #1181 renderTracked and renderTriggered to LIFECYCLE_HOOKS.
    • Add options for Vue.js 2.x.
      • #1181 provide and inject to after mixins.
      • #1181 errorCaptured to LIFECYCLE_HOOKS.
    • Add options for Vue Router.
      • #1107 ROUTER_GUARDS (beforeRouteEnter, beforeRouteUpdate and beforeRouteLeave) to after provide / inject (provide / inject was added after mixins).
    • Add options for Nuxt.
      • #1107 key to after name.
      • #1107 layout, middleware, validate, scrollToTop, transition, loading to after ROUTER_GUARDS (ROUTER_GUARDS was added after provide / inject).
      • #1107 watchQuery to after watch.
    • Change options for Nuxt.
      • #1107 head move from after methods to after data.
      • #1268 fetch move from after props / propsData to after data.

✨ Enhancements

Core:

  • #1120 Added the support of descriptions in directive comments.
  • #1120 Added the support for block-level directive comments.
  • #1073, #1088 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.
  • #1152 Changed casing conversion logic to behave like Vue core logic.
  • Changed plugin:vue/essential config.
  • Changed plugin:vue/strongly-recommended config.
  • Changed plugin:vue/recommended config.

New Rulesets:

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

New Rules:

for Vue.js 3.x:

  • #1039 Added vue/no-deprecated-v-bind-sync rule that reports when deprecated .sync modifier is used on v-bind directive. Related to [RFC0005]
  • #1043 Added vue/no-deprecated-filter rule that reports usage of filters syntax removed in Vue.js 3.0.0+. Related to [RFC0015]
  • #1065 Added vue/no-ref-as-operand rule that reports cases where a ref is used incorrectly as an operand. Related to [RFC0013]
  • #1066 Added vue/no-setup-props-destructure rule that reports the destructuring of props passed to setup causing the value to lose reactivity. Related to [RFC0013]
  • #1067 Added vue/no-lifecycle-after-await rule that reports the lifecycle hooks after await expression. Related to [RFC0013]
  • #1079 Added vue/no-deprecated-v-on-number-modifiers rule that reports use of deprecated KeyboardEvent.keyCode modifier on v-on directive. Related to [RFC0014]
  • #1083 Added vue/no-deprecated-data-object-declaration rule that reports use of deprecated object declaration on data property. Related to [RFC0019]
  • #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+). Related to [RFC0020]
  • #1068 Added vue/no-watch-after-await rule that reports the watch() after await expression. [RFC0013]
  • #1099, #1105 Added vue/require-toggle-inside-transition rule that reports elements inside <transition> that do not control the display. Related to [RFC0017]
  • #1100 Added vue/no-deprecated-inline-template rule that reports deprecated inline-template attributes (removed in Vue.js v3.0.0+) Related to [RFC0016]
  • #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+). Related to [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+). Related to [RFC0014]
  • #1119 Added vue/no-deprecated-functional-template rule that reports deprecated the functional template (removed in Vue.js 3.0.0+). Related to [RFC0007]
  • #1124 Added vue/require-explicit-emits rule that reports event triggers not declared with the emits option. Related to [RFC0030]
  • #1129 Added vue/return-in-emits-validator rule enforces that a return statement is present in emits validators. Related to [RFC0030]
  • #1130 Added vue/no-deprecated-v-on-native-modifier rule that reports use of deprecated .native modifier on v-on directive. Related to [RFC0031]
  • #1133 Added vue/no-deprecated-dollar-listeners-api rule that reports use of deprecated $listeners. Related to [RFC0031]
  • #1177 Added vue/no-deprecated-dollar-scopedslots-api rule that reports use of deprecated $scopedSlots. Related to [RFC0006]
  • #1178 Added vue/require-slots-as-functions rule enforces the properties of $slots to be used as a function. Related to [RFC0006]
  • #1211 Added vue/no-deprecated-destroyed-lifecycle rule reports use of deprecated destroyed and beforeDestroy lifecycle hooks.
  • #1253 Added vue/valid-v-is rule that reports wrong usage of v-is directives.
  • #1289 Added vue/no-v-for-template-key-on-child rule that reports the key of the <template v-for> placed on the child elements.
  • #1302 Added vue/no-deprecated-props-default-this rule that reports the use of this within the props default value factory functions.
  • #1303 Added vue/experimental-script-setup-vars rule that prevent variables defined in <script setup> to be marked as undefined.

for Vue.js 2.x:

  • #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 rule.
  • #1039 Added vue/no-v-model-argument rule that does not allow argument to v-model.
  • #1039 Added vue/no-custom-modifiers-on-v-model rule that reports when v-model is used with custom modifiers on Vue Component.
  • #1281 Added vue/no-v-for-template-key rule that disallow the key placed on the <template v-for>. This rule has been separated from the previous vue/no-template-key rule.

Commons:

  • #1086 Added vue/no-template-no-target-blank rule that disallows using target="_blank" attribute without rel="noopener noreferrer" to avoid a security vulnerability.
  • #1114 Added vue/no-unregistered-components rule that disallow using components that are not registered inside templates.
  • #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.
  • #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.
  • #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.
  • #1166 Added vue/custom-event-name-casing rule that enforces using kebab-case custom event names.
  • #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.
  • #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...
Read more

v7.0.0-beta.4

23 Sep 04:45
Compare
Choose a tag to compare
v7.0.0-beta.4 Pre-release
Pre-release

💥 Breaking Changes

  • Changed plugin:vue/base config.
    • #1303 Added vue/experimental-script-setup-vars rule.
  • Changed plugin:vue/vue3-* configs
    • #1302 Added vue/no-deprecated-props-default-this rule.

✨ Enhancements

New Rules:

  • #1302 Added vue/no-deprecated-props-default-this rule that reports the use of this within the props default value factory functions.
  • #1303 Added vue/experimental-script-setup-vars rule that prevent variables defined in <script setup> to be marked as undefined.

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