+
Skip to content

Conversation

mdevils
Copy link
Contributor

@mdevils mdevils commented Jul 28, 2025

Summary

Added the rule noVueReservedKeys, which prevents the use of reserved Vue keys.

It prevents the use of Vue reserved keys such as those starting with $ (like $el, $data, $props) and keys starting with _ in data properties, which can cause conflicts and unexpected behavior in Vue components.

Invalid example
<script>
export default {
    data: {
        $el: '',
        _foo: 'bar',
    },
};
</script>
<script>
export default {
    computed: {
        $data() {
            return this.someData;
        },
    },
};
</script>
Valid examples
<script>
export default {
    data() {
        return {
            message: 'Hello Vue!',
            count: 0,
        };
    },
};
</script>
<script>
export default {
    computed: {
        displayMessage() {
            return this.message;
        },
    },
};
</script>

Closes #6308

Test Plan

Tests are included.

Docs

Docs are included.

Copy link

changeset-bot bot commented Jul 28, 2025

🦋 Changeset detected

Latest commit: e24558e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

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

@github-actions github-actions bot added A-CLI Area: CLI A-Project Area: project A-Linter Area: linter L-JavaScript Language: JavaScript and super languages A-Diagnostic Area: diagnostocis labels Jul 28, 2025
@mdevils mdevils force-pushed the feat/no-vue-reserved-keys branch from 87a4e7b to e24558e Compare July 28, 2025 21:02
Copy link

codspeed-hq bot commented Jul 28, 2025

CodSpeed Performance Report

Merging #7057 will not alter performance

Comparing mdevils:feat/no-vue-reserved-keys (e24558e) with main (f75fea2)

Summary

✅ 115 untouched benchmarks

Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

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

No major complaints, nothing worth blocking over. Nice work!

@dyc3 dyc3 added the D-Vue Domains: Vue label Jul 29, 2025
@mdevils mdevils merged commit 634a667 into biomejs:main Jul 29, 2025
38 of 40 checks passed
@github-actions github-actions bot mentioned this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Diagnostic Area: diagnostocis A-Linter Area: linter A-Project Area: project D-Vue Domains: Vue L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📎 Port vue/no-reserved-keys from eslint-plugin-vue

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载