feat(no-inspect): add no-inspect rule
#868
no-inspect ruleClosing issue
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
Pull request
Merged
M
mikededo Oct 10, 2024, 8:47 AMAdd rule that warns if $inspect is used.
Closes #812
Info
Merged at Oct 16, 2024, 1:52 PM
Merged by ota-meshi
Assignees None
Reviewers None
Labels None
Milestone None
C
changeset-bot[bot] Oct 10, 2024, 8:47 AM🦋 Changeset detected
Latest commit: 0fe07d7
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| eslint-plugin-svelte | Minor |
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
Pull request opened Oct 10, 2024, 8:47 AM
Verified
Verified
Verified
Verified
Verified
Verified
Pull request merged Oct 16, 2024, 1:52 PM
Total +121
Pro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)