@kitschpatrol/eslint-config 5.5.0 → 5.7.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/bin/cli.js +8 -4
- package/dist/index.d.ts +791 -335
- package/dist/index.js +106 -22
- package/package.json +36 -35
- package/readme.md +14 -14
package/dist/index.js
CHANGED
|
@@ -362,6 +362,7 @@ var eslintTypescriptStrictTypeCheckedRules = {
|
|
|
362
362
|
"ts/no-unnecessary-type-arguments": "error",
|
|
363
363
|
"ts/no-unnecessary-type-assertion": "error",
|
|
364
364
|
"ts/no-unnecessary-type-constraint": "error",
|
|
365
|
+
"ts/no-unnecessary-type-conversion": "error",
|
|
365
366
|
"ts/no-unnecessary-type-parameters": "error",
|
|
366
367
|
"ts/no-unsafe-argument": "error",
|
|
367
368
|
"ts/no-unsafe-assignment": "error",
|
|
@@ -412,7 +413,7 @@ var eslintTypescriptStrictTypeCheckedRules = {
|
|
|
412
413
|
allowRegExp: false
|
|
413
414
|
}
|
|
414
415
|
],
|
|
415
|
-
"no-return-await":
|
|
416
|
+
// "no-return-await":"off",
|
|
416
417
|
"ts/return-await": ["error", "error-handling-correctness-only"],
|
|
417
418
|
"ts/triple-slash-reference": "error",
|
|
418
419
|
"ts/unbound-method": "error",
|
|
@@ -771,6 +772,7 @@ var jsonPrettierRules = {
|
|
|
771
772
|
var jsonPackageRecommendedRules = {
|
|
772
773
|
// Begin expansion 'eslint-plugin-package-json' 'configs.recommended.rules'
|
|
773
774
|
"json-package/no-empty-fields": "error",
|
|
775
|
+
"json-package/no-redundant-files": "error",
|
|
774
776
|
"json-package/order-properties": "error",
|
|
775
777
|
"json-package/require-description": "error",
|
|
776
778
|
"json-package/require-name": "error",
|
|
@@ -779,11 +781,46 @@ var jsonPackageRecommendedRules = {
|
|
|
779
781
|
"json-package/repository-shorthand": "error",
|
|
780
782
|
"json-package/sort-collections": "error",
|
|
781
783
|
"json-package/unique-dependencies": "error",
|
|
782
|
-
"json-package/valid-
|
|
784
|
+
"json-package/valid-author": "error",
|
|
785
|
+
"json-package/valid-bundleDependencies": "error",
|
|
786
|
+
"json-package/valid-config": "error",
|
|
787
|
+
"json-package/valid-cpu": "error",
|
|
788
|
+
"json-package/valid-dependencies": "error",
|
|
789
|
+
"json-package/valid-description": "error",
|
|
790
|
+
"json-package/valid-devDependencies": "error",
|
|
791
|
+
"json-package/valid-directories": "error",
|
|
792
|
+
"json-package/valid-exports": "error",
|
|
793
|
+
"json-package/valid-license": "error",
|
|
794
|
+
"json-package/valid-optionalDependencies": "error",
|
|
795
|
+
"json-package/valid-peerDependencies": "error",
|
|
796
|
+
"json-package/valid-scripts": "error",
|
|
797
|
+
"json-package/valid-type": "error",
|
|
798
|
+
"json-package/valid-bin": "error",
|
|
783
799
|
"json-package/valid-name": "error",
|
|
784
800
|
"json-package/valid-package-definition": [
|
|
785
801
|
"error",
|
|
786
|
-
{
|
|
802
|
+
{
|
|
803
|
+
ignoreProperties: [
|
|
804
|
+
"author",
|
|
805
|
+
"bundleDependencies",
|
|
806
|
+
"config",
|
|
807
|
+
"cpu",
|
|
808
|
+
"dependencies",
|
|
809
|
+
"description",
|
|
810
|
+
"devDependencies",
|
|
811
|
+
"directories",
|
|
812
|
+
"exports",
|
|
813
|
+
"license",
|
|
814
|
+
"optionalDependencies",
|
|
815
|
+
"peerDependencies",
|
|
816
|
+
"scripts",
|
|
817
|
+
"type",
|
|
818
|
+
"bin",
|
|
819
|
+
"name",
|
|
820
|
+
"repository-directory",
|
|
821
|
+
"version"
|
|
822
|
+
]
|
|
823
|
+
}
|
|
787
824
|
],
|
|
788
825
|
"json-package/valid-repository-directory": "error",
|
|
789
826
|
"json-package/valid-version": "error"
|
|
@@ -896,9 +933,9 @@ var jsxA11yRecommendedRules = {
|
|
|
896
933
|
var nodeRecommendedRules = {
|
|
897
934
|
// Begin expansion 'eslint-plugin-n' 'flat/recommended'
|
|
898
935
|
"node/no-deprecated-api": "error",
|
|
936
|
+
"node/no-exports-assign": "error",
|
|
899
937
|
"node/no-extraneous-import": "error",
|
|
900
938
|
"node/no-extraneous-require": "error",
|
|
901
|
-
"node/no-exports-assign": "error",
|
|
902
939
|
"node/no-missing-import": "error",
|
|
903
940
|
"node/no-missing-require": "error",
|
|
904
941
|
"node/no-process-exit": "error",
|
|
@@ -1472,6 +1509,7 @@ var svelteRecommendedRules = {
|
|
|
1472
1509
|
"svelte/no-immutable-reactive-statements": "error",
|
|
1473
1510
|
"svelte/no-inner-declarations": "error",
|
|
1474
1511
|
"svelte/no-inspect": "warn",
|
|
1512
|
+
"svelte/no-navigation-without-resolve": "error",
|
|
1475
1513
|
"svelte/no-not-function-handler": "error",
|
|
1476
1514
|
"svelte/no-object-in-text-mustaches": "error",
|
|
1477
1515
|
"svelte/no-raw-special-elements": "error",
|
|
@@ -1487,6 +1525,7 @@ var svelteRecommendedRules = {
|
|
|
1487
1525
|
"svelte/no-unused-svelte-ignore": "error",
|
|
1488
1526
|
"svelte/no-useless-children-snippet": "error",
|
|
1489
1527
|
"svelte/no-useless-mustaches": "error",
|
|
1528
|
+
"svelte/prefer-svelte-reactivity": "error",
|
|
1490
1529
|
"svelte/prefer-writable-derived": "error",
|
|
1491
1530
|
"svelte/require-each-key": "error",
|
|
1492
1531
|
"svelte/require-event-dispatcher-types": "error",
|
|
@@ -1550,6 +1589,8 @@ var unicornRecommendedRules = {
|
|
|
1550
1589
|
"unicorn/no-array-for-each": "error",
|
|
1551
1590
|
"unicorn/no-array-method-this-argument": "error",
|
|
1552
1591
|
"unicorn/no-array-reduce": "error",
|
|
1592
|
+
"unicorn/no-array-reverse": "error",
|
|
1593
|
+
"unicorn/no-array-sort": "error",
|
|
1553
1594
|
"unicorn/no-await-expression-member": "error",
|
|
1554
1595
|
"unicorn/no-await-in-promise-methods": "error",
|
|
1555
1596
|
"unicorn/no-console-spaces": "error",
|
|
@@ -1585,6 +1626,7 @@ var unicornRecommendedRules = {
|
|
|
1585
1626
|
"unicorn/no-unreadable-array-destructuring": "error",
|
|
1586
1627
|
"unicorn/no-unreadable-iife": "error",
|
|
1587
1628
|
"unicorn/no-unused-properties": "off",
|
|
1629
|
+
"unicorn/no-useless-error-capture-stack-trace": "error",
|
|
1588
1630
|
"unicorn/no-useless-fallback-in-spread": "error",
|
|
1589
1631
|
"unicorn/no-useless-length-check": "error",
|
|
1590
1632
|
"unicorn/no-useless-promise-resolve-reject": "error",
|
|
@@ -1596,12 +1638,15 @@ var unicornRecommendedRules = {
|
|
|
1596
1638
|
"unicorn/numeric-separators-style": "error",
|
|
1597
1639
|
"unicorn/prefer-add-event-listener": "error",
|
|
1598
1640
|
"unicorn/prefer-array-find": "error",
|
|
1599
|
-
"unicorn/prefer-array-flat-map": "error",
|
|
1600
1641
|
"unicorn/prefer-array-flat": "error",
|
|
1642
|
+
"unicorn/prefer-array-flat-map": "error",
|
|
1601
1643
|
"unicorn/prefer-array-index-of": "error",
|
|
1602
1644
|
"unicorn/prefer-array-some": "error",
|
|
1603
1645
|
"unicorn/prefer-at": "error",
|
|
1646
|
+
"unicorn/prefer-bigint-literals": "error",
|
|
1604
1647
|
"unicorn/prefer-blob-reading-methods": "error",
|
|
1648
|
+
"unicorn/prefer-class-fields": "error",
|
|
1649
|
+
"unicorn/prefer-classlist-toggle": "error",
|
|
1605
1650
|
"unicorn/prefer-code-point": "error",
|
|
1606
1651
|
"unicorn/prefer-date-now": "error",
|
|
1607
1652
|
"unicorn/prefer-default-parameters": "error",
|
|
@@ -1649,6 +1694,8 @@ var unicornRecommendedRules = {
|
|
|
1649
1694
|
"unicorn/prevent-abbreviations": "error",
|
|
1650
1695
|
"unicorn/relative-url-style": "error",
|
|
1651
1696
|
"unicorn/require-array-join-separator": "error",
|
|
1697
|
+
"unicorn/require-module-attributes": "error",
|
|
1698
|
+
"unicorn/require-module-specifiers": "error",
|
|
1652
1699
|
"unicorn/require-number-to-fixed-digits-argument": "error",
|
|
1653
1700
|
"unicorn/require-post-message-target-origin": "off",
|
|
1654
1701
|
"unicorn/string-content": "off",
|
|
@@ -1701,6 +1748,7 @@ var xoJavascriptRules = {
|
|
|
1701
1748
|
"no-unsafe-finally": "error",
|
|
1702
1749
|
"no-unsafe-negation": ["error", { enforceForOrderingRelations: true }],
|
|
1703
1750
|
"no-unsafe-optional-chaining": ["error", { disallowArithmeticOperators: true }],
|
|
1751
|
+
"no-unused-private-class-members": "error",
|
|
1704
1752
|
"no-useless-backreference": "error",
|
|
1705
1753
|
"use-isnan": "error",
|
|
1706
1754
|
"valid-typeof": ["error", { requireStringLiterals: false }],
|
|
@@ -1750,7 +1798,7 @@ var xoJavascriptRules = {
|
|
|
1750
1798
|
"no-proto": "error",
|
|
1751
1799
|
"no-redeclare": "error",
|
|
1752
1800
|
"no-return-assign": ["error", "always"],
|
|
1753
|
-
"no-return-await":
|
|
1801
|
+
// "no-return-await":"error",
|
|
1754
1802
|
"no-script-url": "error",
|
|
1755
1803
|
"no-self-assign": ["error", { props: true }],
|
|
1756
1804
|
"no-self-compare": "error",
|
|
@@ -1776,14 +1824,19 @@ var xoJavascriptRules = {
|
|
|
1776
1824
|
"no-label-var": "error",
|
|
1777
1825
|
"no-restricted-globals": [
|
|
1778
1826
|
"error",
|
|
1779
|
-
"event",
|
|
1780
1827
|
{
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1828
|
+
globals: [
|
|
1829
|
+
"event",
|
|
1830
|
+
{
|
|
1831
|
+
name: "atob",
|
|
1832
|
+
message: "This API is deprecated. Use https://github.com/sindresorhus/uint8array-extras instead."
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
name: "btoa",
|
|
1836
|
+
message: "This API is deprecated. Use https://github.com/sindresorhus/uint8array-extras instead."
|
|
1837
|
+
}
|
|
1838
|
+
],
|
|
1839
|
+
checkGlobalObject: true
|
|
1787
1840
|
}
|
|
1788
1841
|
],
|
|
1789
1842
|
"no-shadow-restricted-names": "error",
|
|
@@ -1801,7 +1854,7 @@ var xoJavascriptRules = {
|
|
|
1801
1854
|
caughtErrorsIgnorePattern: "^_$"
|
|
1802
1855
|
}
|
|
1803
1856
|
],
|
|
1804
|
-
"no-buffer-constructor":
|
|
1857
|
+
// "no-buffer-constructor":"error",
|
|
1805
1858
|
"no-restricted-imports": [
|
|
1806
1859
|
"error",
|
|
1807
1860
|
"domain",
|
|
@@ -1821,7 +1874,7 @@ var xoJavascriptRules = {
|
|
|
1821
1874
|
"error",
|
|
1822
1875
|
"always",
|
|
1823
1876
|
{
|
|
1824
|
-
ignorePattern: String.raw`pragma|ignore|prettier-ignore|biome-ignore|webpack\w+:|c8|v8|type-coverage:`,
|
|
1877
|
+
ignorePattern: String.raw`pragma|ignore|prettier-ignore|biome-ignore|codespell:ignore|webpack\w+:|c8|v8|type-coverage:`,
|
|
1825
1878
|
ignoreInlineComments: true,
|
|
1826
1879
|
ignoreConsecutiveComments: true
|
|
1827
1880
|
}
|
|
@@ -1898,6 +1951,7 @@ var xoJavascriptRules = {
|
|
|
1898
1951
|
"no-dupe-class-members": "error",
|
|
1899
1952
|
"no-new-native-nonconstructor": "error",
|
|
1900
1953
|
"no-this-before-super": "error",
|
|
1954
|
+
"no-unassigned-vars": "error",
|
|
1901
1955
|
"no-useless-computed-key": ["error", { enforceForClassMembers: true }],
|
|
1902
1956
|
"no-useless-constructor": "error",
|
|
1903
1957
|
"no-useless-rename": "error",
|
|
@@ -1980,7 +2034,7 @@ var xoTypescriptRules = {
|
|
|
1980
2034
|
"ts/consistent-type-exports": ["error", { fixMixedExportsWithInlineTypeSpecifier: true }],
|
|
1981
2035
|
"ts/consistent-type-imports": ["error", { fixStyle: "inline-type-imports" }],
|
|
1982
2036
|
"func-call-spacing": "off",
|
|
1983
|
-
// "@stylistic/
|
|
2037
|
+
// "@stylistic/function-call-spacing":["error","never"],
|
|
1984
2038
|
indent: "off",
|
|
1985
2039
|
// "@stylistic/indent":["error","tab",{"SwitchCase":1}],
|
|
1986
2040
|
"keyword-spacing": "off",
|
|
@@ -2086,7 +2140,7 @@ var xoTypescriptRules = {
|
|
|
2086
2140
|
"ts/no-dynamic-delete": "error",
|
|
2087
2141
|
"no-empty-function": "off",
|
|
2088
2142
|
"ts/no-empty-function": "error",
|
|
2089
|
-
"ts/no-empty-interface":
|
|
2143
|
+
// "ts/no-empty-interface":["error",{"allowSingleExtends":true}],
|
|
2090
2144
|
"ts/no-empty-object-type": "error",
|
|
2091
2145
|
"ts/no-extra-non-null-assertion": "error",
|
|
2092
2146
|
"no-extra-parens": "off",
|
|
@@ -2131,7 +2185,6 @@ var xoTypescriptRules = {
|
|
|
2131
2185
|
"ts/only-throw-error": ["error", { allowThrowingUnknown: true, allowThrowingAny: false }],
|
|
2132
2186
|
"ts/no-unnecessary-boolean-literal-compare": "error",
|
|
2133
2187
|
"no-constant-condition": "error",
|
|
2134
|
-
"ts/no-unnecessary-parameter-property-assignment": "error",
|
|
2135
2188
|
"ts/no-unnecessary-qualifier": "error",
|
|
2136
2189
|
"ts/no-unnecessary-type-arguments": "error",
|
|
2137
2190
|
"ts/no-unnecessary-type-assertion": "error",
|
|
@@ -2157,7 +2210,6 @@ var xoTypescriptRules = {
|
|
|
2157
2210
|
// "@stylistic/padding-line-between-statements":["error",{"blankLine":"always","prev":"multiline-block-like","next":"*"}],
|
|
2158
2211
|
"ts/no-wrapper-object-types": "error",
|
|
2159
2212
|
"ts/non-nullable-type-assertion-style": "error",
|
|
2160
|
-
"ts/parameter-properties": ["error", { prefer: "parameter-property" }],
|
|
2161
2213
|
"ts/prefer-as-const": "error",
|
|
2162
2214
|
"ts/prefer-find": "error",
|
|
2163
2215
|
"ts/prefer-for-of": "error",
|
|
@@ -2454,6 +2506,14 @@ var sharedScriptConfig = {
|
|
|
2454
2506
|
}
|
|
2455
2507
|
],
|
|
2456
2508
|
"max-params": ["warn", { max: 8 }],
|
|
2509
|
+
"new-cap": [
|
|
2510
|
+
"error",
|
|
2511
|
+
{
|
|
2512
|
+
capIsNew: true,
|
|
2513
|
+
capIsNewExceptionPattern: String.raw`^Intl\..`,
|
|
2514
|
+
newIsCap: true
|
|
2515
|
+
}
|
|
2516
|
+
],
|
|
2457
2517
|
"no-await-in-loop": "off",
|
|
2458
2518
|
// TSConfig must have allowUnreachableCode: false, this is preferable because it will flag but not spontaneously delete unreachable code
|
|
2459
2519
|
"no-unreachable": "warn",
|
|
@@ -2470,6 +2530,8 @@ var sharedScriptConfig = {
|
|
|
2470
2530
|
"perfectionist/sort-imports": [
|
|
2471
2531
|
"error",
|
|
2472
2532
|
{
|
|
2533
|
+
// Also treat $ prefix as internal
|
|
2534
|
+
internalPattern: ["^~/.+", "^@/.+", String.raw`^\$.+`],
|
|
2473
2535
|
newlinesBetween: "never",
|
|
2474
2536
|
partitionByComment: {
|
|
2475
2537
|
block: false,
|
|
@@ -2503,6 +2565,9 @@ var sharedScriptConfig = {
|
|
|
2503
2565
|
generatePerfectionistSortConfig(["Red", "Green", "Blue", "Alpha"], "trailing"),
|
|
2504
2566
|
generatePerfectionistSortConfig(["x", "y", "z", "w"]),
|
|
2505
2567
|
generatePerfectionistSortConfig(["X", "Y", "Z", "W"], "trailing"),
|
|
2568
|
+
generatePerfectionistSortConfig(["open", "close"]),
|
|
2569
|
+
generatePerfectionistSortConfig(["open", "close"], "leading"),
|
|
2570
|
+
generatePerfectionistSortConfig(["Open", "Close"], "trailing"),
|
|
2506
2571
|
generatePerfectionistSortConfig(["start", "end"]),
|
|
2507
2572
|
generatePerfectionistSortConfig(["start", "end"], "leading"),
|
|
2508
2573
|
generatePerfectionistSortConfig(["Start", "End"], "trailing"),
|
|
@@ -2554,8 +2619,11 @@ var sharedScriptConfig = {
|
|
|
2554
2619
|
},
|
|
2555
2620
|
{
|
|
2556
2621
|
format: ["UPPER_CASE", "camelCase"],
|
|
2557
|
-
modifiers: [
|
|
2558
|
-
|
|
2622
|
+
modifiers: [
|
|
2623
|
+
"const"
|
|
2624
|
+
// 'exported'
|
|
2625
|
+
],
|
|
2626
|
+
// Allow UPPER_CASE constants, even if not exported
|
|
2559
2627
|
selector: "variable"
|
|
2560
2628
|
// Not objects...
|
|
2561
2629
|
// types: ['boolean', 'string', 'number', 'array'],
|
|
@@ -2657,6 +2725,7 @@ var sharedScriptConfig = {
|
|
|
2657
2725
|
"import-x/resolver-next": [
|
|
2658
2726
|
createTypeScriptImportResolver({
|
|
2659
2727
|
alwaysTryTypes: true,
|
|
2728
|
+
noWarnOnMultipleProjects: true,
|
|
2660
2729
|
project: [
|
|
2661
2730
|
// Useful for monorepos
|
|
2662
2731
|
"packages/*/tsconfig.json",
|
|
@@ -2884,7 +2953,8 @@ var htmlRecommendedRules = {
|
|
|
2884
2953
|
"html/no-obsolete-tags": "error",
|
|
2885
2954
|
"html/require-closing-tags": "error",
|
|
2886
2955
|
"html/no-duplicate-attrs": "error",
|
|
2887
|
-
"html/use-baseline": "error"
|
|
2956
|
+
"html/use-baseline": "error",
|
|
2957
|
+
"html/no-duplicate-in-head": "error"
|
|
2888
2958
|
// End expansion
|
|
2889
2959
|
};
|
|
2890
2960
|
|
|
@@ -3851,6 +3921,20 @@ async function svelte(options = {}) {
|
|
|
3851
3921
|
"html/no-non-scalable-viewport": "off",
|
|
3852
3922
|
"html/require-title": "off"
|
|
3853
3923
|
}
|
|
3924
|
+
},
|
|
3925
|
+
{
|
|
3926
|
+
// Special case for \.svelte\.[jt]s$ files.
|
|
3927
|
+
files: [GLOB_SVELTE_JS, GLOB_SVELTE_TS],
|
|
3928
|
+
rules: {
|
|
3929
|
+
"unicorn/filename-case": [
|
|
3930
|
+
"error",
|
|
3931
|
+
{
|
|
3932
|
+
cases: {
|
|
3933
|
+
camelCase: true
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
]
|
|
3937
|
+
}
|
|
3854
3938
|
}
|
|
3855
3939
|
];
|
|
3856
3940
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/eslint-config",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.7.0",
|
|
4
4
|
"description": "ESLint configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
7
7
|
"eslint-config",
|
|
8
8
|
"eslint",
|
|
9
9
|
"cli",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
10
|
+
"ksc",
|
|
11
|
+
"ksc-eslint"
|
|
12
12
|
],
|
|
13
13
|
"homepage": "https://github.com/kitschpatrol/shared-config/tree/main/packages/eslint-config",
|
|
14
14
|
"bugs": "https://github.com/kitschpatrol/shared-config/issues",
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"main": "dist/index.js",
|
|
34
34
|
"types": "dist/index.d.ts",
|
|
35
35
|
"bin": {
|
|
36
|
-
"kpi-eslint": "bin/cli.js"
|
|
36
|
+
"kpi-eslint": "bin/cli.js",
|
|
37
|
+
"ksc-eslint": "bin/cli.js"
|
|
37
38
|
},
|
|
38
39
|
"files": [
|
|
39
40
|
"bin/*",
|
|
@@ -42,45 +43,45 @@
|
|
|
42
43
|
],
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
45
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
46
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
47
|
-
"@html-eslint/parser": "^0.
|
|
46
|
+
"@eslint-react/eslint-plugin": "^1.53.0",
|
|
47
|
+
"@html-eslint/eslint-plugin": "^0.46.2",
|
|
48
|
+
"@html-eslint/parser": "^0.46.2",
|
|
48
49
|
"@pinojs/json-colorizer": "^4.0.0",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
50
|
-
"@typescript-eslint/parser": "^8.
|
|
51
|
-
"@vitest/eslint-plugin": "^1.
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
51
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
52
|
+
"@vitest/eslint-plugin": "^1.3.9",
|
|
52
53
|
"astro-eslint-parser": "^1.2.2",
|
|
53
|
-
"eslint": "^9.
|
|
54
|
+
"eslint": "^9.35.0",
|
|
54
55
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
55
|
-
"eslint-flat-config-utils": "^2.1.
|
|
56
|
-
"eslint-import-resolver-typescript": "^4.4.
|
|
57
|
-
"eslint-mdx": "^3.
|
|
56
|
+
"eslint-flat-config-utils": "^2.1.1",
|
|
57
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
58
|
+
"eslint-mdx": "^3.6.2",
|
|
58
59
|
"eslint-plugin-astro": "^1.3.1",
|
|
59
60
|
"eslint-plugin-depend": "^1.2.0",
|
|
60
61
|
"eslint-plugin-html": "^8.1.3",
|
|
61
|
-
"eslint-plugin-import-x": "^4.
|
|
62
|
-
"eslint-plugin-jsdoc": "^
|
|
62
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
63
|
+
"eslint-plugin-jsdoc": "^55.0.0",
|
|
63
64
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
64
65
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
65
|
-
"eslint-plugin-mdx": "^3.
|
|
66
|
-
"eslint-plugin-n": "^17.
|
|
66
|
+
"eslint-plugin-mdx": "^3.6.2",
|
|
67
|
+
"eslint-plugin-n": "^17.21.3",
|
|
67
68
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
68
|
-
"eslint-plugin-package-json": "^0.
|
|
69
|
-
"eslint-plugin-perfectionist": "^4.
|
|
70
|
-
"eslint-plugin-regexp": "^2.
|
|
71
|
-
"eslint-plugin-svelte": "^3.
|
|
69
|
+
"eslint-plugin-package-json": "^0.56.2",
|
|
70
|
+
"eslint-plugin-perfectionist": "^4.15.0",
|
|
71
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
72
|
+
"eslint-plugin-svelte": "^3.12.2",
|
|
72
73
|
"eslint-plugin-toml": "^0.12.0",
|
|
73
|
-
"eslint-plugin-unicorn": "^
|
|
74
|
+
"eslint-plugin-unicorn": "^61.0.2",
|
|
74
75
|
"eslint-plugin-yml": "^1.18.0",
|
|
75
76
|
"execa": "^9.6.0",
|
|
76
77
|
"find-workspaces": "^0.3.1",
|
|
77
|
-
"fs-extra": "^11.3.
|
|
78
|
-
"globals": "^16.
|
|
78
|
+
"fs-extra": "^11.3.1",
|
|
79
|
+
"globals": "^16.3.0",
|
|
79
80
|
"jsonc-eslint-parser": "^2.4.0",
|
|
80
|
-
"local-pkg": "^1.1.
|
|
81
|
-
"prettier": "^3.
|
|
82
|
-
"sort-package-json": "^3.
|
|
83
|
-
"svelte-eslint-parser": "^1.
|
|
81
|
+
"local-pkg": "^1.1.2",
|
|
82
|
+
"prettier": "^3.6.2",
|
|
83
|
+
"sort-package-json": "^3.4.0",
|
|
84
|
+
"svelte-eslint-parser": "^1.3.1",
|
|
84
85
|
"toml-eslint-parser": "^0.10.0",
|
|
85
86
|
"yaml-eslint-parser": "^1.3.0"
|
|
86
87
|
},
|
|
@@ -88,15 +89,15 @@
|
|
|
88
89
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
89
90
|
"@types/eslint-plugin-jsx-a11y": "^6.10.0",
|
|
90
91
|
"dot-prop": "^9.0.0",
|
|
91
|
-
"eslint-config-prettier": "^10.1.
|
|
92
|
-
"eslint-config-xo-typescript": "^
|
|
93
|
-
"eslint-typegen": "^2.
|
|
92
|
+
"eslint-config-prettier": "^10.1.8",
|
|
93
|
+
"eslint-config-xo-typescript": "^9.0.0",
|
|
94
|
+
"eslint-typegen": "^2.3.0",
|
|
94
95
|
"globby": "^14.1.0",
|
|
95
|
-
"svelte": "^5.
|
|
96
|
+
"svelte": "^5.38.7",
|
|
96
97
|
"tsup": "^8.5.0"
|
|
97
98
|
},
|
|
98
99
|
"engines": {
|
|
99
|
-
"node": ">=20.
|
|
100
|
+
"node": ">=20.19.0"
|
|
100
101
|
},
|
|
101
102
|
"publishConfig": {
|
|
102
103
|
"access": "public"
|
|
@@ -105,6 +106,6 @@
|
|
|
105
106
|
"build": "tsup --format esm --clean --dts && ../../scripts/build.ts",
|
|
106
107
|
"cli": "node ./bin/cli.js",
|
|
107
108
|
"inspect": "npx @eslint/config-inspector --config ./init/eslint.config.ts",
|
|
108
|
-
"update-rules": "tsx scripts/presetgen.ts && tsx scripts/typegen.ts &&
|
|
109
|
+
"update-rules": "tsx scripts/presetgen.ts && tsx scripts/typegen.ts && ksc-eslint fix && ksc-prettier fix"
|
|
109
110
|
}
|
|
110
111
|
}
|
package/readme.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## Overview
|
|
23
23
|
|
|
24
|
-
It's a shared [ESLint](https://eslint.org) config, plus a command-line tool `
|
|
24
|
+
It's a shared [ESLint](https://eslint.org) config, plus a command-line tool `ksc-eslint` to perform ESLint-related project initialization, linting, and fixing.
|
|
25
25
|
|
|
26
26
|
<!-- recommendation -->
|
|
27
27
|
|
|
@@ -29,7 +29,7 @@ It's a shared [ESLint](https://eslint.org) config, plus a command-line tool `kpi
|
|
|
29
29
|
>
|
|
30
30
|
> **You can use this package on its own, but it's recommended to use [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config) instead for a single-dependency and single-package approach to linting and fixing your project.**
|
|
31
31
|
>
|
|
32
|
-
> This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `
|
|
32
|
+
> This package is included as a dependency in [`@kitschpatrol/shared-config`](https://www.npmjs.com/package/@kitschpatrol/shared-config), which also automatically invokes the command line functionality in this package via its `ksc` command
|
|
33
33
|
|
|
34
34
|
<!-- /recommendation -->
|
|
35
35
|
|
|
@@ -59,7 +59,7 @@ To use just this ESLint config in isolation:
|
|
|
59
59
|
4. Add the starter `eslint.config.ts` config files to your project root, and add any overrides you'd like:
|
|
60
60
|
|
|
61
61
|
```sh
|
|
62
|
-
pnpm exec eslint-
|
|
62
|
+
pnpm exec eslint-ksc init
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
## Usage
|
|
@@ -83,16 +83,16 @@ Integrate with your `package.json` scripts as you see fit, for example:
|
|
|
83
83
|
|
|
84
84
|
<!-- cli-help -->
|
|
85
85
|
|
|
86
|
-
#### Command: `
|
|
86
|
+
#### Command: `ksc-eslint`
|
|
87
87
|
|
|
88
88
|
Kitschpatrol's ESLint shared configuration tools.
|
|
89
89
|
|
|
90
|
-
This section lists top-level commands for `
|
|
90
|
+
This section lists top-level commands for `ksc-eslint`.
|
|
91
91
|
|
|
92
92
|
Usage:
|
|
93
93
|
|
|
94
94
|
```txt
|
|
95
|
-
|
|
95
|
+
ksc-eslint <command>
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
| Command | Argument | Description |
|
|
@@ -109,14 +109,14 @@ kpi-eslint <command>
|
|
|
109
109
|
|
|
110
110
|
_See the sections below for more information on each subcommand._
|
|
111
111
|
|
|
112
|
-
#### Subcommand: `
|
|
112
|
+
#### Subcommand: `ksc-eslint init`
|
|
113
113
|
|
|
114
114
|
Initialize by copying starter config files to your project root.
|
|
115
115
|
|
|
116
116
|
Usage:
|
|
117
117
|
|
|
118
118
|
```txt
|
|
119
|
-
|
|
119
|
+
ksc-eslint init
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
| Option | Description | Type |
|
|
@@ -124,14 +124,14 @@ kpi-eslint init
|
|
|
124
124
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
125
125
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
126
126
|
|
|
127
|
-
#### Subcommand: `
|
|
127
|
+
#### Subcommand: `ksc-eslint lint`
|
|
128
128
|
|
|
129
129
|
Lint your project with ESLint. Matches files below the current working directory by default.
|
|
130
130
|
|
|
131
131
|
Usage:
|
|
132
132
|
|
|
133
133
|
```txt
|
|
134
|
-
|
|
134
|
+
ksc-eslint lint [files..]
|
|
135
135
|
```
|
|
136
136
|
|
|
137
137
|
| Positional Argument | Description | Type | Default |
|
|
@@ -143,14 +143,14 @@ kpi-eslint lint [files..]
|
|
|
143
143
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
144
144
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
145
145
|
|
|
146
|
-
#### Subcommand: `
|
|
146
|
+
#### Subcommand: `ksc-eslint fix`
|
|
147
147
|
|
|
148
148
|
Fix your project with ESLint. Matches files below the current working directory by default.
|
|
149
149
|
|
|
150
150
|
Usage:
|
|
151
151
|
|
|
152
152
|
```txt
|
|
153
|
-
|
|
153
|
+
ksc-eslint fix [files..]
|
|
154
154
|
```
|
|
155
155
|
|
|
156
156
|
| Positional Argument | Description | Type | Default |
|
|
@@ -162,14 +162,14 @@ kpi-eslint fix [files..]
|
|
|
162
162
|
| `--help`<br>`-h` | Show help | `boolean` |
|
|
163
163
|
| `--version`<br>`-v` | Show version number | `boolean` |
|
|
164
164
|
|
|
165
|
-
#### Subcommand: `
|
|
165
|
+
#### Subcommand: `ksc-eslint print-config`
|
|
166
166
|
|
|
167
167
|
Print the effective ESLint configuration. Package-scoped by default, file-scoped if a file argument is provided. Use `@eslint/config-inspector` for a more detailed view.
|
|
168
168
|
|
|
169
169
|
Usage:
|
|
170
170
|
|
|
171
171
|
```txt
|
|
172
|
-
|
|
172
|
+
ksc-eslint print-config [file]
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
| Positional Argument | Description | Type |
|