Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(no-shadow-native-events): initial implementation#2558

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
JoCa96 wants to merge34 commits intovuejs:master
base:master
Choose a base branch
Loading
fromJoCa96:joca96/feat-no-shadow-native

Conversation

JoCa96
Copy link

Implementation of my proposed rule#2557 Rule Proposal: Disallow shadowing of native HTML event names.
The implementation is heavily based onrequire-explicit-emits.
Thedom-events.json file is based on theEvents interface of@vue/runtime-dom/dist/runtime-dom.d.ts.

@FloEdelmannFloEdelmann linked an issueSep 16, 2024 that may beclosed by this pull request
@FloEdelmann
Copy link
Member

Could you please fix the lint and test failures?

JoCa96 reacted with thumbs up emoji

@JoCa96
Copy link
Author

@FloEdelmann Of course! Done!

JoCa96 added a commit to SchwarzIT/onyx that referenced this pull requestSep 17, 2024
…lint-plugin-vue" until its released (#1877)Duplicate "no-shadow-native-events" from "eslint-plugin-vue" until it isreleased:- 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#2557Relates to#1603
Copy link
Member

@FloEdelmannFloEdelmann left a comment

Choose a reason for hiding this comment

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

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
}
]
},
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this report both the$emit() call and thedefineEmits definition?

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
}
Copy link
Author

Choose a reason for hiding this comment

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

Should only report once

FloEdelmann reacted with thumbs up emoji
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@FloEdelmannFloEdelmannFloEdelmann requested changes

Requested changes must be addressed to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Rule Proposal: Disallow shadowing of native HTML event names
2 participants
@JoCa96@FloEdelmann

[8]ページ先頭

©2009-2025 Movatter.jp