feat: add new rule no-duplicate-keyframe-selectors#143
Conversation
| export default [ | ||
| { | ||
| ignores: ["**/tests/fixtures/", "**/dist/"], | ||
| ignores: ["**/tests/fixtures/", "**/dist/", "test.css"], |
There was a problem hiding this comment.
Added this test.css for local testing purposes, similar to the eslint repo
62ec302 to
470e3a9
Compare
|
@snitin315 can you check the merge conflicts? |
|
@nzakas resolved. |
| { | ||
| files: ["**/*.css"], | ||
| language: "css/css", | ||
| ...css.configs.recommended, |
There was a problem hiding this comment.
can we use extends here instead?
|
|
||
| create(context) { | ||
| return { | ||
| Atrule(node) { |
There was a problem hiding this comment.
This method is traversing the at-rule itself instead of letting the rule do so.
It would be more efficient to do "Atrule[name=keyframes]", "Atrule[name=keyframes]:exit" and then look for the selectors in between.
See https://github.com/eslint/css/blob/main/src/rules/use-layers.js as an example.
There was a problem hiding this comment.
Makes sense, done.
|
@snitin315 Are you still working on this? |
|
Yes |
|
Hi @snitin315, There are a few merge conflicts. Whenever you have a chance, could you take a look? |
Prerequisites checklist
What is the purpose of this pull request?
Add new rule
no-duplicate-keyframe-selectors.What changes did you make? (Give an overview)
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Related Issues
Fix #141
Is there anything you'd like reviewers to focus on?