-
-
Notifications
You must be signed in to change notification settings - Fork 687
feat(no-deprecated-slot-attribute): add ignoreParents option #2784
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
base: master
Are you sure you want to change the base?
feat(no-deprecated-slot-attribute): add ignoreParents option #2784
Conversation
🦋 Changeset detectedLatest commit: cba96ee The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Co-authored-by: Flo Edelmann <git@flo-edelmann.de>
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 to me now. Thank you! 🙂
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.
Pull Request Overview
Adds an ignoreParents
option to the no-deprecated-slot-attribute
rule so users can skip slot-attribute deprecation checks when a component is nested inside specified parent tags (e.g., web components).
- Introduce
ignoreParents
in rule schema, parsing logic, and documentation - Extend tests to cover literal and regex-based
ignoreParents
matching - Update utility JSDoc to accept
VDocumentFragment
inisVElement
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/lib/rules/no-deprecated-slot-attribute.js | Add valid/invalid test cases for ignoreParents |
lib/utils/index.js | Extend JSDoc for isVElement to include fragments |
lib/rules/syntaxes/slot-attribute.js | Import and apply ignoreParents in reporting logic |
lib/rules/no-deprecated-slot-attribute.js | Add ignoreParents to rule schema |
docs/rules/no-deprecated-slot-attribute.md | Document the new ignoreParents option |
.changeset/beige-teams-camp.md | Bump version with a minor release note |
Comments suppressed due to low confidence (1)
docs/rules/no-deprecated-slot-attribute.md:53
- [nitpick] Clarify that regex patterns in
ignoreParents
are matched against the component’s raw tag name (which can be kebab-case or PascalCase). You may want to note that users should include case-insensitive flags or patterns to cover both formats.
- `"ignoreParents"` (`string[]`) An array of tags or regular expression patterns (e.g. `/^custom-/`) for parents that ignore these rules. This option is especially useful for [Web-Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components). Default is empty.
Adds #2710
vue/no-deprecated-slot-attribute
conflicts with web component named slots #2710Adds an
ignoreParents: string[]
option tono-deprecated-slot-attribute
to allow ignoring web-component usecases:Preview:
rules/no-deprecated-slot-attribute
(new)rules/no-deprecated-slot-attribute
(current)Note to self: Next PR(s):