Skip to content
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

New rule: svelte/no-$inspect #812

Open
baseballyama opened this issue Jun 30, 2024 · 0 comments
Open

New rule: svelte/no-$inspect #812

baseballyama opened this issue Jun 30, 2024 · 0 comments
Labels
enhancement New feature or request new rule

Comments

@baseballyama
Copy link
Member

Motivation

THe motivation is same as svelte/no-at-debug-tags.the

Description

The $inspect should be removed when you no longer need it after you use it for debugging.

Examples

<script>
	let count = $state(0);
	let message = $state('hello');
        <!--BAD -->
	$inspect(count, message); // will console.log when `count` or `message` change
</script>

<button onclick={() => count++}>Increment</button>
<input bind:value={message} />

Additional comments

No response

@baseballyama baseballyama added enhancement New feature or request new rule labels Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new rule
Projects
None yet
Development

No branches or pull requests

1 participant