Skip to content
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

Add allowModifiers option to valid-v-slot #1330

Merged
merged 5 commits into from Oct 18, 2020
Merged

Conversation

nokazn
Copy link
Contributor

@nokazn nokazn commented Oct 11, 2020

About

Add allowModifiers option to valid-v-slot rules. When this option is set to true, modifiers in the argument of v-slot are ignored, and invalid modifiers like v-slot.foo are still disallowed.

@nokazn nokazn changed the title Add addModifiers option to valid-v-slot Add allowModifiers option to valid-v-slot Oct 11, 2020
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR!
I have some change requests.

tests/lib/rules/valid-v-slot.js Outdated Show resolved Hide resolved
tests/lib/rules/valid-v-slot.js Outdated Show resolved Hide resolved
lib/rules/valid-v-slot.js Outdated Show resolved Hide resolved
lib/rules/valid-v-slot.js Outdated Show resolved Hide resolved
tests/lib/rules/valid-v-slot.js Show resolved Hide resolved
@nokazn nokazn requested a review from ota-meshi October 11, 2020 13:44
tests/lib/rules/valid-v-slot.js Outdated Show resolved Hide resolved
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@ota-meshi ota-meshi merged commit 0e1a05a into vuejs:master Oct 18, 2020
@KaelWD
Copy link
Contributor

KaelWD commented Oct 20, 2020

Why was this added as an option that's disabled by default? Vuetify uses . extensively in slot names, having it throw eslint errors is confusing for new developers. It shouldn't even be an option IMO, they aren't really "modifiers" as vue treats v-slot completely differently to normal directives.

@ota-meshi
Copy link
Member

Hi @KaelWD.
I know Vuetify is used by many people, but for non Vuetify users, using modifiers is almost mistake.
I think you should provide an ESLint sharable config for Vuetify. Its config turns on allowModifiers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

valid-v-slot reporting errors on code that works
3 participants