Skip to content

Commit a8a6bd1

Browse files
committed
feat(no-inspect): update resources
1 parent b2a4f33 commit a8a6bd1

File tree

6 files changed

+20
-2
lines changed

6 files changed

+20
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ These rules relate to better ways of doing things to help you avoid problems:
419419
| [svelte/no-ignored-unsubscribe](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-ignored-unsubscribe/) | disallow ignoring the unsubscribe method returned by the `subscribe()` on Svelte stores. | |
420420
| [svelte/no-immutable-reactive-statements](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-immutable-reactive-statements/) | disallow reactive statements that don't reference reactive values. | |
421421
| [svelte/no-inline-styles](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inline-styles/) | disallow attributes and directives that produce inline styles | |
422+
| [svelte/no-inspect](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/) | (no description) | :star: |
422423
| [svelte/no-reactive-functions](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/) | it's not necessary to define functions in reactive statements | :bulb: |
423424
| [svelte/no-reactive-literals](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-literals/) | don't assign literal values in reactive statements | :bulb: |
424425
| [svelte/no-svelte-internal](https://sveltejs.github.io/eslint-plugin-svelte/rules/no-svelte-internal/) | svelte/internal will be removed in Svelte 6. | |

docs/rules.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ These rules relate to better ways of doing things to help you avoid problems:
5656
| [svelte/no-ignored-unsubscribe](./rules/no-ignored-unsubscribe.md) | disallow ignoring the unsubscribe method returned by the `subscribe()` on Svelte stores. | |
5757
| [svelte/no-immutable-reactive-statements](./rules/no-immutable-reactive-statements.md) | disallow reactive statements that don't reference reactive values. | |
5858
| [svelte/no-inline-styles](./rules/no-inline-styles.md) | disallow attributes and directives that produce inline styles | |
59+
| [svelte/no-inspect](./rules/no-inspect.md) | (no description) | :star: |
5960
| [svelte/no-reactive-functions](./rules/no-reactive-functions.md) | it's not necessary to define functions in reactive statements | :bulb: |
6061
| [svelte/no-reactive-literals](./rules/no-reactive-literals.md) | don't assign literal values in reactive statements | :bulb: |
6162
| [svelte/no-svelte-internal](./rules/no-svelte-internal.md) | svelte/internal will be removed in Svelte 6. | |

docs/rules/no-inspect.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1-
# (svelte/no-inspect)
1+
---
2+
pageClass: 'rule-details'
3+
sidebarDepth: 0
4+
title: 'svelte/no-inspect'
5+
description: ''
6+
---
27

3-
> Warns against the usage of `$inspect`.
8+
# svelte/no-inspect
9+
10+
>
11+
12+
- :exclamation: <badge text="This rule has not been released yet." vertical="middle" type="error"> **_This rule has not been released yet._** </badge>
13+
- :gear: This rule is included in `"plugin:svelte/recommended"`.
414

515
## :book: Rule Details
616

packages/eslint-plugin-svelte/src/configs/flat/recommended.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const config: Linter.Config[] = [
1616
'svelte/no-dupe-style-properties': 'error',
1717
'svelte/no-dynamic-slot-name': 'error',
1818
'svelte/no-inner-declarations': 'error',
19+
'svelte/no-inspect': 'warn',
1920
'svelte/no-not-function-handler': 'error',
2021
'svelte/no-object-in-text-mustaches': 'error',
2122
'svelte/no-shorthand-style-property-overrides': 'error',

packages/eslint-plugin-svelte/src/configs/recommended.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const config: Linter.LegacyConfig = {
1616
'svelte/no-dupe-style-properties': 'error',
1717
'svelte/no-dynamic-slot-name': 'error',
1818
'svelte/no-inner-declarations': 'error',
19+
'svelte/no-inspect': 'warn',
1920
'svelte/no-not-function-handler': 'error',
2021
'svelte/no-object-in-text-mustaches': 'error',
2122
'svelte/no-shorthand-style-property-overrides': 'error',

packages/eslint-plugin-svelte/src/rule-types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ export interface RuleOptions {
164164
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inner-declarations/
165165
*/
166166
'svelte/no-inner-declarations'?: Linter.RuleEntry<SvelteNoInnerDeclarations>
167+
/**
168+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/
169+
*/
170+
'svelte/no-inspect'?: Linter.RuleEntry<[]>
167171
/**
168172
* disallow use of not function in event handler
169173
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/

0 commit comments

Comments
 (0)