-
-
Notifications
You must be signed in to change notification settings - Fork 681
Update: improve warnings about key on template elements #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
docs/rules/no-template-key.md
Outdated
|
||
This rule reports the `<template>` elements which have `key` attribute. | ||
|
||
👎 Examples of **incorrect** code for this rule: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think GitHub emoji code (e.g. :tada:
) is maintainaceble(read/write) than emoji binary code. 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with @kazupon, I did so while importing elint-plugin-vue-trial
too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my custom, I don't use the notation since it doesn't work outside of GitHub (i.g. document generators, editor previews, etc...). Should I use it?
I solved merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @mysticatea However I don't quite get why the key
on template is considered harmful, could you please explain this a little bit? Reason behind this in rule's documentation would also be helpful for others I think.
thats why: #43 |
Fixes #43.
This PR does 2 things.
no-invalid-v-for
andrequire-v-for-key
rules to check whether child elements of<template>
elements havev-bind:key
attribute. [semver-minor]no-template-key
rule to disallowkey
attribute on<template>
elements. I think thatno-template-key
rule should be recommended, however I setrecommended: false
for now because semver policy of ESLint needs a major version to update the recommended config. [semver-minor]