feat(no-shadow-native-events): initial implementation#2558
Open
JoCa96 wants to merge 34 commits intovuejs:masterfrom
Open
feat(no-shadow-native-events): initial implementation#2558JoCa96 wants to merge 34 commits intovuejs:masterfrom
JoCa96 wants to merge 34 commits intovuejs:masterfrom
Conversation
Member
|
Could you please fix the lint and test failures? |
Author
|
@FloEdelmann Of course! Done! |
JoCa96
added a commit
to SchwarzIT/onyx
that referenced
this pull request
Sep 17, 2024
…lint-plugin-vue" until its released (#1877) Duplicate "no-shadow-native-events" from "eslint-plugin-vue" until it is released: - PR with `eslint-plugin-vue`: vuejs/eslint-plugin-vue#2558 - Tests can also be found in that PR - Official Rule proposal: vuejs/eslint-plugin-vue#2557 Relates to #1603
FloEdelmann
requested changes
Sep 19, 2024
Member
FloEdelmann
left a comment
There was a problem hiding this comment.
I haven't looked at the code yet, only at docs and tests. Apart from a few minor suggestions, those look good already!
Comment on lines
+904
to
+923
| { | ||
| filename: 'test.vue', | ||
| code: ` | ||
| <template> | ||
| <div @click="$emit('click')"/> | ||
| </template> | ||
| <script setup> | ||
| defineEmits(['click']) | ||
| </script> | ||
| `, | ||
| errors: [ | ||
| { | ||
| messageId: 'violation', | ||
| line: 6, | ||
| column: 20, | ||
| endLine: 6, | ||
| endColumn: 27 | ||
| } | ||
| ] | ||
| }, |
Member
There was a problem hiding this comment.
Shouldn't this report both the $emit() call and the defineEmits definition?
…a96/eslint-plugin-vue into joca96/feat-no-shadow-native
Co-authored-by: Flo Edelmann <git@flo-edelmann.de>
Co-authored-by: Flo Edelmann <git@flo-edelmann.de>
JoCa96
commented
Sep 19, 2024
Comment on lines
+1114
to
+1127
| { | ||
| messageId: 'violation', | ||
| line: 4, | ||
| column: 32, | ||
| endLine: 4, | ||
| endColumn: 37 | ||
| }, | ||
| { | ||
| messageId: 'violation', | ||
| line: 4, | ||
| column: 32, | ||
| endLine: 4, | ||
| endColumn: 37 | ||
| } |
FloEdelmann
reviewed
Sep 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implementation of my proposed rule #2557 Rule Proposal: Disallow shadowing of native HTML event names.
The implementation is heavily based on require-explicit-emits.
The
dom-events.jsonfile is based on theEventsinterface of@vue/runtime-dom/dist/runtime-dom.d.ts.