@ntnyq/eslint-config 5.0.0-beta.2 → 5.0.0-beta.3
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/README.md +1 -0
- package/dist/index.d.ts +621 -78
- package/dist/index.js +151 -47
- package/package.json +31 -10
package/README.md
CHANGED
|
@@ -240,6 +240,7 @@ export interface ConfigOptions {
|
|
|
240
240
|
astro?: boolean | ConfigAstroOptions
|
|
241
241
|
html?: boolean | ConfigHtmlOptions
|
|
242
242
|
pnpm?: boolean | ConfigPnpmOptions
|
|
243
|
+
svelte?: boolean | ConfigSvelteOptions
|
|
243
244
|
svgo?: boolean | ConfigSVGOOptions
|
|
244
245
|
eslintPlugin?: boolean | ConfigESLintPluginOptions
|
|
245
246
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import * as pluginRegexp from "eslint-plugin-regexp";
|
|
|
10
10
|
import pluginNode from "eslint-plugin-n";
|
|
11
11
|
import pluginVue from "eslint-plugin-vue";
|
|
12
12
|
import pluginYml from "eslint-plugin-yml";
|
|
13
|
-
import pluginPnpm from "eslint-plugin-pnpm";
|
|
14
13
|
import pluginSvgo from "eslint-plugin-svgo";
|
|
15
14
|
import pluginToml from "eslint-plugin-toml";
|
|
16
15
|
import pluginMarkdown from "@eslint/markdown";
|
|
@@ -160,7 +159,7 @@ type ConfigPnpmOptions = {
|
|
|
160
159
|
* @param options - {@link ConfigPnpmOptions}
|
|
161
160
|
* @returns ESLint configs
|
|
162
161
|
*/
|
|
163
|
-
declare const configPnpm: (options?: ConfigPnpmOptions) => TypedConfigItem[]
|
|
162
|
+
declare const configPnpm: (options?: ConfigPnpmOptions) => Promise<TypedConfigItem[]>;
|
|
164
163
|
|
|
165
164
|
//#endregion
|
|
166
165
|
//#region src/configs/sort.d.ts
|
|
@@ -449,6 +448,22 @@ type ConfigRegexpOptions = OptionsOverrides & {
|
|
|
449
448
|
*/
|
|
450
449
|
declare const configRegexp: (options?: ConfigRegexpOptions) => TypedConfigItem[];
|
|
451
450
|
|
|
451
|
+
//#endregion
|
|
452
|
+
//#region src/configs/svelte.d.ts
|
|
453
|
+
/**
|
|
454
|
+
* Options type of {@link configSvelte}
|
|
455
|
+
*/
|
|
456
|
+
type ConfigSvelteOptions = OptionsFiles & OptionsOverrides & OptionsShareable;
|
|
457
|
+
/**
|
|
458
|
+
* Config for svelte files
|
|
459
|
+
*
|
|
460
|
+
* @see {@link https://github.com/ota-meshi/eslint-plugin-svelte}
|
|
461
|
+
*
|
|
462
|
+
* @param options - {@link ConfigSvelteOptions}
|
|
463
|
+
* @returns ESLint configs
|
|
464
|
+
*/
|
|
465
|
+
declare const configSvelte: (options?: ConfigSvelteOptions) => Promise<TypedConfigItem[]>;
|
|
466
|
+
|
|
452
467
|
//#endregion
|
|
453
468
|
//#region src/configs/unocss.d.ts
|
|
454
469
|
/**
|
|
@@ -5412,6 +5427,394 @@ interface RuleOptions {
|
|
|
5412
5427
|
* @see https://eslint.org/docs/latest/rules/strict
|
|
5413
5428
|
*/
|
|
5414
5429
|
'strict'?: Linter.RuleEntry<Strict>;
|
|
5430
|
+
/**
|
|
5431
|
+
* disallow conditionals where the type is always truthy or always falsy
|
|
5432
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/@typescript-eslint/no-unnecessary-condition/
|
|
5433
|
+
* @deprecated
|
|
5434
|
+
*/
|
|
5435
|
+
'svelte/@typescript-eslint/no-unnecessary-condition'?: Linter.RuleEntry<SvelteTypescriptEslintNoUnnecessaryCondition>;
|
|
5436
|
+
/**
|
|
5437
|
+
* disallows the use of languages other than those specified in the configuration for the lang attribute of `<script>` and `<style>` blocks.
|
|
5438
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/block-lang/
|
|
5439
|
+
*/
|
|
5440
|
+
'svelte/block-lang'?: Linter.RuleEntry<SvelteBlockLang>;
|
|
5441
|
+
/**
|
|
5442
|
+
* disallow usage of button without an explicit type attribute
|
|
5443
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/button-has-type/
|
|
5444
|
+
*/
|
|
5445
|
+
'svelte/button-has-type'?: Linter.RuleEntry<SvelteButtonHasType>;
|
|
5446
|
+
/**
|
|
5447
|
+
* support comment-directives in HTML template
|
|
5448
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/comment-directive/
|
|
5449
|
+
*/
|
|
5450
|
+
'svelte/comment-directive'?: Linter.RuleEntry<SvelteCommentDirective>;
|
|
5451
|
+
/**
|
|
5452
|
+
* enforce a consistent style for CSS selectors
|
|
5453
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/consistent-selector-style/
|
|
5454
|
+
*/
|
|
5455
|
+
'svelte/consistent-selector-style'?: Linter.RuleEntry<SvelteConsistentSelectorStyle>;
|
|
5456
|
+
/**
|
|
5457
|
+
* derived store should use same variable names between values and callback
|
|
5458
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/derived-has-same-inputs-outputs/
|
|
5459
|
+
*/
|
|
5460
|
+
'svelte/derived-has-same-inputs-outputs'?: Linter.RuleEntry<[]>;
|
|
5461
|
+
/**
|
|
5462
|
+
* require slot type declaration using the `$$Slots` interface
|
|
5463
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/experimental-require-slot-types/
|
|
5464
|
+
*/
|
|
5465
|
+
'svelte/experimental-require-slot-types'?: Linter.RuleEntry<[]>;
|
|
5466
|
+
/**
|
|
5467
|
+
* require the strictEvents attribute on `<script>` tags
|
|
5468
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/experimental-require-strict-events/
|
|
5469
|
+
*/
|
|
5470
|
+
'svelte/experimental-require-strict-events'?: Linter.RuleEntry<[]>;
|
|
5471
|
+
/**
|
|
5472
|
+
* enforce the location of first attribute
|
|
5473
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/first-attribute-linebreak/
|
|
5474
|
+
*/
|
|
5475
|
+
'svelte/first-attribute-linebreak'?: Linter.RuleEntry<SvelteFirstAttributeLinebreak>;
|
|
5476
|
+
/**
|
|
5477
|
+
* Require or disallow a line break before tag's closing brackets
|
|
5478
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-new-line/
|
|
5479
|
+
*/
|
|
5480
|
+
'svelte/html-closing-bracket-new-line'?: Linter.RuleEntry<SvelteHtmlClosingBracketNewLine>;
|
|
5481
|
+
/**
|
|
5482
|
+
* require or disallow a space before tag's closing brackets
|
|
5483
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/html-closing-bracket-spacing/
|
|
5484
|
+
*/
|
|
5485
|
+
'svelte/html-closing-bracket-spacing'?: Linter.RuleEntry<SvelteHtmlClosingBracketSpacing>;
|
|
5486
|
+
/**
|
|
5487
|
+
* enforce quotes style of HTML attributes
|
|
5488
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/html-quotes/
|
|
5489
|
+
*/
|
|
5490
|
+
'svelte/html-quotes'?: Linter.RuleEntry<SvelteHtmlQuotes>;
|
|
5491
|
+
/**
|
|
5492
|
+
* enforce self-closing style
|
|
5493
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/html-self-closing/
|
|
5494
|
+
*/
|
|
5495
|
+
'svelte/html-self-closing'?: Linter.RuleEntry<SvelteHtmlSelfClosing>;
|
|
5496
|
+
/**
|
|
5497
|
+
* enforce consistent indentation
|
|
5498
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/indent/
|
|
5499
|
+
*/
|
|
5500
|
+
'svelte/indent'?: Linter.RuleEntry<SvelteIndent>;
|
|
5501
|
+
/**
|
|
5502
|
+
* Svelte runtime prevents calling the same reactive statement twice in a microtask. But between different microtask, it doesn't prevent.
|
|
5503
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/infinite-reactive-loop/
|
|
5504
|
+
*/
|
|
5505
|
+
'svelte/infinite-reactive-loop'?: Linter.RuleEntry<[]>;
|
|
5506
|
+
/**
|
|
5507
|
+
* enforce the maximum number of attributes per line
|
|
5508
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/max-attributes-per-line/
|
|
5509
|
+
*/
|
|
5510
|
+
'svelte/max-attributes-per-line'?: Linter.RuleEntry<SvelteMaxAttributesPerLine>;
|
|
5511
|
+
/**
|
|
5512
|
+
* enforce unified spacing in mustache
|
|
5513
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/mustache-spacing/
|
|
5514
|
+
*/
|
|
5515
|
+
'svelte/mustache-spacing'?: Linter.RuleEntry<SvelteMustacheSpacing>;
|
|
5516
|
+
/**
|
|
5517
|
+
* Warns against the use of `addEventListener`
|
|
5518
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-add-event-listener/
|
|
5519
|
+
*/
|
|
5520
|
+
'svelte/no-add-event-listener'?: Linter.RuleEntry<[]>;
|
|
5521
|
+
/**
|
|
5522
|
+
* disallow the use of `{@debug}`
|
|
5523
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-debug-tags/
|
|
5524
|
+
*/
|
|
5525
|
+
'svelte/no-at-debug-tags'?: Linter.RuleEntry<[]>;
|
|
5526
|
+
/**
|
|
5527
|
+
* disallow use of `{@html}` to prevent XSS attack
|
|
5528
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-html-tags/
|
|
5529
|
+
*/
|
|
5530
|
+
'svelte/no-at-html-tags'?: Linter.RuleEntry<[]>;
|
|
5531
|
+
/**
|
|
5532
|
+
* disallow DOM manipulating
|
|
5533
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dom-manipulating/
|
|
5534
|
+
*/
|
|
5535
|
+
'svelte/no-dom-manipulating'?: Linter.RuleEntry<[]>;
|
|
5536
|
+
/**
|
|
5537
|
+
* disallow duplicate conditions in `{#if}` / `{:else if}` chains
|
|
5538
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-else-if-blocks/
|
|
5539
|
+
*/
|
|
5540
|
+
'svelte/no-dupe-else-if-blocks'?: Linter.RuleEntry<[]>;
|
|
5541
|
+
/**
|
|
5542
|
+
* disallow duplicate `on:` directives
|
|
5543
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-on-directives/
|
|
5544
|
+
*/
|
|
5545
|
+
'svelte/no-dupe-on-directives'?: Linter.RuleEntry<[]>;
|
|
5546
|
+
/**
|
|
5547
|
+
* disallow duplicate style properties
|
|
5548
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-style-properties/
|
|
5549
|
+
*/
|
|
5550
|
+
'svelte/no-dupe-style-properties'?: Linter.RuleEntry<[]>;
|
|
5551
|
+
/**
|
|
5552
|
+
* disallow duplicate `use:` directives
|
|
5553
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dupe-use-directives/
|
|
5554
|
+
*/
|
|
5555
|
+
'svelte/no-dupe-use-directives'?: Linter.RuleEntry<[]>;
|
|
5556
|
+
/**
|
|
5557
|
+
* disallow dynamic slot name
|
|
5558
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-dynamic-slot-name/
|
|
5559
|
+
* @deprecated
|
|
5560
|
+
*/
|
|
5561
|
+
'svelte/no-dynamic-slot-name'?: Linter.RuleEntry<[]>;
|
|
5562
|
+
/**
|
|
5563
|
+
* disallow exporting load functions in `*.svelte` module in SvelteKit page components.
|
|
5564
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-export-load-in-svelte-module-in-kit-pages/
|
|
5565
|
+
*/
|
|
5566
|
+
'svelte/no-export-load-in-svelte-module-in-kit-pages'?: Linter.RuleEntry<[]>;
|
|
5567
|
+
/**
|
|
5568
|
+
* disallow wrapping single reactive statements in curly braces
|
|
5569
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-extra-reactive-curlies/
|
|
5570
|
+
*/
|
|
5571
|
+
'svelte/no-extra-reactive-curlies'?: Linter.RuleEntry<[]>;
|
|
5572
|
+
/**
|
|
5573
|
+
* disallow using goto() without the base path
|
|
5574
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-goto-without-base/
|
|
5575
|
+
* @deprecated
|
|
5576
|
+
*/
|
|
5577
|
+
'svelte/no-goto-without-base'?: Linter.RuleEntry<[]>;
|
|
5578
|
+
/**
|
|
5579
|
+
* disallow ignoring the unsubscribe method returned by the `subscribe()` on Svelte stores.
|
|
5580
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-ignored-unsubscribe/
|
|
5581
|
+
*/
|
|
5582
|
+
'svelte/no-ignored-unsubscribe'?: Linter.RuleEntry<[]>;
|
|
5583
|
+
/**
|
|
5584
|
+
* disallow reactive statements that don't reference reactive values.
|
|
5585
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-immutable-reactive-statements/
|
|
5586
|
+
*/
|
|
5587
|
+
'svelte/no-immutable-reactive-statements'?: Linter.RuleEntry<[]>;
|
|
5588
|
+
/**
|
|
5589
|
+
* disallow attributes and directives that produce inline styles
|
|
5590
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inline-styles/
|
|
5591
|
+
*/
|
|
5592
|
+
'svelte/no-inline-styles'?: Linter.RuleEntry<SvelteNoInlineStyles>;
|
|
5593
|
+
/**
|
|
5594
|
+
* disallow variable or `function` declarations in nested blocks
|
|
5595
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inner-declarations/
|
|
5596
|
+
*/
|
|
5597
|
+
'svelte/no-inner-declarations'?: Linter.RuleEntry<SvelteNoInnerDeclarations>;
|
|
5598
|
+
/**
|
|
5599
|
+
* Warns against the use of `$inspect` directive
|
|
5600
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-inspect/
|
|
5601
|
+
*/
|
|
5602
|
+
'svelte/no-inspect'?: Linter.RuleEntry<[]>;
|
|
5603
|
+
/**
|
|
5604
|
+
* disallow using navigation (links, goto, pushState, replaceState) without the base path
|
|
5605
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-base/
|
|
5606
|
+
*/
|
|
5607
|
+
'svelte/no-navigation-without-base'?: Linter.RuleEntry<SvelteNoNavigationWithoutBase>;
|
|
5608
|
+
/**
|
|
5609
|
+
* disallow use of not function in event handler
|
|
5610
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-not-function-handler/
|
|
5611
|
+
*/
|
|
5612
|
+
'svelte/no-not-function-handler'?: Linter.RuleEntry<[]>;
|
|
5613
|
+
/**
|
|
5614
|
+
* disallow objects in text mustache interpolation
|
|
5615
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-object-in-text-mustaches/
|
|
5616
|
+
*/
|
|
5617
|
+
'svelte/no-object-in-text-mustaches'?: Linter.RuleEntry<[]>;
|
|
5618
|
+
/**
|
|
5619
|
+
* Checks for invalid raw HTML elements
|
|
5620
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-raw-special-elements/
|
|
5621
|
+
*/
|
|
5622
|
+
'svelte/no-raw-special-elements'?: Linter.RuleEntry<[]>;
|
|
5623
|
+
/**
|
|
5624
|
+
* it's not necessary to define functions in reactive statements
|
|
5625
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-functions/
|
|
5626
|
+
*/
|
|
5627
|
+
'svelte/no-reactive-functions'?: Linter.RuleEntry<[]>;
|
|
5628
|
+
/**
|
|
5629
|
+
* don't assign literal values in reactive statements
|
|
5630
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-literals/
|
|
5631
|
+
*/
|
|
5632
|
+
'svelte/no-reactive-literals'?: Linter.RuleEntry<[]>;
|
|
5633
|
+
/**
|
|
5634
|
+
* disallow reassigning reactive values
|
|
5635
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-reactive-reassign/
|
|
5636
|
+
*/
|
|
5637
|
+
'svelte/no-reactive-reassign'?: Linter.RuleEntry<SvelteNoReactiveReassign>;
|
|
5638
|
+
/**
|
|
5639
|
+
* disallow specific HTML elements
|
|
5640
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-restricted-html-elements/
|
|
5641
|
+
*/
|
|
5642
|
+
'svelte/no-restricted-html-elements'?: Linter.RuleEntry<SvelteNoRestrictedHtmlElements>;
|
|
5643
|
+
/**
|
|
5644
|
+
* disallow shorthand style properties that override related longhand properties
|
|
5645
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-shorthand-style-property-overrides/
|
|
5646
|
+
*/
|
|
5647
|
+
'svelte/no-shorthand-style-property-overrides'?: Linter.RuleEntry<[]>;
|
|
5648
|
+
/**
|
|
5649
|
+
* disallow spaces around equal signs in attribute
|
|
5650
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-spaces-around-equal-signs-in-attribute/
|
|
5651
|
+
*/
|
|
5652
|
+
'svelte/no-spaces-around-equal-signs-in-attribute'?: Linter.RuleEntry<[]>;
|
|
5653
|
+
/**
|
|
5654
|
+
* disallow using async/await inside svelte stores because it causes issues with the auto-unsubscribing features
|
|
5655
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-store-async/
|
|
5656
|
+
*/
|
|
5657
|
+
'svelte/no-store-async'?: Linter.RuleEntry<[]>;
|
|
5658
|
+
/**
|
|
5659
|
+
* svelte/internal will be removed in Svelte 6.
|
|
5660
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-svelte-internal/
|
|
5661
|
+
*/
|
|
5662
|
+
'svelte/no-svelte-internal'?: Linter.RuleEntry<[]>;
|
|
5663
|
+
/**
|
|
5664
|
+
* disallow `target="_blank"` attribute without `rel="noopener noreferrer"`
|
|
5665
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-target-blank/
|
|
5666
|
+
*/
|
|
5667
|
+
'svelte/no-target-blank'?: Linter.RuleEntry<SvelteNoTargetBlank>;
|
|
5668
|
+
/**
|
|
5669
|
+
* disallow using top-level browser global variables
|
|
5670
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-top-level-browser-globals/
|
|
5671
|
+
*/
|
|
5672
|
+
'svelte/no-top-level-browser-globals'?: Linter.RuleEntry<[]>;
|
|
5673
|
+
/**
|
|
5674
|
+
* disallow trailing whitespace at the end of lines
|
|
5675
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-trailing-spaces/
|
|
5676
|
+
*/
|
|
5677
|
+
'svelte/no-trailing-spaces'?: Linter.RuleEntry<SvelteNoTrailingSpaces>;
|
|
5678
|
+
/**
|
|
5679
|
+
* disallow unknown `style:property`
|
|
5680
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unknown-style-directive-property/
|
|
5681
|
+
*/
|
|
5682
|
+
'svelte/no-unknown-style-directive-property'?: Linter.RuleEntry<SvelteNoUnknownStyleDirectiveProperty>;
|
|
5683
|
+
/**
|
|
5684
|
+
* Disallow unnecessary $state wrapping of reactive classes
|
|
5685
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unnecessary-state-wrap/
|
|
5686
|
+
*/
|
|
5687
|
+
'svelte/no-unnecessary-state-wrap'?: Linter.RuleEntry<SvelteNoUnnecessaryStateWrap>;
|
|
5688
|
+
/**
|
|
5689
|
+
* disallow the use of a class in the template without a corresponding style
|
|
5690
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-class-name/
|
|
5691
|
+
*/
|
|
5692
|
+
'svelte/no-unused-class-name'?: Linter.RuleEntry<SvelteNoUnusedClassName>;
|
|
5693
|
+
/**
|
|
5694
|
+
* Warns about defined Props properties that are unused
|
|
5695
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-props/
|
|
5696
|
+
*/
|
|
5697
|
+
'svelte/no-unused-props'?: Linter.RuleEntry<SvelteNoUnusedProps>;
|
|
5698
|
+
/**
|
|
5699
|
+
* disallow unused svelte-ignore comments
|
|
5700
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-unused-svelte-ignore/
|
|
5701
|
+
*/
|
|
5702
|
+
'svelte/no-unused-svelte-ignore'?: Linter.RuleEntry<[]>;
|
|
5703
|
+
/**
|
|
5704
|
+
* disallow explicit children snippet where it's not needed
|
|
5705
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-children-snippet/
|
|
5706
|
+
*/
|
|
5707
|
+
'svelte/no-useless-children-snippet'?: Linter.RuleEntry<[]>;
|
|
5708
|
+
/**
|
|
5709
|
+
* disallow unnecessary mustache interpolations
|
|
5710
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
5711
|
+
*/
|
|
5712
|
+
'svelte/no-useless-mustaches'?: Linter.RuleEntry<SvelteNoUselessMustaches>;
|
|
5713
|
+
/**
|
|
5714
|
+
* require class directives instead of ternary expressions
|
|
5715
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-class-directive/
|
|
5716
|
+
*/
|
|
5717
|
+
'svelte/prefer-class-directive'?: Linter.RuleEntry<SveltePreferClassDirective>;
|
|
5718
|
+
/**
|
|
5719
|
+
* Require `const` declarations for variables that are never reassigned after declared
|
|
5720
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
|
|
5721
|
+
*/
|
|
5722
|
+
'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>;
|
|
5723
|
+
/**
|
|
5724
|
+
* destructure values from object stores for better change tracking & fewer redraws
|
|
5725
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-destructured-store-props/
|
|
5726
|
+
*/
|
|
5727
|
+
'svelte/prefer-destructured-store-props'?: Linter.RuleEntry<[]>;
|
|
5728
|
+
/**
|
|
5729
|
+
* require style directives instead of style attribute
|
|
5730
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-style-directive/
|
|
5731
|
+
*/
|
|
5732
|
+
'svelte/prefer-style-directive'?: Linter.RuleEntry<[]>;
|
|
5733
|
+
/**
|
|
5734
|
+
* Prefer using writable $derived instead of $state and $effect
|
|
5735
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-writable-derived/
|
|
5736
|
+
*/
|
|
5737
|
+
'svelte/prefer-writable-derived'?: Linter.RuleEntry<[]>;
|
|
5738
|
+
/**
|
|
5739
|
+
* require keyed `{#each}` block
|
|
5740
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/require-each-key/
|
|
5741
|
+
*/
|
|
5742
|
+
'svelte/require-each-key'?: Linter.RuleEntry<[]>;
|
|
5743
|
+
/**
|
|
5744
|
+
* require type parameters for `createEventDispatcher`
|
|
5745
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/require-event-dispatcher-types/
|
|
5746
|
+
*/
|
|
5747
|
+
'svelte/require-event-dispatcher-types'?: Linter.RuleEntry<[]>;
|
|
5748
|
+
/**
|
|
5749
|
+
* require component event names to start with "on"
|
|
5750
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/require-event-prefix/
|
|
5751
|
+
*/
|
|
5752
|
+
'svelte/require-event-prefix'?: Linter.RuleEntry<SvelteRequireEventPrefix>;
|
|
5753
|
+
/**
|
|
5754
|
+
* require style attributes that can be optimized
|
|
5755
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/require-optimized-style-attribute/
|
|
5756
|
+
*/
|
|
5757
|
+
'svelte/require-optimized-style-attribute'?: Linter.RuleEntry<[]>;
|
|
5758
|
+
/**
|
|
5759
|
+
* store callbacks must use `set` param
|
|
5760
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-callbacks-use-set-param/
|
|
5761
|
+
*/
|
|
5762
|
+
'svelte/require-store-callbacks-use-set-param'?: Linter.RuleEntry<[]>;
|
|
5763
|
+
/**
|
|
5764
|
+
* disallow to use of the store itself as an operand. Need to use $ prefix or get function.
|
|
5765
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/require-store-reactive-access/
|
|
5766
|
+
*/
|
|
5767
|
+
'svelte/require-store-reactive-access'?: Linter.RuleEntry<[]>;
|
|
5768
|
+
/**
|
|
5769
|
+
* require initial value in store
|
|
5770
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/require-stores-init/
|
|
5771
|
+
*/
|
|
5772
|
+
'svelte/require-stores-init'?: Linter.RuleEntry<[]>;
|
|
5773
|
+
/**
|
|
5774
|
+
* enforce use of shorthand syntax in attribute
|
|
5775
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/shorthand-attribute/
|
|
5776
|
+
*/
|
|
5777
|
+
'svelte/shorthand-attribute'?: Linter.RuleEntry<SvelteShorthandAttribute>;
|
|
5778
|
+
/**
|
|
5779
|
+
* enforce use of shorthand syntax in directives
|
|
5780
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/shorthand-directive/
|
|
5781
|
+
*/
|
|
5782
|
+
'svelte/shorthand-directive'?: Linter.RuleEntry<SvelteShorthandDirective>;
|
|
5783
|
+
/**
|
|
5784
|
+
* enforce order of attributes
|
|
5785
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/sort-attributes/
|
|
5786
|
+
*/
|
|
5787
|
+
'svelte/sort-attributes'?: Linter.RuleEntry<SvelteSortAttributes>;
|
|
5788
|
+
/**
|
|
5789
|
+
* enforce consistent spacing after the `<!--` and before the `-->` in a HTML comment
|
|
5790
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/spaced-html-comment/
|
|
5791
|
+
*/
|
|
5792
|
+
'svelte/spaced-html-comment'?: Linter.RuleEntry<SvelteSpacedHtmlComment>;
|
|
5793
|
+
/**
|
|
5794
|
+
* system rule for working this plugin
|
|
5795
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/system/
|
|
5796
|
+
*/
|
|
5797
|
+
'svelte/system'?: Linter.RuleEntry<[]>;
|
|
5798
|
+
/**
|
|
5799
|
+
* disallow warnings when compiling.
|
|
5800
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-compile/
|
|
5801
|
+
*/
|
|
5802
|
+
'svelte/valid-compile'?: Linter.RuleEntry<SvelteValidCompile>;
|
|
5803
|
+
/**
|
|
5804
|
+
* enforce keys to use variables defined in the `{#each}` block
|
|
5805
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-each-key/
|
|
5806
|
+
*/
|
|
5807
|
+
'svelte/valid-each-key'?: Linter.RuleEntry<[]>;
|
|
5808
|
+
/**
|
|
5809
|
+
* disallow props other than data or errors in SvelteKit page components.
|
|
5810
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
|
|
5811
|
+
*/
|
|
5812
|
+
'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>;
|
|
5813
|
+
/**
|
|
5814
|
+
* require valid style element parsing
|
|
5815
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-style-parse/
|
|
5816
|
+
*/
|
|
5817
|
+
'svelte/valid-style-parse'?: Linter.RuleEntry<[]>;
|
|
5415
5818
|
/**
|
|
5416
5819
|
* Use SVGO to optimize SVG files
|
|
5417
5820
|
* @see https://github.com/ntnyq/eslint-plugin-svgo
|
|
@@ -13693,6 +14096,196 @@ type SpacedComment = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
13693
14096
|
}];
|
|
13694
14097
|
// ----- strict -----
|
|
13695
14098
|
type Strict = [] | [("never" | "global" | "function" | "safe")];
|
|
14099
|
+
// ----- svelte/@typescript-eslint/no-unnecessary-condition -----
|
|
14100
|
+
type SvelteTypescriptEslintNoUnnecessaryCondition = [] | [{
|
|
14101
|
+
allowConstantLoopConditions?: boolean;
|
|
14102
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
|
|
14103
|
+
}];
|
|
14104
|
+
// ----- svelte/block-lang -----
|
|
14105
|
+
type SvelteBlockLang = [] | [{
|
|
14106
|
+
enforceScriptPresent?: boolean;
|
|
14107
|
+
enforceStylePresent?: boolean;
|
|
14108
|
+
script?: ((string | null) | [(string | null), ...((string | null))[]]);
|
|
14109
|
+
style?: ((string | null) | [(string | null), ...((string | null))[]]);
|
|
14110
|
+
}];
|
|
14111
|
+
// ----- svelte/button-has-type -----
|
|
14112
|
+
type SvelteButtonHasType = [] | [{
|
|
14113
|
+
button?: boolean;
|
|
14114
|
+
submit?: boolean;
|
|
14115
|
+
reset?: boolean;
|
|
14116
|
+
}];
|
|
14117
|
+
// ----- svelte/comment-directive -----
|
|
14118
|
+
type SvelteCommentDirective = [] | [{
|
|
14119
|
+
reportUnusedDisableDirectives?: boolean;
|
|
14120
|
+
}];
|
|
14121
|
+
// ----- svelte/consistent-selector-style -----
|
|
14122
|
+
type SvelteConsistentSelectorStyle = [] | [{
|
|
14123
|
+
checkGlobal?: boolean;
|
|
14124
|
+
style?: [] | [("class" | "id" | "type")] | [("class" | "id" | "type"), ("class" | "id" | "type")] | [("class" | "id" | "type"), ("class" | "id" | "type"), ("class" | "id" | "type")];
|
|
14125
|
+
}];
|
|
14126
|
+
// ----- svelte/first-attribute-linebreak -----
|
|
14127
|
+
type SvelteFirstAttributeLinebreak = [] | [{
|
|
14128
|
+
multiline?: ("below" | "beside");
|
|
14129
|
+
singleline?: ("below" | "beside");
|
|
14130
|
+
}];
|
|
14131
|
+
// ----- svelte/html-closing-bracket-new-line -----
|
|
14132
|
+
type SvelteHtmlClosingBracketNewLine = [] | [{
|
|
14133
|
+
singleline?: ("always" | "never");
|
|
14134
|
+
multiline?: ("always" | "never");
|
|
14135
|
+
selfClosingTag?: {
|
|
14136
|
+
singleline?: ("always" | "never");
|
|
14137
|
+
multiline?: ("always" | "never");
|
|
14138
|
+
};
|
|
14139
|
+
}];
|
|
14140
|
+
// ----- svelte/html-closing-bracket-spacing -----
|
|
14141
|
+
type SvelteHtmlClosingBracketSpacing = [] | [{
|
|
14142
|
+
startTag?: ("always" | "never" | "ignore");
|
|
14143
|
+
endTag?: ("always" | "never" | "ignore");
|
|
14144
|
+
selfClosingTag?: ("always" | "never" | "ignore");
|
|
14145
|
+
}];
|
|
14146
|
+
// ----- svelte/html-quotes -----
|
|
14147
|
+
type SvelteHtmlQuotes = [] | [{
|
|
14148
|
+
prefer?: ("double" | "single");
|
|
14149
|
+
dynamic?: {
|
|
14150
|
+
quoted?: boolean;
|
|
14151
|
+
avoidInvalidUnquotedInHTML?: boolean;
|
|
14152
|
+
};
|
|
14153
|
+
}];
|
|
14154
|
+
// ----- svelte/html-self-closing -----
|
|
14155
|
+
type SvelteHtmlSelfClosing = [] | [({
|
|
14156
|
+
void?: ("never" | "always" | "ignore");
|
|
14157
|
+
normal?: ("never" | "always" | "ignore");
|
|
14158
|
+
svg?: ("never" | "always" | "ignore");
|
|
14159
|
+
math?: ("never" | "always" | "ignore");
|
|
14160
|
+
component?: ("never" | "always" | "ignore");
|
|
14161
|
+
svelte?: ("never" | "always" | "ignore");
|
|
14162
|
+
} | ("all" | "html" | "none"))];
|
|
14163
|
+
// ----- svelte/indent -----
|
|
14164
|
+
type SvelteIndent = [] | [{
|
|
14165
|
+
indent?: (number | "tab");
|
|
14166
|
+
indentScript?: boolean;
|
|
14167
|
+
switchCase?: number;
|
|
14168
|
+
alignAttributesVertically?: boolean;
|
|
14169
|
+
ignoredNodes?: (string & {
|
|
14170
|
+
[k: string]: unknown | undefined;
|
|
14171
|
+
} & {
|
|
14172
|
+
[k: string]: unknown | undefined;
|
|
14173
|
+
})[];
|
|
14174
|
+
}];
|
|
14175
|
+
// ----- svelte/max-attributes-per-line -----
|
|
14176
|
+
type SvelteMaxAttributesPerLine = [] | [{
|
|
14177
|
+
multiline?: number;
|
|
14178
|
+
singleline?: number;
|
|
14179
|
+
}];
|
|
14180
|
+
// ----- svelte/mustache-spacing -----
|
|
14181
|
+
type SvelteMustacheSpacing = [] | [{
|
|
14182
|
+
textExpressions?: ("never" | "always");
|
|
14183
|
+
attributesAndProps?: ("never" | "always");
|
|
14184
|
+
directiveExpressions?: ("never" | "always");
|
|
14185
|
+
tags?: {
|
|
14186
|
+
openingBrace?: ("never" | "always");
|
|
14187
|
+
closingBrace?: ("never" | "always" | "always-after-expression");
|
|
14188
|
+
};
|
|
14189
|
+
}];
|
|
14190
|
+
// ----- svelte/no-inline-styles -----
|
|
14191
|
+
type SvelteNoInlineStyles = [] | [{
|
|
14192
|
+
allowTransitions?: boolean;
|
|
14193
|
+
}];
|
|
14194
|
+
// ----- svelte/no-inner-declarations -----
|
|
14195
|
+
type SvelteNoInnerDeclarations = [] | [("functions" | "both")] | [("functions" | "both"), {
|
|
14196
|
+
blockScopedFunctions?: ("allow" | "disallow");
|
|
14197
|
+
}];
|
|
14198
|
+
// ----- svelte/no-navigation-without-base -----
|
|
14199
|
+
type SvelteNoNavigationWithoutBase = [] | [{
|
|
14200
|
+
ignoreGoto?: boolean;
|
|
14201
|
+
ignoreLinks?: boolean;
|
|
14202
|
+
ignorePushState?: boolean;
|
|
14203
|
+
ignoreReplaceState?: boolean;
|
|
14204
|
+
}];
|
|
14205
|
+
// ----- svelte/no-reactive-reassign -----
|
|
14206
|
+
type SvelteNoReactiveReassign = [] | [{
|
|
14207
|
+
props?: boolean;
|
|
14208
|
+
}];
|
|
14209
|
+
// ----- svelte/no-restricted-html-elements -----
|
|
14210
|
+
type SvelteNoRestrictedHtmlElements = [(string | {
|
|
14211
|
+
elements?: [string, ...(string)[]];
|
|
14212
|
+
message?: string;
|
|
14213
|
+
}), ...((string | {
|
|
14214
|
+
elements?: [string, ...(string)[]];
|
|
14215
|
+
message?: string;
|
|
14216
|
+
}))[]];
|
|
14217
|
+
// ----- svelte/no-target-blank -----
|
|
14218
|
+
type SvelteNoTargetBlank = [] | [{
|
|
14219
|
+
allowReferrer?: boolean;
|
|
14220
|
+
enforceDynamicLinks?: ("always" | "never");
|
|
14221
|
+
}];
|
|
14222
|
+
// ----- svelte/no-trailing-spaces -----
|
|
14223
|
+
type SvelteNoTrailingSpaces = [] | [{
|
|
14224
|
+
skipBlankLines?: boolean;
|
|
14225
|
+
ignoreComments?: boolean;
|
|
14226
|
+
}];
|
|
14227
|
+
// ----- svelte/no-unknown-style-directive-property -----
|
|
14228
|
+
type SvelteNoUnknownStyleDirectiveProperty = [] | [{
|
|
14229
|
+
ignoreProperties?: [string, ...(string)[]];
|
|
14230
|
+
ignorePrefixed?: boolean;
|
|
14231
|
+
}];
|
|
14232
|
+
// ----- svelte/no-unnecessary-state-wrap -----
|
|
14233
|
+
type SvelteNoUnnecessaryStateWrap = [] | [{
|
|
14234
|
+
additionalReactiveClasses?: string[];
|
|
14235
|
+
allowReassign?: boolean;
|
|
14236
|
+
}];
|
|
14237
|
+
// ----- svelte/no-unused-class-name -----
|
|
14238
|
+
type SvelteNoUnusedClassName = [] | [{
|
|
14239
|
+
allowedClassNames?: string[];
|
|
14240
|
+
}];
|
|
14241
|
+
// ----- svelte/no-unused-props -----
|
|
14242
|
+
type SvelteNoUnusedProps = [] | [{
|
|
14243
|
+
checkImportedTypes?: boolean;
|
|
14244
|
+
ignoreTypePatterns?: string[];
|
|
14245
|
+
ignorePropertyPatterns?: string[];
|
|
14246
|
+
allowUnusedNestedProperties?: boolean;
|
|
14247
|
+
}];
|
|
14248
|
+
// ----- svelte/no-useless-mustaches -----
|
|
14249
|
+
type SvelteNoUselessMustaches = [] | [{
|
|
14250
|
+
ignoreIncludesComment?: boolean;
|
|
14251
|
+
ignoreStringEscape?: boolean;
|
|
14252
|
+
}];
|
|
14253
|
+
// ----- svelte/prefer-class-directive -----
|
|
14254
|
+
type SveltePreferClassDirective = [] | [{
|
|
14255
|
+
prefer?: ("always" | "empty");
|
|
14256
|
+
}];
|
|
14257
|
+
// ----- svelte/prefer-const -----
|
|
14258
|
+
type SveltePreferConst = [] | [{
|
|
14259
|
+
destructuring?: ("any" | "all");
|
|
14260
|
+
ignoreReadBeforeAssign?: boolean;
|
|
14261
|
+
excludedRunes?: string[];
|
|
14262
|
+
}];
|
|
14263
|
+
// ----- svelte/require-event-prefix -----
|
|
14264
|
+
type SvelteRequireEventPrefix = [] | [{
|
|
14265
|
+
checkAsyncFunctions?: boolean;
|
|
14266
|
+
}];
|
|
14267
|
+
// ----- svelte/shorthand-attribute -----
|
|
14268
|
+
type SvelteShorthandAttribute = [] | [{
|
|
14269
|
+
prefer?: ("always" | "never");
|
|
14270
|
+
}];
|
|
14271
|
+
// ----- svelte/shorthand-directive -----
|
|
14272
|
+
type SvelteShorthandDirective = [] | [{
|
|
14273
|
+
prefer?: ("always" | "never");
|
|
14274
|
+
}];
|
|
14275
|
+
// ----- svelte/sort-attributes -----
|
|
14276
|
+
type SvelteSortAttributes = [] | [{
|
|
14277
|
+
order?: (string | [string, ...(string)[]] | {
|
|
14278
|
+
match: (string | [string, ...(string)[]]);
|
|
14279
|
+
sort: ("alphabetical" | "ignore");
|
|
14280
|
+
})[];
|
|
14281
|
+
alphabetical?: boolean;
|
|
14282
|
+
}];
|
|
14283
|
+
// ----- svelte/spaced-html-comment -----
|
|
14284
|
+
type SvelteSpacedHtmlComment = [] | [("always" | "never")];
|
|
14285
|
+
// ----- svelte/valid-compile -----
|
|
14286
|
+
type SvelteValidCompile = [] | [{
|
|
14287
|
+
ignoreWarnings?: boolean;
|
|
14288
|
+
}];
|
|
13696
14289
|
// ----- svgo/svgo -----
|
|
13697
14290
|
type SvgoSvgo = [] | [{
|
|
13698
14291
|
path?: string;
|
|
@@ -16057,7 +16650,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
16057
16650
|
onlyEquality?: boolean;
|
|
16058
16651
|
}];
|
|
16059
16652
|
// Names of all the configs
|
|
16060
|
-
type ConfigNames = 'ntnyq/antfu' | 'ntnyq/astro' | 'ntnyq/command' | 'ntnyq/de-morgan' | 'ntnyq/eslint-comments' | 'ntnyq/depend' | 'ntnyq/depend/package-json' | 'ntnyq/eslint-plugin' | 'ntnyq/format/setup' | 'ntnyq/format/css' | 'ntnyq/format/scss' | 'ntnyq/format/less' | 'ntnyq/format/html' | 'ntnyq/github-action' | 'ntnyq/gitignore' | 'ntnyq/html' | 'ntnyq/ignores' | 'ntnyq/import-x' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/disabled' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/pinia' | 'ntnyq/pnpm/package-json' | 'ntnyq/pnpm/pnpm-workspace-yaml' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/regexp' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/json-schema' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/bin' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/svgo' | 'ntnyq/test/setup' | 'ntnyq/test/base' | 'ntnyq/test/vitest' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yml'; //#endregion
|
|
16653
|
+
type ConfigNames = 'ntnyq/antfu' | 'ntnyq/astro' | 'ntnyq/command' | 'ntnyq/de-morgan' | 'ntnyq/eslint-comments' | 'ntnyq/depend' | 'ntnyq/depend/package-json' | 'ntnyq/eslint-plugin' | 'ntnyq/format/setup' | 'ntnyq/format/css' | 'ntnyq/format/scss' | 'ntnyq/format/less' | 'ntnyq/format/html' | 'ntnyq/github-action' | 'ntnyq/gitignore' | 'ntnyq/html' | 'ntnyq/ignores' | 'ntnyq/import-x' | 'ntnyq/js/recommended' | 'ntnyq/js/core' | 'ntnyq/jsdoc' | 'ntnyq/jsonc' | 'ntnyq/jsx' | 'ntnyq/markdown/recommended/plugin' | 'ntnyq/markdown/recommended/processor' | 'ntnyq/markdown/recommended/code-blocks' | 'ntnyq/markdown/processor' | 'ntnyq/markdown/parser' | 'ntnyq/markdown/disabled' | 'ntnyq/node' | 'ntnyq/ntnyq' | 'ntnyq/pinia' | 'ntnyq/pnpm/package-json' | 'ntnyq/pnpm/pnpm-workspace-yaml' | 'ntnyq/prettier' | 'ntnyq/prettier/disabled' | 'ntnyq/perfectionist/common' | 'ntnyq/perfectionist/enums' | 'ntnyq/perfectionist/types' | 'ntnyq/perfectionist/constants' | 'ntnyq/regexp' | 'ntnyq/sort/tsconfig' | 'ntnyq/sort/package-json' | 'ntnyq/sort/i18n-locale/json' | 'ntnyq/sort/i18n-locale/yaml' | 'ntnyq/sort/json-schema' | 'ntnyq/sort/pnpm-workspace' | 'ntnyq/specials/scripts' | 'ntnyq/specials/cli' | 'ntnyq/specials/bin' | 'ntnyq/specials/userscript' | 'ntnyq/specials/config-file' | 'ntnyq/svelte' | 'ntnyq/svgo' | 'ntnyq/test/setup' | 'ntnyq/test/base' | 'ntnyq/test/vitest' | 'ntnyq/toml' | 'ntnyq/ts/setup' | 'ntnyq/ts/parser' | 'ntnyq/ts/rules' | 'ntnyq/ts/types' | 'ntnyq/unused-imports' | 'ntnyq/unicorn' | 'ntnyq/unocss' | 'ntnyq/vue/setup' | 'ntnyq/vue/rules' | 'ntnyq/yml'; //#endregion
|
|
16061
16654
|
//#region src/types/eslint.d.ts
|
|
16062
16655
|
/**
|
|
16063
16656
|
* ESLint config
|
|
@@ -16177,6 +16770,7 @@ interface ConfigOptions {
|
|
|
16177
16770
|
prettier?: boolean | ConfigPrettierOptions;
|
|
16178
16771
|
regexp?: boolean | ConfigRegexpOptions;
|
|
16179
16772
|
sort?: boolean | ConfigSortOptions;
|
|
16773
|
+
svelte?: boolean | ConfigSvelteOptions;
|
|
16180
16774
|
svgo?: boolean | ConfigSVGOOptions;
|
|
16181
16775
|
test?: boolean | ConfigTestOptions;
|
|
16182
16776
|
toml?: boolean | ConfigTomlOptions;
|
|
@@ -16316,84 +16910,33 @@ declare const PRETTIER_DEFAULT_OPTIONS: PrettierOptions;
|
|
|
16316
16910
|
//#endregion
|
|
16317
16911
|
//#region src/constants/perfectionist.d.ts
|
|
16318
16912
|
/**
|
|
16319
|
-
* Shared
|
|
16913
|
+
* Shared constants about eslint-plugin-perfectionist
|
|
16320
16914
|
*/
|
|
16321
|
-
declare const
|
|
16322
|
-
|
|
16915
|
+
declare const PERFECTIONIST: Readonly<{
|
|
16916
|
+
partialRuleOptions: {
|
|
16917
|
+
readonly newlinesBetween: "ignore";
|
|
16918
|
+
readonly partitionByComment: string[];
|
|
16919
|
+
};
|
|
16920
|
+
pluginSettings: {
|
|
16921
|
+
readonly fallbackSort: {
|
|
16922
|
+
readonly order: "asc";
|
|
16923
|
+
readonly type: "alphabetical";
|
|
16924
|
+
};
|
|
16925
|
+
readonly ignoreCase: true;
|
|
16323
16926
|
readonly order: "asc";
|
|
16927
|
+
readonly partitionByNewLine: false;
|
|
16928
|
+
readonly specialCharacters: "keep";
|
|
16324
16929
|
readonly type: "alphabetical";
|
|
16325
16930
|
};
|
|
16326
|
-
|
|
16327
|
-
|
|
16328
|
-
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16333
|
-
|
|
16334
|
-
|
|
16335
|
-
declare const PERFECTIONIST_EXTRA_RULE_OPTIONS: {
|
|
16336
|
-
readonly newlinesBetween: "ignore";
|
|
16337
|
-
readonly partitionByComment: string[];
|
|
16338
|
-
};
|
|
16339
|
-
/**
|
|
16340
|
-
* Shared option `groups` for rule `sort-objects`
|
|
16341
|
-
*
|
|
16342
|
-
* @see {@link https://perfectionist.dev/rules/sort-objects}
|
|
16343
|
-
*/
|
|
16344
|
-
declare const PERFECTIONIST_SORT_OBJECTS_GROUPS: string[];
|
|
16345
|
-
/**
|
|
16346
|
-
* Shared option `groups` for rules
|
|
16347
|
-
* - `sort-interfaces`
|
|
16348
|
-
* - `sort-object-types`
|
|
16349
|
-
*
|
|
16350
|
-
* @see {@link https://perfectionist.dev/rules/sort-interfaces}
|
|
16351
|
-
* @see {@link https://perfectionist.dev/rules/sort-object-types}
|
|
16352
|
-
*/
|
|
16353
|
-
declare const PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS: string[];
|
|
16354
|
-
/**
|
|
16355
|
-
* Shared option `groups` for rules:
|
|
16356
|
-
* - `sort-intersection-types`
|
|
16357
|
-
* - `sort-union-types`
|
|
16358
|
-
*
|
|
16359
|
-
* Philosophy: keep simple thing first except null & undefined
|
|
16360
|
-
*
|
|
16361
|
-
* @see {@link https://perfectionist.dev/rules/sort-intersection-types}
|
|
16362
|
-
* @see {@link https://perfectionist.dev/rules/sort-union-types}
|
|
16363
|
-
*/
|
|
16364
|
-
declare const PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS: string[];
|
|
16365
|
-
/**
|
|
16366
|
-
* Shared option `groups` for rule `sort-imports`
|
|
16367
|
-
*
|
|
16368
|
-
* @see {@link https://perfectionist.dev/rules/sort-imports}
|
|
16369
|
-
*/
|
|
16370
|
-
declare const PERFECTIONIST_SORT_IMPORTS_GROUPS: string[];
|
|
16371
|
-
/**
|
|
16372
|
-
* Shared option `groups` for rule `sort-exports`
|
|
16373
|
-
*
|
|
16374
|
-
* @see {@link https://perfectionist.dev/rules/sort-exports}
|
|
16375
|
-
*/
|
|
16376
|
-
declare const PERFECTIONIST_SORT_EXPORTS_GROUPS: string[];
|
|
16377
|
-
/**
|
|
16378
|
-
* Shared option `groups` for rule `sort-named-exports`
|
|
16379
|
-
*
|
|
16380
|
-
* @see {@link https://perfectionist.dev/rules/sort-named-exports}
|
|
16381
|
-
*/
|
|
16382
|
-
declare const PERFECTIONIST_SORT_NAMED_EXPORTS_GROUPS: string[];
|
|
16383
|
-
/**
|
|
16384
|
-
* Shared option `groups` for rule `sort-named-imports`
|
|
16385
|
-
*
|
|
16386
|
-
* @see {@link https://perfectionist.dev/rules/sort-named-imports}
|
|
16387
|
-
*/
|
|
16388
|
-
declare const PERFECTIONIST_SORT_NAMED_IMPORTS_GROUPS: string[];
|
|
16389
|
-
/**
|
|
16390
|
-
* Shared option `groups` for rule `sort-classes`
|
|
16391
|
-
*
|
|
16392
|
-
* // TODO: implement this
|
|
16393
|
-
*
|
|
16394
|
-
* @see {@link https://perfectionist.dev/rules/sort-classes}
|
|
16395
|
-
*/
|
|
16396
|
-
declare const PERFECTIONIST_SORT_CLASSES_GROUPS: string[];
|
|
16931
|
+
sortClassesGroups: string[];
|
|
16932
|
+
sortExportsGroups: string[];
|
|
16933
|
+
sortImportsTypes: string[];
|
|
16934
|
+
sortInterfacesOrObjectTypesGroups: string[];
|
|
16935
|
+
sortIntersectionTypesOrUnionTypesGroups: string[];
|
|
16936
|
+
sortNamedExportsGroups: string[];
|
|
16937
|
+
sortNamedImportsGroups: string[];
|
|
16938
|
+
sortObjectsGroups: string[];
|
|
16939
|
+
}>;
|
|
16397
16940
|
|
|
16398
16941
|
//#endregion
|
|
16399
|
-
export { Arrayable, Awaitable, ConfigAntfuOptions, ConfigAstroOptions, ConfigCommandOptions, ConfigDeMorganOptions, ConfigDependOptions, ConfigESLintCommentsOptions, ConfigESLintPluginOptions, ConfigFormatOptions, ConfigGitHubActionOptions, ConfigGitIgnoreOptions, ConfigHtmlOptions, ConfigIgnoresOptions, ConfigImportXOptions, ConfigJavaScriptOptions, ConfigJsdocOptions, ConfigJsoncOptions, ConfigMarkdownOptions, ConfigNames, ConfigNodeOptions, ConfigNtnyqOptions, ConfigOptions, ConfigOptionsInternal, ConfigPerfectionistOptions, ConfigPiniaOptions, ConfigPnpmOptions, ConfigPrettierOptions, ConfigRegexpOptions, ConfigSVGOOptions, ConfigSortOptions, ConfigSpecialsOptions, ConfigTestOptions, ConfigTomlOptions, ConfigTypeScriptOptions, ConfigUnicornOptions, ConfigUnoCSSOptions, ConfigUnusedImportsOptions, ConfigVueOptions, ConfigYmlOptions, ESLintConfig, ESLintParser, ESLintParserOptions, ESLintProcessor, ESLintRuleSeverity, ESLintRulesRecord, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSON_SCHEMA, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_PNPM_WORKSPACE_YAML, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_YAML, InteropModuleDefault, OptionsFiles, OptionsIgnores, OptionsOverrides, OptionsShareable,
|
|
16942
|
+
export { Arrayable, Awaitable, ConfigAntfuOptions, ConfigAstroOptions, ConfigCommandOptions, ConfigDeMorganOptions, ConfigDependOptions, ConfigESLintCommentsOptions, ConfigESLintPluginOptions, ConfigFormatOptions, ConfigGitHubActionOptions, ConfigGitIgnoreOptions, ConfigHtmlOptions, ConfigIgnoresOptions, ConfigImportXOptions, ConfigJavaScriptOptions, ConfigJsdocOptions, ConfigJsoncOptions, ConfigMarkdownOptions, ConfigNames, ConfigNodeOptions, ConfigNtnyqOptions, ConfigOptions, ConfigOptionsInternal, ConfigPerfectionistOptions, ConfigPiniaOptions, ConfigPnpmOptions, ConfigPrettierOptions, ConfigRegexpOptions, ConfigSVGOOptions, ConfigSortOptions, ConfigSpecialsOptions, ConfigSvelteOptions, ConfigTestOptions, ConfigTomlOptions, ConfigTypeScriptOptions, ConfigUnicornOptions, ConfigUnoCSSOptions, ConfigUnusedImportsOptions, ConfigVueOptions, ConfigYmlOptions, ESLintConfig, ESLintParser, ESLintParserOptions, ESLintProcessor, ESLintRuleSeverity, ESLintRulesRecord, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSON_SCHEMA, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_PNPM_WORKSPACE_YAML, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_YAML, InteropModuleDefault, OptionsFiles, OptionsIgnores, OptionsOverrides, OptionsShareable, PERFECTIONIST, PRETTIER_DEFAULT_OPTIONS, PerfectionistPartitionByComment, PrettierOptions, Pretty, ResolvedOptions, RuleOptions, TSESLintParserOptions, TypedConfigItem, combineConfigs, configAntfu, configAstro, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configFormat, configGitHubAction, configGitIgnore, configHtml, configIgnores, configImportX, configJSX, configJavaScript, configJsdoc, configJsonc, configMarkdown, configNode, configNtnyq, configPerfectionist, configPinia, configPnpm, configPrettier, configRegexp, configSVGO, configSort, configSpecials, configSvelte, configTest, configToml, configTypeScript, configUnicorn, configUnoCSS, configUnusedImports, configVue, configYml, configsTypeScript, defineESLintConfig, ensurePackages, getOverrides, hasPinia, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunBySpecifyPackages, mergePrettierOptions, mergeProcessors, parserJsonc, parserPlain, parserToml, parserTypeScript, parserVue, parserYaml, pluginAntfu, pluginComments, pluginDeMorgan, pluginDepend, pluginGitHubAction, pluginImportX, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNoOnlyTests, pluginNode, pluginNtnyq, pluginPerfectionist, pluginPinia, pluginPrettier, pluginRegexp, pluginSvgo, pluginToml, pluginTypeScript, pluginUnicorn, pluginUnoCSS, pluginVitest, pluginVue, pluginYml, processorPassThrough, processorVueBlocks, resolveSubOptions };
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,6 @@ import * as pluginRegexp from "eslint-plugin-regexp";
|
|
|
10
10
|
import pluginNode from "eslint-plugin-n";
|
|
11
11
|
import pluginVue from "eslint-plugin-vue";
|
|
12
12
|
import pluginYml from "eslint-plugin-yml";
|
|
13
|
-
import pluginPnpm from "eslint-plugin-pnpm";
|
|
14
13
|
import pluginSvgo from "eslint-plugin-svgo";
|
|
15
14
|
import pluginToml from "eslint-plugin-toml";
|
|
16
15
|
import pluginMarkdown from "@eslint/markdown";
|
|
@@ -678,7 +677,9 @@ const configNode = (options = {}) => [{
|
|
|
678
677
|
* @param options - {@link ConfigPnpmOptions}
|
|
679
678
|
* @returns ESLint configs
|
|
680
679
|
*/
|
|
681
|
-
const configPnpm = (options = {}) => {
|
|
680
|
+
const configPnpm = async (options = {}) => {
|
|
681
|
+
await ensurePackages(["eslint-plugin-pnpm"]);
|
|
682
|
+
const pluginPnpm = await interopDefault(import("eslint-plugin-pnpm"));
|
|
682
683
|
const { filesJson = [GLOB_PACKAGE_JSON], filesYaml = [GLOB_PNPM_WORKSPACE_YAML] } = options;
|
|
683
684
|
return [{
|
|
684
685
|
name: "ntnyq/pnpm/package-json",
|
|
@@ -1563,9 +1564,9 @@ const PRETTIER_DEFAULT_OPTIONS = {
|
|
|
1563
1564
|
//#endregion
|
|
1564
1565
|
//#region src/constants/perfectionist.ts
|
|
1565
1566
|
/**
|
|
1566
|
-
* Shared perfectionist
|
|
1567
|
+
* Shared perfectionist plugin settings
|
|
1567
1568
|
*/
|
|
1568
|
-
const
|
|
1569
|
+
const pluginSettings = {
|
|
1569
1570
|
fallbackSort: {
|
|
1570
1571
|
order: "asc",
|
|
1571
1572
|
type: "alphabetical"
|
|
@@ -1579,7 +1580,7 @@ const PERFECTIONIST_PLUGIN_SETTINGS = {
|
|
|
1579
1580
|
/**
|
|
1580
1581
|
* Shared perfectionist rule options for some rules
|
|
1581
1582
|
*/
|
|
1582
|
-
const
|
|
1583
|
+
const partialRuleOptions = {
|
|
1583
1584
|
newlinesBetween: "ignore",
|
|
1584
1585
|
partitionByComment: ["@pg", "@perfectionist-group"]
|
|
1585
1586
|
};
|
|
@@ -1588,7 +1589,7 @@ const PERFECTIONIST_EXTRA_RULE_OPTIONS = {
|
|
|
1588
1589
|
*
|
|
1589
1590
|
* @see {@link https://perfectionist.dev/rules/sort-objects}
|
|
1590
1591
|
*/
|
|
1591
|
-
const
|
|
1592
|
+
const sortObjectsGroups = [
|
|
1592
1593
|
"property",
|
|
1593
1594
|
"multiline-property",
|
|
1594
1595
|
"method",
|
|
@@ -1603,7 +1604,7 @@ const PERFECTIONIST_SORT_OBJECTS_GROUPS = [
|
|
|
1603
1604
|
* @see {@link https://perfectionist.dev/rules/sort-interfaces}
|
|
1604
1605
|
* @see {@link https://perfectionist.dev/rules/sort-object-types}
|
|
1605
1606
|
*/
|
|
1606
|
-
const
|
|
1607
|
+
const sortInterfacesOrObjectTypesGroups = [
|
|
1607
1608
|
"required-property",
|
|
1608
1609
|
"optional-property",
|
|
1609
1610
|
"required-method",
|
|
@@ -1626,7 +1627,7 @@ const PERFECTIONIST_SORT_INTERFACES_OR_OBJECT_TYPES_GROUPS = [
|
|
|
1626
1627
|
* @see {@link https://perfectionist.dev/rules/sort-intersection-types}
|
|
1627
1628
|
* @see {@link https://perfectionist.dev/rules/sort-union-types}
|
|
1628
1629
|
*/
|
|
1629
|
-
const
|
|
1630
|
+
const sortIntersectionTypesOrUnionTypesGroups = [
|
|
1630
1631
|
"literal",
|
|
1631
1632
|
"keyword",
|
|
1632
1633
|
"named",
|
|
@@ -1645,7 +1646,7 @@ const PERFECTIONIST_SORT_INTERSECTION_TYPES_OR_UNION_TYPES_GROUPS = [
|
|
|
1645
1646
|
*
|
|
1646
1647
|
* @see {@link https://perfectionist.dev/rules/sort-imports}
|
|
1647
1648
|
*/
|
|
1648
|
-
const
|
|
1649
|
+
const sortImportsTypes = [
|
|
1649
1650
|
"side-effect-style",
|
|
1650
1651
|
"value-style",
|
|
1651
1652
|
"value-builtin",
|
|
@@ -1671,7 +1672,7 @@ const PERFECTIONIST_SORT_IMPORTS_GROUPS = [
|
|
|
1671
1672
|
*
|
|
1672
1673
|
* @see {@link https://perfectionist.dev/rules/sort-exports}
|
|
1673
1674
|
*/
|
|
1674
|
-
const
|
|
1675
|
+
const sortExportsGroups = [
|
|
1675
1676
|
"value-export",
|
|
1676
1677
|
"type-export",
|
|
1677
1678
|
"unknown"
|
|
@@ -1681,7 +1682,7 @@ const PERFECTIONIST_SORT_EXPORTS_GROUPS = [
|
|
|
1681
1682
|
*
|
|
1682
1683
|
* @see {@link https://perfectionist.dev/rules/sort-named-exports}
|
|
1683
1684
|
*/
|
|
1684
|
-
const
|
|
1685
|
+
const sortNamedExportsGroups = [
|
|
1685
1686
|
"value-export",
|
|
1686
1687
|
"type-export",
|
|
1687
1688
|
"unknown"
|
|
@@ -1691,7 +1692,7 @@ const PERFECTIONIST_SORT_NAMED_EXPORTS_GROUPS = [
|
|
|
1691
1692
|
*
|
|
1692
1693
|
* @see {@link https://perfectionist.dev/rules/sort-named-imports}
|
|
1693
1694
|
*/
|
|
1694
|
-
const
|
|
1695
|
+
const sortNamedImportsGroups = [
|
|
1695
1696
|
"value-import",
|
|
1696
1697
|
"type-import",
|
|
1697
1698
|
"unknown"
|
|
@@ -1703,7 +1704,22 @@ const PERFECTIONIST_SORT_NAMED_IMPORTS_GROUPS = [
|
|
|
1703
1704
|
*
|
|
1704
1705
|
* @see {@link https://perfectionist.dev/rules/sort-classes}
|
|
1705
1706
|
*/
|
|
1706
|
-
const
|
|
1707
|
+
const sortClassesGroups = ["unknown"];
|
|
1708
|
+
/**
|
|
1709
|
+
* Shared constants about eslint-plugin-perfectionist
|
|
1710
|
+
*/
|
|
1711
|
+
const PERFECTIONIST = Object.freeze({
|
|
1712
|
+
partialRuleOptions,
|
|
1713
|
+
pluginSettings,
|
|
1714
|
+
sortClassesGroups,
|
|
1715
|
+
sortExportsGroups,
|
|
1716
|
+
sortImportsTypes,
|
|
1717
|
+
sortInterfacesOrObjectTypesGroups,
|
|
1718
|
+
sortIntersectionTypesOrUnionTypesGroups,
|
|
1719
|
+
sortNamedExportsGroups,
|
|
1720
|
+
sortNamedImportsGroups,
|
|
1721
|
+
sortObjectsGroups
|
|
1722
|
+
});
|
|
1707
1723
|
|
|
1708
1724
|
//#endregion
|
|
1709
1725
|
//#region src/configs/format.ts
|
|
@@ -1778,6 +1794,94 @@ const configRegexp = (options = {}) => {
|
|
|
1778
1794
|
}];
|
|
1779
1795
|
};
|
|
1780
1796
|
|
|
1797
|
+
//#endregion
|
|
1798
|
+
//#region src/configs/svelte.ts
|
|
1799
|
+
/**
|
|
1800
|
+
* Config for svelte files
|
|
1801
|
+
*
|
|
1802
|
+
* @see {@link https://github.com/ota-meshi/eslint-plugin-svelte}
|
|
1803
|
+
*
|
|
1804
|
+
* @param options - {@link ConfigSvelteOptions}
|
|
1805
|
+
* @returns ESLint configs
|
|
1806
|
+
*/
|
|
1807
|
+
const configSvelte = async (options = {}) => {
|
|
1808
|
+
await ensurePackages(["svelte-eslint-parser", "eslint-plugin-svelte"]);
|
|
1809
|
+
const [parserSvelte, pluginSvelte] = await Promise.all([interopDefault(import("svelte-eslint-parser")), interopDefault(import("eslint-plugin-svelte"))]);
|
|
1810
|
+
const { files = [GLOB_SVELTE], extraFileExtensions = [] } = options;
|
|
1811
|
+
return [{
|
|
1812
|
+
name: "ntnyq/svelte",
|
|
1813
|
+
files,
|
|
1814
|
+
plugins: { svelte: pluginSvelte },
|
|
1815
|
+
processor: pluginSvelte.processors[".svelte"],
|
|
1816
|
+
languageOptions: {
|
|
1817
|
+
parser: parserSvelte,
|
|
1818
|
+
sourceType: "module",
|
|
1819
|
+
parserOptions: {
|
|
1820
|
+
extraFileExtensions,
|
|
1821
|
+
parser: parserTypeScript
|
|
1822
|
+
}
|
|
1823
|
+
},
|
|
1824
|
+
rules: {
|
|
1825
|
+
"import-x/no-mutable-exports": "off",
|
|
1826
|
+
"no-undef": "off",
|
|
1827
|
+
"no-unused-vars": ["error", {
|
|
1828
|
+
args: "none",
|
|
1829
|
+
caughtErrors: "none",
|
|
1830
|
+
ignoreRestSiblings: true,
|
|
1831
|
+
vars: "all",
|
|
1832
|
+
varsIgnorePattern: "^(\\$\\$Props$|\\$\\$Events$|\\$\\$Slots$)"
|
|
1833
|
+
}],
|
|
1834
|
+
"svelte/comment-directive": "error",
|
|
1835
|
+
"svelte/derived-has-same-inputs-outputs": "error",
|
|
1836
|
+
"svelte/html-closing-bracket-spacing": "error",
|
|
1837
|
+
"svelte/html-quotes": ["error", {
|
|
1838
|
+
prefer: "double",
|
|
1839
|
+
dynamic: {
|
|
1840
|
+
avoidInvalidUnquotedInHTML: false,
|
|
1841
|
+
quoted: true
|
|
1842
|
+
}
|
|
1843
|
+
}],
|
|
1844
|
+
"svelte/indent": ["error", {
|
|
1845
|
+
alignAttributesVertically: true,
|
|
1846
|
+
indent: 2,
|
|
1847
|
+
indentScript: false
|
|
1848
|
+
}],
|
|
1849
|
+
"svelte/mustache-spacing": ["error", {
|
|
1850
|
+
attributesAndProps: "never",
|
|
1851
|
+
directiveExpressions: "always",
|
|
1852
|
+
textExpressions: "always",
|
|
1853
|
+
tags: {
|
|
1854
|
+
closingBrace: "always",
|
|
1855
|
+
openingBrace: "always"
|
|
1856
|
+
}
|
|
1857
|
+
}],
|
|
1858
|
+
"svelte/no-at-debug-tags": "error",
|
|
1859
|
+
"svelte/no-at-html-tags": "error",
|
|
1860
|
+
"svelte/no-dupe-else-if-blocks": "error",
|
|
1861
|
+
"svelte/no-dupe-style-properties": "error",
|
|
1862
|
+
"svelte/no-dupe-use-directives": "error",
|
|
1863
|
+
"svelte/no-dynamic-slot-name": "error",
|
|
1864
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": "error",
|
|
1865
|
+
"svelte/no-inner-declarations": "error",
|
|
1866
|
+
"svelte/no-not-function-handler": "error",
|
|
1867
|
+
"svelte/no-object-in-text-mustaches": "error",
|
|
1868
|
+
"svelte/no-reactive-functions": "error",
|
|
1869
|
+
"svelte/no-reactive-literals": "error",
|
|
1870
|
+
"svelte/no-shorthand-style-property-overrides": "error",
|
|
1871
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": "error",
|
|
1872
|
+
"svelte/no-trailing-spaces": "error",
|
|
1873
|
+
"svelte/no-unknown-style-directive-property": "error",
|
|
1874
|
+
"svelte/no-unused-svelte-ignore": "error",
|
|
1875
|
+
"svelte/no-useless-mustaches": "error",
|
|
1876
|
+
"svelte/require-store-callbacks-use-set-param": "error",
|
|
1877
|
+
"svelte/spaced-html-comment": "error",
|
|
1878
|
+
"svelte/system": "error",
|
|
1879
|
+
"svelte/valid-each-key": "error",
|
|
1880
|
+
...options.overrides
|
|
1881
|
+
}
|
|
1882
|
+
}];
|
|
1883
|
+
};
|
|
1884
|
+
|
|
1781
1885
|
//#endregion
|
|
1782
1886
|
//#region src/configs/unocss.ts
|
|
1783
1887
|
/**
|
|
@@ -2217,14 +2321,14 @@ const configSpecials = (options = {}) => {
|
|
|
2217
2321
|
"import-x": pluginImportX,
|
|
2218
2322
|
perfectionist: pluginPerfectionist
|
|
2219
2323
|
},
|
|
2220
|
-
settings: { perfectionist:
|
|
2324
|
+
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2221
2325
|
rules: {
|
|
2222
2326
|
"@typescript-eslint/explicit-function-return-type": "off",
|
|
2223
2327
|
"import-x/no-default-export": "off",
|
|
2224
2328
|
"no-console": "off",
|
|
2225
2329
|
"perfectionist/sort-objects": ["error", {
|
|
2226
|
-
...
|
|
2227
|
-
groups:
|
|
2330
|
+
...PERFECTIONIST.partialRuleOptions,
|
|
2331
|
+
groups: PERFECTIONIST.sortObjectsGroups
|
|
2228
2332
|
}],
|
|
2229
2333
|
...options.overridesConfigFileRules
|
|
2230
2334
|
}
|
|
@@ -2733,7 +2837,7 @@ const configGitHubAction = (options = {}) => {
|
|
|
2733
2837
|
* @returns ESLint configs
|
|
2734
2838
|
*/
|
|
2735
2839
|
const configPerfectionist = (options = {}) => {
|
|
2736
|
-
const { partitionByComment =
|
|
2840
|
+
const { partitionByComment = PERFECTIONIST.partialRuleOptions.partitionByComment, sortConstants: enableSortConstants = true, sortEnums: enableSortEnums = true, sortTypes: enableSortTypes = true } = options;
|
|
2737
2841
|
const sharedOptionsWithNewlinesBetween = {
|
|
2738
2842
|
newlinesBetween: "ignore",
|
|
2739
2843
|
partitionByComment
|
|
@@ -2741,12 +2845,12 @@ const configPerfectionist = (options = {}) => {
|
|
|
2741
2845
|
const commonRules = {
|
|
2742
2846
|
"perfectionist/sort-exports": ["error", {
|
|
2743
2847
|
...sharedOptionsWithNewlinesBetween,
|
|
2744
|
-
groups:
|
|
2848
|
+
groups: PERFECTIONIST.sortExportsGroups,
|
|
2745
2849
|
type: "line-length"
|
|
2746
2850
|
}],
|
|
2747
2851
|
"perfectionist/sort-imports": ["error", {
|
|
2748
2852
|
...sharedOptionsWithNewlinesBetween,
|
|
2749
|
-
groups:
|
|
2853
|
+
groups: PERFECTIONIST.sortImportsTypes,
|
|
2750
2854
|
internalPattern: [
|
|
2751
2855
|
"^~/.+",
|
|
2752
2856
|
"^@/.+",
|
|
@@ -2755,12 +2859,12 @@ const configPerfectionist = (options = {}) => {
|
|
|
2755
2859
|
}],
|
|
2756
2860
|
"perfectionist/sort-named-exports": ["error", {
|
|
2757
2861
|
...sharedOptionsWithNewlinesBetween,
|
|
2758
|
-
groups:
|
|
2862
|
+
groups: PERFECTIONIST.sortNamedExportsGroups,
|
|
2759
2863
|
ignoreAlias: false
|
|
2760
2864
|
}],
|
|
2761
2865
|
"perfectionist/sort-named-imports": ["error", {
|
|
2762
2866
|
...sharedOptionsWithNewlinesBetween,
|
|
2763
|
-
groups:
|
|
2867
|
+
groups: PERFECTIONIST.sortNamedImportsGroups,
|
|
2764
2868
|
ignoreAlias: false
|
|
2765
2869
|
}]
|
|
2766
2870
|
};
|
|
@@ -2770,26 +2874,26 @@ const configPerfectionist = (options = {}) => {
|
|
|
2770
2874
|
"perfectionist/sort-heritage-clauses": "error",
|
|
2771
2875
|
"perfectionist/sort-interfaces": ["error", {
|
|
2772
2876
|
...sharedOptionsWithNewlinesBetween,
|
|
2773
|
-
groups:
|
|
2877
|
+
groups: PERFECTIONIST.sortInterfacesOrObjectTypesGroups
|
|
2774
2878
|
}],
|
|
2775
2879
|
"perfectionist/sort-intersection-types": ["error", {
|
|
2776
2880
|
...sharedOptionsWithNewlinesBetween,
|
|
2777
|
-
groups:
|
|
2881
|
+
groups: PERFECTIONIST.sortIntersectionTypesOrUnionTypesGroups
|
|
2778
2882
|
}],
|
|
2779
2883
|
"perfectionist/sort-object-types": ["error", {
|
|
2780
2884
|
...sharedOptionsWithNewlinesBetween,
|
|
2781
|
-
groups:
|
|
2885
|
+
groups: PERFECTIONIST.sortInterfacesOrObjectTypesGroups
|
|
2782
2886
|
}],
|
|
2783
2887
|
"perfectionist/sort-union-types": ["error", {
|
|
2784
2888
|
...sharedOptionsWithNewlinesBetween,
|
|
2785
|
-
groups:
|
|
2889
|
+
groups: PERFECTIONIST.sortIntersectionTypesOrUnionTypesGroups
|
|
2786
2890
|
}]
|
|
2787
2891
|
};
|
|
2788
2892
|
const sortConstantsRules = {
|
|
2789
2893
|
"perfectionist/sort-maps": ["error", { ...sharedOptionsWithNewlinesBetween }],
|
|
2790
2894
|
"perfectionist/sort-objects": ["error", {
|
|
2791
2895
|
...sharedOptionsWithNewlinesBetween,
|
|
2792
|
-
groups:
|
|
2896
|
+
groups: PERFECTIONIST.sortObjectsGroups
|
|
2793
2897
|
}],
|
|
2794
2898
|
"perfectionist/sort-sets": ["error", { ...sharedOptionsWithNewlinesBetween }]
|
|
2795
2899
|
};
|
|
@@ -2800,7 +2904,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2800
2904
|
}],
|
|
2801
2905
|
"perfectionist/sort-classes": ["error", {
|
|
2802
2906
|
...sharedOptionsWithNewlinesBetween,
|
|
2803
|
-
groups:
|
|
2907
|
+
groups: PERFECTIONIST.sortClassesGroups
|
|
2804
2908
|
}],
|
|
2805
2909
|
"perfectionist/sort-decorators": ["error", { partitionByComment }],
|
|
2806
2910
|
"perfectionist/sort-jsx-props": ["error", { groups: [
|
|
@@ -2814,7 +2918,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2814
2918
|
const configs = [{
|
|
2815
2919
|
name: options.all ? "ntnyq/perfectionist/all" : "ntnyq/perfectionist/common",
|
|
2816
2920
|
plugins: { perfectionist: pluginPerfectionist },
|
|
2817
|
-
settings: { perfectionist:
|
|
2921
|
+
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2818
2922
|
rules: {
|
|
2819
2923
|
...commonRules,
|
|
2820
2924
|
...options.all ? {
|
|
@@ -2832,7 +2936,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2832
2936
|
name: "ntnyq/perfectionist/enums",
|
|
2833
2937
|
files: [`**/enums/${GLOB_SRC}`, `**/enums.${GLOB_SRC_EXT}`],
|
|
2834
2938
|
plugins: { perfectionist: pluginPerfectionist },
|
|
2835
|
-
settings: { perfectionist:
|
|
2939
|
+
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2836
2940
|
rules: {
|
|
2837
2941
|
...sharedRules$1,
|
|
2838
2942
|
...sortEnumsRules,
|
|
@@ -2843,7 +2947,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2843
2947
|
name: "ntnyq/perfectionist/types",
|
|
2844
2948
|
files: [...GLOB_TYPES],
|
|
2845
2949
|
plugins: { perfectionist: pluginPerfectionist },
|
|
2846
|
-
settings: { perfectionist:
|
|
2950
|
+
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2847
2951
|
rules: {
|
|
2848
2952
|
...sharedRules$1,
|
|
2849
2953
|
...sortTypesRules,
|
|
@@ -2854,7 +2958,7 @@ const configPerfectionist = (options = {}) => {
|
|
|
2854
2958
|
name: "ntnyq/perfectionist/constants",
|
|
2855
2959
|
files: [`**/constants/${GLOB_SRC}`, `**/constants.${GLOB_SRC_EXT}`],
|
|
2856
2960
|
plugins: { perfectionist: pluginPerfectionist },
|
|
2857
|
-
settings: { perfectionist:
|
|
2961
|
+
settings: { perfectionist: PERFECTIONIST.pluginSettings },
|
|
2858
2962
|
rules: {
|
|
2859
2963
|
...sharedRules$1,
|
|
2860
2964
|
...sortConstantsRules,
|
|
@@ -2924,11 +3028,12 @@ const configESLintComments = (options = {}) => [{
|
|
|
2924
3028
|
* Config factory
|
|
2925
3029
|
*/
|
|
2926
3030
|
function defineESLintConfig(options = {}, ...userConfigs) {
|
|
2927
|
-
const { shareable = {}, vue: enableVue = hasVue(), pinia: enablePinia = hasPinia(), test: enableTest = hasVitest(), unocss: enableUnoCSS = hasUnoCSS(), typescript: enableTypeScript = hasTypeScript(), yml: enableYML = true, sort: enableSort = true, toml: enableTOML = true, jsonc: enableJSONC = true, antfu: enableAntfu = true, ntnyq: enableNtnyq = true, depend: enableDepend = true, regexp: enableRegexp = true, unicorn: enableUnicorn = true, deMorgan: enableDeMorgan = true, prettier: enablePrettier = true, markdown: enableMarkdown = true, gitignore: enableGitIgnore = true, githubAction: enableGitHubAction = true, perfectionist: enablePerfectionist = true, pnpm: enablePnpm = false, svgo: enableSVGO = false, html: enableHTML = false, astro: enableAstro = false, eslintPlugin: enableESLintPlugin = false } = options;
|
|
3031
|
+
const { shareable = {}, vue: enableVue = hasVue(), pinia: enablePinia = hasPinia(), test: enableTest = hasVitest(), unocss: enableUnoCSS = hasUnoCSS(), typescript: enableTypeScript = hasTypeScript(), yml: enableYML = true, sort: enableSort = true, toml: enableTOML = true, jsonc: enableJSONC = true, antfu: enableAntfu = true, ntnyq: enableNtnyq = true, depend: enableDepend = true, regexp: enableRegexp = true, unicorn: enableUnicorn = true, deMorgan: enableDeMorgan = true, prettier: enablePrettier = true, markdown: enableMarkdown = true, gitignore: enableGitIgnore = true, githubAction: enableGitHubAction = true, perfectionist: enablePerfectionist = true, pnpm: enablePnpm = false, svgo: enableSVGO = false, html: enableHTML = false, astro: enableAstro = false, svelte: enableSvelte = false, eslintPlugin: enableESLintPlugin = false } = options;
|
|
2928
3032
|
const configs = [];
|
|
2929
3033
|
const { extraFileExtensions = [] } = shareable;
|
|
2930
3034
|
if (enableVue) extraFileExtensions.push(".vue");
|
|
2931
3035
|
if (enableAstro) extraFileExtensions.push(".astro");
|
|
3036
|
+
if (enableSvelte) extraFileExtensions.push(".svelte");
|
|
2932
3037
|
if (enableGitIgnore) configs.push(configGitIgnore(resolveSubOptions(options, "gitignore")));
|
|
2933
3038
|
configs.push(configIgnores(options.ignores), configJSX(), configNode({ overrides: getOverrides(options, "node") }), configCommand(resolveSubOptions(options, "command")), configImportX({
|
|
2934
3039
|
...resolveSubOptions(options, "importX"),
|
|
@@ -2981,6 +3086,18 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
2981
3086
|
...resolveSubOptions(options, "jsonc"),
|
|
2982
3087
|
overrides: getOverrides(options, "jsonc")
|
|
2983
3088
|
}));
|
|
3089
|
+
if (enableAstro) configs.push(configAstro({
|
|
3090
|
+
...resolveSubOptions(options, "astro"),
|
|
3091
|
+
typescript: !!enableTypeScript,
|
|
3092
|
+
overrides: getOverrides(options, "astro"),
|
|
3093
|
+
extraFileExtensions
|
|
3094
|
+
}));
|
|
3095
|
+
if (enableSvelte) configs.push(configSvelte({
|
|
3096
|
+
...resolveSubOptions(options, "svelte"),
|
|
3097
|
+
typescript: !!enableTypeScript,
|
|
3098
|
+
overrides: getOverrides(options, "svelte"),
|
|
3099
|
+
extraFileExtensions
|
|
3100
|
+
}));
|
|
2984
3101
|
if (enableSort) configs.push(configSort(resolveSubOptions(options, "sort")));
|
|
2985
3102
|
if (enableTest) configs.push(configTest({
|
|
2986
3103
|
...resolveSubOptions(options, "test"),
|
|
@@ -3000,12 +3117,6 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3000
3117
|
if (enableNtnyq) configs.push(configNtnyq({ overrides: getOverrides(options, "ntnyq") }));
|
|
3001
3118
|
if (enableGitHubAction) configs.push(configGitHubAction({ overrides: getOverrides(options, "githubAction") }));
|
|
3002
3119
|
if (enableESLintPlugin) configs.push(configESLintPlugin({ overrides: getOverrides(options, "eslintPlugin") }));
|
|
3003
|
-
if (enableAstro) configs.push(configAstro({
|
|
3004
|
-
...resolveSubOptions(options, "astro"),
|
|
3005
|
-
typescript: !!enableTypeScript,
|
|
3006
|
-
overrides: getOverrides(options, "astro"),
|
|
3007
|
-
extraFileExtensions
|
|
3008
|
-
}));
|
|
3009
3120
|
if (enablePnpm) configs.push(configPnpm(resolveSubOptions(options, "pnpm")));
|
|
3010
3121
|
if (enableSVGO) configs.push(configSVGO(resolveSubOptions(options, "svgo")));
|
|
3011
3122
|
if (enableHTML) configs.push(configHtml({
|
|
@@ -3017,16 +3128,9 @@ function defineESLintConfig(options = {}, ...userConfigs) {
|
|
|
3017
3128
|
...resolveSubOptions(options, "prettier"),
|
|
3018
3129
|
overrides: getOverrides(options, "prettier")
|
|
3019
3130
|
}) : [];
|
|
3020
|
-
const composer = new FlatConfigComposer(
|
|
3021
|
-
...configs,
|
|
3022
|
-
// User custom configs
|
|
3023
|
-
...userConfigs,
|
|
3024
|
-
// Keep prettier and specials at last
|
|
3025
|
-
...specialsConfigs,
|
|
3026
|
-
...prettierConfigs
|
|
3027
|
-
);
|
|
3131
|
+
const composer = new FlatConfigComposer(...configs, ...userConfigs, ...specialsConfigs, ...prettierConfigs);
|
|
3028
3132
|
return composer;
|
|
3029
3133
|
}
|
|
3030
3134
|
|
|
3031
3135
|
//#endregion
|
|
3032
|
-
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSON_SCHEMA, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_PNPM_WORKSPACE_YAML, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_YAML,
|
|
3136
|
+
export { GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_DIST, GLOB_DTS, GLOB_EXCLUDE, GLOB_GITHUB_ACTION, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSON_SCHEMA, GLOB_JSX, GLOB_JSX_ONLY, GLOB_LESS, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_NESTED, GLOB_NODE_MODULES, GLOB_PACKAGE_JSON, GLOB_PINIA_STORE, GLOB_PNPM_WORKSPACE_YAML, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TEST, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG_JSON, GLOB_TSX, GLOB_TSX_ONLY, GLOB_TYPES, GLOB_TYPE_TEST, GLOB_VUE, GLOB_YAML, PERFECTIONIST, PRETTIER_DEFAULT_OPTIONS, combineConfigs, configAntfu, configAstro, configCommand, configDeMorgan, configDepend, configESLintComments, configESLintPlugin, configFormat, configGitHubAction, configGitIgnore, configHtml, configIgnores, configImportX, configJSX, configJavaScript, configJsdoc, configJsonc, configMarkdown, configNode, configNtnyq, configPerfectionist, configPinia, configPnpm, configPrettier, configRegexp, configSVGO, configSort, configSpecials, configSvelte, configTest, configToml, configTypeScript, configUnicorn, configUnoCSS, configUnusedImports, configVue, configYml, configsTypeScript, defineESLintConfig, ensurePackages, getOverrides, hasPinia, hasShadcnVue, hasTypeScript, hasUnoCSS, hasVitest, hasVue, interopDefault, isInGitHooksOrRunBySpecifyPackages, mergePrettierOptions, mergeProcessors, parserJsonc, parserPlain, parserToml, parserTypeScript, parserVue, parserYaml, pluginAntfu, pluginComments, pluginDeMorgan, pluginDepend, pluginGitHubAction, pluginImportX, pluginJsdoc, pluginJsonc, pluginMarkdown, pluginNoOnlyTests, pluginNode, pluginNtnyq, pluginPerfectionist, pluginPinia, pluginPrettier, pluginRegexp, pluginSvgo, pluginToml, pluginTypeScript, pluginUnicorn, pluginUnoCSS, pluginVitest, pluginVue, pluginYml, processorPassThrough, processorVueBlocks, resolveSubOptions };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.0-beta.
|
|
4
|
+
"version": "5.0.0-beta.3",
|
|
5
5
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
@@ -43,7 +43,11 @@
|
|
|
43
43
|
"eslint-plugin-astro": "^1.3.1",
|
|
44
44
|
"eslint-plugin-eslint-plugin": "^6.4.0",
|
|
45
45
|
"eslint-plugin-format": "^1.0.1",
|
|
46
|
-
"eslint-plugin-
|
|
46
|
+
"eslint-plugin-pnpm": "^0.3.1",
|
|
47
|
+
"eslint-plugin-svelte": "^3.8.1",
|
|
48
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
49
|
+
"svelte": "^5.31.1",
|
|
50
|
+
"svelte-eslint-parser": "^1.2.0"
|
|
47
51
|
},
|
|
48
52
|
"peerDependenciesMeta": {
|
|
49
53
|
"@html-eslint/eslint-plugin": {
|
|
@@ -52,14 +56,32 @@
|
|
|
52
56
|
"@html-eslint/parser": {
|
|
53
57
|
"optional": true
|
|
54
58
|
},
|
|
59
|
+
"astro-eslint-parser": {
|
|
60
|
+
"optional": true
|
|
61
|
+
},
|
|
62
|
+
"eslint-plugin-astro": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
55
65
|
"eslint-plugin-eslint-plugin": {
|
|
56
66
|
"optional": true
|
|
57
67
|
},
|
|
58
68
|
"eslint-plugin-format": {
|
|
59
69
|
"optional": true
|
|
60
70
|
},
|
|
71
|
+
"eslint-plugin-pnpm": {
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
"eslint-plugin-svelte": {
|
|
75
|
+
"optional": true
|
|
76
|
+
},
|
|
61
77
|
"eslint-plugin-unused-imports": {
|
|
62
78
|
"optional": true
|
|
79
|
+
},
|
|
80
|
+
"svelte": {
|
|
81
|
+
"optional": true
|
|
82
|
+
},
|
|
83
|
+
"svelte-eslint-parser": {
|
|
84
|
+
"optional": true
|
|
63
85
|
}
|
|
64
86
|
},
|
|
65
87
|
"dependencies": {
|
|
@@ -88,7 +110,6 @@
|
|
|
88
110
|
"eslint-plugin-ntnyq": "^0.11.0",
|
|
89
111
|
"eslint-plugin-perfectionist": "^4.13.0",
|
|
90
112
|
"eslint-plugin-pinia": "^0.4.1",
|
|
91
|
-
"eslint-plugin-pnpm": "^0.3.1",
|
|
92
113
|
"eslint-plugin-prettier": "^5.4.0",
|
|
93
114
|
"eslint-plugin-regexp": "^2.7.0",
|
|
94
115
|
"eslint-plugin-svgo": "^0.8.0",
|
|
@@ -107,8 +128,8 @@
|
|
|
107
128
|
"yaml-eslint-parser": "^1.3.0"
|
|
108
129
|
},
|
|
109
130
|
"devDependencies": {
|
|
110
|
-
"@ntnyq/prettier-config": "^2.
|
|
111
|
-
"@types/node": "^22.15.
|
|
131
|
+
"@ntnyq/prettier-config": "^2.1.0",
|
|
132
|
+
"@types/node": "^22.15.19",
|
|
112
133
|
"bumpp": "^10.1.1",
|
|
113
134
|
"eslint": "^9.27.0",
|
|
114
135
|
"eslint-plugin-eslint-plugin": "^6.4.0",
|
|
@@ -118,11 +139,11 @@
|
|
|
118
139
|
"nano-staged": "^0.8.0",
|
|
119
140
|
"npm-run-all2": "^8.0.2",
|
|
120
141
|
"tinyglobby": "^0.2.13",
|
|
121
|
-
"tsdown": "^0.11.
|
|
142
|
+
"tsdown": "^0.11.12",
|
|
122
143
|
"tsx": "^4.19.4",
|
|
123
144
|
"typescript": "^5.8.3",
|
|
124
145
|
"uncase": "^0.1.0",
|
|
125
|
-
"vitest": "^3.1.
|
|
146
|
+
"vitest": "^3.1.4"
|
|
126
147
|
},
|
|
127
148
|
"engines": {
|
|
128
149
|
"node": ">=20.11.0"
|
|
@@ -132,14 +153,14 @@
|
|
|
132
153
|
"*.{css,scss,html}": "prettier -uw"
|
|
133
154
|
},
|
|
134
155
|
"scripts": {
|
|
135
|
-
"build": "run-s generate:
|
|
156
|
+
"build": "run-s generate:types build:lib",
|
|
136
157
|
"build:inspector": "pnpm dlx @eslint/config-inspector build --config eslint-inspector.config.ts",
|
|
137
158
|
"build:lib": "tsdown",
|
|
138
159
|
"dev": "tsdown --watch",
|
|
139
160
|
"docs:build": "pnpm -C docs run build",
|
|
140
161
|
"docs:dev": "pnpm -C docs run dev",
|
|
141
|
-
"generate:site": "run-s generate:
|
|
142
|
-
"generate:
|
|
162
|
+
"generate:site": "run-s generate:types build:lib build:inspector",
|
|
163
|
+
"generate:types": "tsx scripts/generateType.ts",
|
|
143
164
|
"lint": "eslint --cache",
|
|
144
165
|
"release": "run-s release:check release:version release:publish",
|
|
145
166
|
"release:check": "run-s build lint test typecheck",
|