-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat: added the consistent-selector-style
rule
#925
feat: added the consistent-selector-style
rule
#925
Conversation
🦋 Changeset detectedLatest commit: 70e1add 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 |
a0301c4
to
df5843e
Compare
49a6b98
to
e963ca7
Compare
55843f5
to
219c6c0
Compare
Hi, @ota-meshi! This one is I think ready for review, however, it needs sveltejs/svelte-eslint-parser#619 and #965 first. |
6f4d51b
to
e2829bf
Compare
commit: |
e2829bf
to
d40acf7
Compare
typeSelections: Map<string, AST.SvelteHTMLElement[]> | ||
): boolean { | ||
const types = new Set(selection.map((node) => node.name.name)); | ||
if (types.size > 1) { |
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.
This doesn't report any selection which could be replaced by multiple type selections (e.g. replacing .emphasized {}
by i, b {}
). That can be added later I think (maybe gated with a configuration option?)
d40acf7
to
88b68e3
Compare
ffef936
to
3ba8c93
Compare
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.
Thank you for this PR!
I have a few comments.
packages/eslint-plugin-svelte/src/rules/consistent-selector-style.ts
Outdated
Show resolved
Hide resolved
packages/eslint-plugin-svelte/src/rules/consistent-selector-style.ts
Outdated
Show resolved
Hide resolved
3ba8c93
to
e2157ea
Compare
c066569
to
b1253f7
Compare
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.
LGTM! Thank you!
Closes #898