@gost-kit/eslint-config-svelte 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/LICENSE +21 -0
- package/README.md +121 -2
- package/RULES.md +61 -0
- package/dist/create-svelte-config.d.ts +3 -0
- package/dist/create-svelte-config.js +50 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/rules.d.ts +28 -0
- package/dist/rules.js +25 -0
- package/package.json +58 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# @gost-kit/eslint-config-svelte
|
|
2
|
+
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d6883b7: Add the typed require-feature-state-selector architecture rule for GOST Store
|
|
8
|
+
and explicit local Svelte raw state. Enable it in typed Svelte config scopes,
|
|
9
|
+
with conservative selector autofix and V2/V3 collision-safe names.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 11cc6af: Add opt-in no-component-state diagnostics for state and bindable rune creation,
|
|
14
|
+
with binding-aware empty bind:this ref exceptions and no autofix. Keep the
|
|
15
|
+
public Svelte factory policy unchanged; consumers select application and UI-Kit
|
|
16
|
+
scopes with explicit ESLint overrides.
|
|
17
|
+
|
|
18
|
+
Reuse value-namespace rune resolution in the existing selector rule so type-only
|
|
19
|
+
names/imports do not hide derived or raw-state diagnostics. Consolidate rune and
|
|
20
|
+
Svelte script matching; document explicit plugin registration for extra JS scopes.
|
|
21
|
+
|
|
22
|
+
- 6c74d68: Expose a composed TypeScript policy for framework adapters without an ESLint
|
|
23
|
+
reflection instance. Cover JSX/TSX with general checks and remove unused direct
|
|
24
|
+
config dependencies. Reject ambiguous combined Content-Type values while
|
|
25
|
+
preserving commas inside quoted parameters.
|
|
26
|
+
- 730b73a: Add opt-in single-intent-dispatch for typed business UI callbacks, using public
|
|
27
|
+
Dispatch declaration/signature provenance. Diagnose multiple dispatches or
|
|
28
|
+
conditional intent selection without autofix. Keep the shared Svelte factory
|
|
29
|
+
default off and allow consumer UI-Kit exclusions through ordinary overrides.
|
|
30
|
+
|
|
31
|
+
Include optional calls/accesses that gate Dispatch in conditional-delivery
|
|
32
|
+
diagnostics, without treating unrelated optional data reads as dispatch gates.
|
|
33
|
+
Document the on-prefix and whole-handler syntactic-policy boundaries explicitly.
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [11cc6af]
|
|
36
|
+
- Updated dependencies [d6883b7]
|
|
37
|
+
- Updated dependencies [6c74d68]
|
|
38
|
+
- Updated dependencies [730b73a]
|
|
39
|
+
- @gost-kit/eslint-plugin@0.1.0
|
|
40
|
+
- @gost-kit/eslint-config@0.2.0
|
|
41
|
+
|
|
42
|
+
## 0.1.0
|
|
43
|
+
|
|
44
|
+
### Minor Changes
|
|
45
|
+
|
|
46
|
+
- 11af11e: Introduce an independently versioned Svelte 5 ESLint configuration with the
|
|
47
|
+
shared JavaScript/TypeScript baseline and explicit component/rune policies.
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- Updated dependencies [656024a]
|
|
52
|
+
- @gost-kit/eslint-config@0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anton Smolko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,122 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @gost-kit/eslint-config-svelte
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared Svelte 5 ESLint configuration, including the complete
|
|
4
|
+
`@gost-kit/eslint-config` JavaScript/TypeScript baseline. Independently versioned;
|
|
5
|
+
consult package.json and CHANGELOG.md for the version. Install alongside
|
|
6
|
+
the required peer dependencies.
|
|
7
|
+
|
|
8
|
+
Requires Node ^26.0.0, ESLint ^10.14.0, TypeScript ^5.9.3 and Svelte ^5.57.2.
|
|
9
|
+
The pinned tested combination uses ESLint 10.14.0, TypeScript 5.9.3, Svelte
|
|
10
|
+
5.57.2, eslint-plugin-svelte 3.24.0 and svelte-eslint-parser 1.10.1.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
Install this package, ESLint, TypeScript and Svelte as development dependencies.
|
|
15
|
+
The common config comes through this package's dependency. In `eslint.config.mjs`:
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import { createSvelteConfig } from '@gost-kit/eslint-config-svelte';
|
|
19
|
+
import globals from 'globals';
|
|
20
|
+
|
|
21
|
+
export default [
|
|
22
|
+
...(await createSvelteConfig({ tsconfigRootDir: import.meta.dirname })),
|
|
23
|
+
{
|
|
24
|
+
files: ['src/**/*.ts', 'src/**/*.svelte'],
|
|
25
|
+
languageOptions: { globals: globals.browser },
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Install `globals` explicitly if using it. The root must be an absolute consumer
|
|
31
|
+
project path. Supply a tsconfig covering authored TypeScript and Svelte files.
|
|
32
|
+
Type-aware checks report missing/incompatible projects; plain JavaScript does
|
|
33
|
+
not require a tsconfig. Component scripts use TypeScript (`lang="ts"`); components
|
|
34
|
+
without a script are permitted. TS/JS rune modules are supported. Globals are
|
|
35
|
+
not supplied for browser, Node or test environments: scope them in the consumer.
|
|
36
|
+
|
|
37
|
+
The asynchronous factory consumes the public `createTypeScriptPolicy` export
|
|
38
|
+
from `@gost-kit/eslint-config`. It does not instantiate ESLint, resolve a synthetic
|
|
39
|
+
filename or depend on private config names. It writes no files, invokes no application code and does not require
|
|
40
|
+
a placeholder source file. Config/compiler options remain consumer overrides,
|
|
41
|
+
for example `languageOptions.parserOptions.svelteConfig` for component files.
|
|
42
|
+
Do not append the common factory again: it is already included.
|
|
43
|
+
|
|
44
|
+
## Rules and boundaries
|
|
45
|
+
|
|
46
|
+
The [Svelte rule inventory](RULES.md) records every enabled framework rule and
|
|
47
|
+
its options. The [shared inventory](../eslint-config/RULES.md) describes inherited
|
|
48
|
+
JS/TS checks; in an installed package consult the README/RULES of
|
|
49
|
+
`@gost-kit/eslint-config`. All enabled checks are errors, including in tests.
|
|
50
|
+
No blanket test exception or SvelteKit-only rule set is enabled.
|
|
51
|
+
|
|
52
|
+
Keys are required for each blocks, but upstream `valid-each-key` does not prove
|
|
53
|
+
uniqueness/stability or ban index keys. `no-unused-props` supports spread/forwarding;
|
|
54
|
+
fixtures verify that forwarding declared props does not produce false positives.
|
|
55
|
+
Simple derived suggestions do not establish equivalence of arbitrary effects.
|
|
56
|
+
The `no-ignored-unsubscribe` check is syntactic: an ignored direct `.subscribe()`
|
|
57
|
+
call is reported even when it belongs to another API with that method name.
|
|
58
|
+
Use a documented targeted exception when that API needs no cleanup; the rule does
|
|
59
|
+
not establish actual cleanup/lifecycle correctness. `no-store-async` concerns
|
|
60
|
+
standard Svelte store callbacks, not application API effects.
|
|
61
|
+
|
|
62
|
+
Framework-independent correctness, arrow bodies, imports and spacing apply inside
|
|
63
|
+
component scripts. Svelte formatting is delegated to Prettier; this config does
|
|
64
|
+
not execute the formatter. Use `@gost-kit/prettier-config` with
|
|
65
|
+
`prettier-plugin-svelte` in the consuming project's Prettier config.
|
|
66
|
+
|
|
67
|
+
The bundled `@gost-kit/eslint-plugin` enables
|
|
68
|
+
`gost/require-feature-state-selector` on typed components and `.svelte.ts`.
|
|
69
|
+
It recognizes public GOST Store state and explicit local `$state.raw` bindings;
|
|
70
|
+
select the branch with `$derived` before passing it to a reactive computation.
|
|
71
|
+
Simple cases support conservative autofix with V2/V3 name collision suffixes.
|
|
72
|
+
See the installed plugin's RULES.md or the [source inventory](../eslint-plugin/RULES.md)
|
|
73
|
+
for exact supported forms and limitations. JS-script/stateless components are skipped;
|
|
74
|
+
mixed components check only the scripts marked `lang="ts"`.
|
|
75
|
+
The typed architecture rule is not enabled for `.svelte.js`.
|
|
76
|
+
|
|
77
|
+
The bundled `gost/no-component-state` rule is off by default. Enable it for
|
|
78
|
+
application components and exclude independent UI components with ordinary
|
|
79
|
+
ESLint overrides, as shown in the plugin inventory. It diagnoses direct
|
|
80
|
+
`$state`, `$state.raw` and `$bindable` creation, allowing simple empty `bind:this`
|
|
81
|
+
refs. It has no autofix and does not analyze all mutations. The repository's
|
|
82
|
+
private adapter explicitly enables it for `src/**/*.svelte`; the public factory
|
|
83
|
+
does not impose that ownership policy.
|
|
84
|
+
|
|
85
|
+
The bundled `gost/single-intent-dispatch` rule is also off by default. It checks
|
|
86
|
+
real GOST Dispatch calls in typed instance callbacks passed through `on*` props
|
|
87
|
+
or legacy events: one intent per handler, without conditional selection. UI-Kit
|
|
88
|
+
owns browser-event adaptation and may opt out through file overrides. This is
|
|
89
|
+
not a blanket browser API detector, and there is no autofix. Consult the plugin
|
|
90
|
+
inventory for supported aliases and scope limits.
|
|
91
|
+
|
|
92
|
+
Boolean conditions (#18) and presentation computations in derived/template
|
|
93
|
+
expressions (#19) remain separate work. Existing `$state.raw`
|
|
94
|
+
shell bindings and feature selectors remain valid; the Svelte compiler/type
|
|
95
|
+
checker still verifies compilation/accessibility.
|
|
96
|
+
|
|
97
|
+
## Overrides and verification
|
|
98
|
+
|
|
99
|
+
Append project overrides after the factory result:
|
|
100
|
+
|
|
101
|
+
```js
|
|
102
|
+
{
|
|
103
|
+
files: ['src/content/RichText.svelte'],
|
|
104
|
+
rules: { 'svelte/no-at-html-tags': 'off' },
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
An HTML exception still needs a trusted/sanitized source. The rule itself bans
|
|
109
|
+
syntax and does not validate a sanitizer. Keep formatter and linter separate:
|
|
110
|
+
|
|
111
|
+
```sh
|
|
112
|
+
eslint . --fix
|
|
113
|
+
prettier . --write
|
|
114
|
+
eslint . --max-warnings=0
|
|
115
|
+
prettier . --check
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Some lint errors require manual changes. Upgrade deliberately: inspect changes
|
|
119
|
+
in both inherited common policies and the Svelte inventory, run type/component
|
|
120
|
+
checks and tests, and review any output diff. Configuration releases remain
|
|
121
|
+
independent of runtime package versions. Tests and helper fixtures are excluded
|
|
122
|
+
from package artifacts; Svelte is a peer, not an automatically selected UI framework.
|
package/RULES.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Svelte rule inventory
|
|
2
|
+
|
|
3
|
+
Pinned baseline: eslint-plugin-svelte 3.24.0, svelte-eslint-parser 1.10.1,
|
|
4
|
+
Svelte 5.57.2. All selected rules are errors on components and rune modules.
|
|
5
|
+
Common JS/TS policies are inherited, not duplicated here.
|
|
6
|
+
|
|
7
|
+
| Policy | Rule | Level/options |
|
|
8
|
+
| ------ | ---------------------------------------------- | ---------------------------------------------------------- |
|
|
9
|
+
| S01 | `svelte/no-dupe-else-if-blocks` | `["error"]` |
|
|
10
|
+
| S02 | `svelte/no-not-function-handler` | `["error"]` |
|
|
11
|
+
| S03 | `svelte/no-object-in-text-mustaches` | `["error"]` |
|
|
12
|
+
| S04 | `svelte/require-each-key` | `["error"]` |
|
|
13
|
+
| S04 | `svelte/valid-each-key` | `["error"]` |
|
|
14
|
+
| S05 | `svelte/button-has-type` | `["error"]` |
|
|
15
|
+
| S06 | `svelte/no-bind-value-on-checkable-inputs` | `["error"]` |
|
|
16
|
+
| S07 | `svelte/no-dupe-style-properties` | `["error"]` |
|
|
17
|
+
| S07 | `svelte/no-shorthand-style-property-overrides` | `["error"]` |
|
|
18
|
+
| S07 | `svelte/no-unknown-style-directive-property` | `["error"]` |
|
|
19
|
+
| S08 | `svelte/no-conflicting-module-names` | `["error"]` |
|
|
20
|
+
| S09 | `svelte/no-svelte-internal` | `["error"]` |
|
|
21
|
+
| S10 | `svelte/no-at-debug-tags` | `["error"]` |
|
|
22
|
+
| S10 | `svelte/no-inspect` | `["error"]` |
|
|
23
|
+
| S11 | `svelte/no-unused-svelte-ignore` | `["error"]` |
|
|
24
|
+
| S11 | `svelte/no-unused-props` | `["error"]` |
|
|
25
|
+
| S12 | `svelte/no-unnecessary-state-wrap` | `["error"]` |
|
|
26
|
+
| S13 | `svelte/prefer-derived-over-derived-by` | `["error"]` |
|
|
27
|
+
| S14 | `svelte/prefer-writable-derived` | `["error"]` |
|
|
28
|
+
| AS01 | `svelte/no-at-html-tags` | `["error"]` |
|
|
29
|
+
| AS02 | `svelte/block-lang` | `["error", {"script":"ts", "enforceScriptPresent":false}]` |
|
|
30
|
+
| AS03 | `svelte/no-store-async` | `["error"]` |
|
|
31
|
+
| AS03 | `svelte/no-ignored-unsubscribe` | `["error"]` |
|
|
32
|
+
|
|
33
|
+
Infrastructure rules `svelte/comment-directive` and `svelte/system` are inherited
|
|
34
|
+
from Svelte base. The base and Prettier compatibility layers do not implicitly
|
|
35
|
+
activate the recommended Svelte/Kit policy set. Ordinary JS/TS files keep the
|
|
36
|
+
common baseline; selected framework rules target `**/*.svelte`, `**/*.svelte.ts`
|
|
37
|
+
and `**/*.svelte.js` where the upstream rule supports the corresponding syntax.
|
|
38
|
+
|
|
39
|
+
Not enabled: AS04 DOM/listener restrictions, AS05 SSR browser-global restrictions,
|
|
40
|
+
AS06 prefer-svelte-reactivity, legacy recommended/experimental rules and SvelteKit
|
|
41
|
+
routing rules. Prettier owns HTML/CSS formatting. Architecture checks #18–#19 remain separate outcomes.
|
|
42
|
+
|
|
43
|
+
The bundled GOST plugin additionally enables `gost/require-feature-state-selector`
|
|
44
|
+
at error for TypeScript component scripts and `.svelte.ts`. It checks public
|
|
45
|
+
Store state and explicit local `$state.raw` before reactive computation calls,
|
|
46
|
+
with limited autofix. JS scripts and `.svelte.js` are excluded from this typed
|
|
47
|
+
rule. See [the plugin inventory](../eslint-plugin/RULES.md) for its boundaries.
|
|
48
|
+
|
|
49
|
+
Sources: [rule catalog](https://sveltejs.github.io/eslint-plugin-svelte/rules/),
|
|
50
|
+
[configuration boundaries](https://sveltejs.github.io/eslint-plugin-svelte/user-guide/).
|
|
51
|
+
Recalculate configs and review selected/inherited rule changes when upgrading.
|
|
52
|
+
|
|
53
|
+
`gost/no-component-state` is registered but off by default. Consumers can enable
|
|
54
|
+
it for selected component paths and turn it off in later UI-Kit overrides.
|
|
55
|
+
It checks direct state/bindable rune creation, with a simple `bind:this` ref
|
|
56
|
+
exception and no autofix. See the plugin inventory for exact boundaries.
|
|
57
|
+
|
|
58
|
+
`gost/single-intent-dispatch` is registered but off by default. It checks direct
|
|
59
|
+
GOST Dispatch calls and conditional intent selection in typed instance `on*`
|
|
60
|
+
callbacks. Business/UI-Kit scopes use explicit consumer overrides. It requires
|
|
61
|
+
type services and has no autofix; see the plugin inventory for limits.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { plugin } from '@gost-kit/eslint-plugin';
|
|
2
|
+
import { createConfig, createTypeScriptPolicy, } from '@gost-kit/eslint-config';
|
|
3
|
+
import svelte from 'eslint-plugin-svelte';
|
|
4
|
+
import ts from 'typescript-eslint';
|
|
5
|
+
import { svelteRules } from './rules.js';
|
|
6
|
+
export const createSvelteConfig = async ({ tsconfigRootDir, }) => {
|
|
7
|
+
const shared = createConfig({ tsconfigRootDir });
|
|
8
|
+
const policy = createTypeScriptPolicy({ tsconfigRootDir });
|
|
9
|
+
return [
|
|
10
|
+
{ name: 'gost-svelte/ignores', ignores: ['**/.svelte-kit/**'] },
|
|
11
|
+
...shared,
|
|
12
|
+
...svelte.configs.base,
|
|
13
|
+
...svelte.configs.prettier,
|
|
14
|
+
{
|
|
15
|
+
name: 'gost-svelte/typescript-project',
|
|
16
|
+
files: ['**/*.{ts,tsx,mts,cts}', '**/*.svelte'],
|
|
17
|
+
languageOptions: { parserOptions: { extraFileExtensions: ['.svelte'] } },
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: 'gost-svelte/typescript-runes',
|
|
21
|
+
files: ['**/*.svelte.ts'],
|
|
22
|
+
languageOptions: { parser: ts.parser },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'gost-svelte/component-typescript',
|
|
26
|
+
files: ['**/*.svelte'],
|
|
27
|
+
plugins: policy.plugins,
|
|
28
|
+
rules: policy.rules,
|
|
29
|
+
languageOptions: {
|
|
30
|
+
parserOptions: {
|
|
31
|
+
parser: ts.parser,
|
|
32
|
+
projectService: true,
|
|
33
|
+
tsconfigRootDir,
|
|
34
|
+
extraFileExtensions: ['.svelte'],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'gost-svelte/architecture',
|
|
40
|
+
files: ['**/*.svelte', '**/*.svelte.ts'],
|
|
41
|
+
plugins: { gost: plugin },
|
|
42
|
+
rules: { 'gost/require-feature-state-selector': 'error' },
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'gost-svelte/selected-rules',
|
|
46
|
+
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
|
|
47
|
+
rules: svelteRules,
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createSvelteConfig } from './create-svelte-config.js';
|
package/dist/rules.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const svelteRules: {
|
|
2
|
+
'svelte/no-dupe-else-if-blocks': "error";
|
|
3
|
+
'svelte/no-not-function-handler': "error";
|
|
4
|
+
'svelte/no-object-in-text-mustaches': "error";
|
|
5
|
+
'svelte/require-each-key': "error";
|
|
6
|
+
'svelte/valid-each-key': "error";
|
|
7
|
+
'svelte/button-has-type': "error";
|
|
8
|
+
'svelte/no-bind-value-on-checkable-inputs': "error";
|
|
9
|
+
'svelte/no-dupe-style-properties': "error";
|
|
10
|
+
'svelte/no-shorthand-style-property-overrides': "error";
|
|
11
|
+
'svelte/no-unknown-style-directive-property': "error";
|
|
12
|
+
'svelte/no-conflicting-module-names': "error";
|
|
13
|
+
'svelte/no-svelte-internal': "error";
|
|
14
|
+
'svelte/no-at-debug-tags': "error";
|
|
15
|
+
'svelte/no-inspect': "error";
|
|
16
|
+
'svelte/no-unused-svelte-ignore': "error";
|
|
17
|
+
'svelte/no-unused-props': "error";
|
|
18
|
+
'svelte/no-unnecessary-state-wrap': "error";
|
|
19
|
+
'svelte/prefer-derived-over-derived-by': "error";
|
|
20
|
+
'svelte/prefer-writable-derived': "error";
|
|
21
|
+
'svelte/no-at-html-tags': "error";
|
|
22
|
+
'svelte/block-lang': ["error", {
|
|
23
|
+
script: string;
|
|
24
|
+
enforceScriptPresent: boolean;
|
|
25
|
+
}];
|
|
26
|
+
'svelte/no-store-async': "error";
|
|
27
|
+
'svelte/no-ignored-unsubscribe': "error";
|
|
28
|
+
};
|
package/dist/rules.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export const svelteRules = {
|
|
2
|
+
'svelte/no-dupe-else-if-blocks': 'error',
|
|
3
|
+
'svelte/no-not-function-handler': 'error',
|
|
4
|
+
'svelte/no-object-in-text-mustaches': 'error',
|
|
5
|
+
'svelte/require-each-key': 'error',
|
|
6
|
+
'svelte/valid-each-key': 'error',
|
|
7
|
+
'svelte/button-has-type': 'error',
|
|
8
|
+
'svelte/no-bind-value-on-checkable-inputs': 'error',
|
|
9
|
+
'svelte/no-dupe-style-properties': 'error',
|
|
10
|
+
'svelte/no-shorthand-style-property-overrides': 'error',
|
|
11
|
+
'svelte/no-unknown-style-directive-property': 'error',
|
|
12
|
+
'svelte/no-conflicting-module-names': 'error',
|
|
13
|
+
'svelte/no-svelte-internal': 'error',
|
|
14
|
+
'svelte/no-at-debug-tags': 'error',
|
|
15
|
+
'svelte/no-inspect': 'error',
|
|
16
|
+
'svelte/no-unused-svelte-ignore': 'error',
|
|
17
|
+
'svelte/no-unused-props': 'error',
|
|
18
|
+
'svelte/no-unnecessary-state-wrap': 'error',
|
|
19
|
+
'svelte/prefer-derived-over-derived-by': 'error',
|
|
20
|
+
'svelte/prefer-writable-derived': 'error',
|
|
21
|
+
'svelte/no-at-html-tags': 'error',
|
|
22
|
+
'svelte/block-lang': ['error', { script: 'ts', enforceScriptPresent: false }],
|
|
23
|
+
'svelte/no-store-async': 'error',
|
|
24
|
+
'svelte/no-ignored-unsubscribe': 'error',
|
|
25
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gost-kit/eslint-config-svelte",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Shared Svelte 5 ESLint configuration with the GOST JavaScript and TypeScript baseline.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": "^26.0.0"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"CHANGELOG.md",
|
|
13
|
+
"RULES.md"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
24
|
+
"check": "tsc -p tsconfig.json",
|
|
25
|
+
"test": "vitest run",
|
|
26
|
+
"prepack": "npm run build",
|
|
27
|
+
"clean": "node --input-type=module -e \"import { rmSync } from 'node:fs'; rmSync('dist', { recursive: true, force: true });\""
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/antonsmolko/gost-kit.git",
|
|
32
|
+
"directory": "packages/eslint-config-svelte"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "26.6.5",
|
|
39
|
+
"typescript": "5.9.3",
|
|
40
|
+
"tsc-alias": "1.9.9",
|
|
41
|
+
"vitest": "5.0.5",
|
|
42
|
+
"eslint": "10.14.0",
|
|
43
|
+
"prettier": "3.9.10",
|
|
44
|
+
"@gost-kit/prettier-config": "0.1.0",
|
|
45
|
+
"svelte": "5.57.2",
|
|
46
|
+
"prettier-plugin-svelte": "4.1.1"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@gost-kit/eslint-config": "0.2.0",
|
|
50
|
+
"eslint-plugin-svelte": "3.24.0",
|
|
51
|
+
"svelte-eslint-parser": "1.10.1",
|
|
52
|
+
"typescript-eslint": "8.72.1",
|
|
53
|
+
"@gost-kit/eslint-plugin": "0.1.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"eslint": "^10.14.0",
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"svelte": "^5.57.2"
|
|
59
|
+
}
|
|
60
|
+
}
|