Skip to content

New rule: svelte/no-$inspect #812

Closed
@baseballyama

Description

@baseballyama

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions