@kitschpatrol/eslint-config 7.6.1 → 7.6.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/bin/cli.js +1 -1
- package/dist/index.d.ts +33 -1
- package/package.json +17 -17
package/bin/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{cosmiconfig as e}from"cosmiconfig";import{TypeScriptLoader as t}from"cosmiconfig-typescript-loader";import{execa as n}from"execa";import r from"fs-extra";import i from"node:fs";import a from"node:path";import{PassThrough as o,Transform as s}from"node:stream";import{fileURLToPath as c}from"node:url";import{packageUp as l,packageUpSync as u}from"package-up";import d from"picocolors";import f from"yargs";import{hideBin as p}from"yargs/helpers";import m from"@pinojs/json-colorizer";import h from"decircular";import g from"deepmerge";import _ from"json-stringify-pretty-compact";import{findWorkspacesRoot as v}from"find-workspaces";import y from"node:fs/promises";import{stripVTControlCharacters as b}from"node:util";var x=`7.6.
|
|
2
|
+
import{cosmiconfig as e}from"cosmiconfig";import{TypeScriptLoader as t}from"cosmiconfig-typescript-loader";import{execa as n}from"execa";import r from"fs-extra";import i from"node:fs";import a from"node:path";import{PassThrough as o,Transform as s}from"node:stream";import{fileURLToPath as c}from"node:url";import{packageUp as l,packageUpSync as u}from"package-up";import d from"picocolors";import f from"yargs";import{hideBin as p}from"yargs/helpers";import m from"@pinojs/json-colorizer";import h from"decircular";import g from"deepmerge";import _ from"json-stringify-pretty-compact";import{findWorkspacesRoot as v}from"find-workspaces";import y from"node:fs/promises";import{stripVTControlCharacters as b}from"node:util";var x=`7.6.3`;function S(e){return e instanceof Error&&`exitCode`in e&&typeof e.exitCode==`number`}function C(e){return m(_(h(e),{indent:2,replacer(e,t){return typeof t==`function`?t.name:t}}),{colors:{BRACKET:`gray`}})}const w=(e,t,n)=>{let r=[...e];for(let[i,a]of t.entries())r[i]===void 0?r[i]=n.cloneUnlessOtherwiseSpecified(a,n):n.isMergeableObject(a)?r[i]=T(e[i],a,n):e.includes(a)||r.push(a);return r};function T(e,t,n={arrayMerge:w}){return g(e,t,n)}function E(){let e=u();if(e===void 0)throw Error(`No package.json found.`);return a.dirname(e)}function D(){let e=v();return e===null?E():a.resolve(e.location)}function O(e){if(e===`workspace-root`)return D();if(e===`package-dir`)return E();if(typeof e==`string`){if(!r.pathExistsSync(e))throw Error(`Custom cwd directory does not exist: ${e}`);return e}return process.cwd()}async function k(e,t){try{let{default:n}=await import(`prettier`),r=await n.resolveConfig(e),i=await n.format(t,{filepath:e,...r});await y.writeFile(e,i,`utf8`)}catch{console.warn(`Skipped formatting ${e} since Prettier is not installed.`)}}async function A(e){try{await k(e,await y.readFile(e,`utf8`))}catch{}}const j=/\r?\n/;function M(e){return new s({transform(t,n,r){let i=t.toString().split(j).filter(t=>t.trim()!==``&&!e(b(t))).join(`
|
|
3
3
|
`);this.push(i+`
|
|
4
4
|
`),r()}})}function N(e,t){return new s({transform(n,r,i){let a=n.toString().split(j).filter(e=>e.trim().length>0).map(n=>`${e?t===void 0?e:d[t](e):``} ${n}\n`).join(``);this.push(a),i()}})}async function P(e){let t=[];return new Promise((n,r)=>{e.on(`data`,e=>t.push(e)),e.on(`error`,e=>{r(e)}),e.on(`end`,()=>{n(Buffer.concat(t).toString(`utf8`))})})}function F(e,t){return t===1?e:e+`s`}async function I(e,t,n,r,i){let a=1,o;if(r.logPrefix===void 0)o=e;else{let t=N(r.logPrefix,r.logColor);t.pipe(e),o=t}i&&o.write(d.bold(`Running: "${r.name}() with Positional arguments: ${String(t)} and Option flags: ${String(n)}"`));try{a=await r.execute(o,t,n)}catch(e){console.error(String(e)),a=1}return a}async function L(e,t,r,i,a){let s=1,c;if(i.logPrefix===void 0)c=e;else{let t=N(i.logPrefix,i.logColor);t.pipe(e),c=t}let l=i.subcommands??[],u=[...i.receivePositionalArguments?t:[],...i.positionalArguments??[]],d=[...i.receiveOptionFlags?r:[],...i.optionFlags??[]],f=[...l,...d,...u],p=O(i.cwdOverride);a&&c.write(`Running: "${i.name} ${f.join(` `)}"`);let m=i.prettyJsonOutput?new o:c;try{let e=n(i.name,f,{cwd:p,env:{...process.env.NO_COLOR===void 0?{FORCE_COLOR:`true`}:{}},preferLocal:!0,reject:!1,stdin:`inherit`});if(i.outputFilter){let t=M(i.outputFilter),n=M(i.outputFilter);e.stdout.pipe(t).pipe(m,{end:!1}),e.stderr.pipe(n).pipe(m,{end:!1})}else e.stdout.pipe(m,{end:!1}),e.stderr.pipe(m,{end:!1});if(await e,i.prettyJsonOutput){m.end();let e=await P(m),t=C(JSON.parse(e)).split(`
|
|
5
5
|
`);for(let e of t)c.write(`${e}\n`)}s=e.exitCode??1}catch(e){console.error(`${i.name} failed with error:`),console.error(e),S(e)&&(s=typeof e.exitCode==`number`?e.exitCode:1)}return s}function R(e){return`execute`in e}const z=/^ksc-/;function B(e){return e.replace(z,``)}function V(e){return e===void 0||e.length===0?[]:e.flatMap(e=>e.split(`,`)).map(e=>B(e.trim()))}function H(e){return e.option(`skip`,{array:!0,describe:`Tool names to skip (with or without "ksc-" prefix).`,type:`string`})}async function U(e,t,n,r,i,a,o){let s=o??[],c=[],l=[];for(let e of r)s.length>0&&s.includes(B(e.name))?l.push(e):c.push(e);if(s.length>0){let t=new Set(l.map(e=>B(e.name))),n=s.filter(e=>!t.has(e));if(n.length>0){let t=r.map(e=>B(e.name)).join(`, `);e.write(`⚠️ ${d.yellow(`Unrecognized --skip ${F(`value`,n.length)}: ${n.join(`, `)}. Available: ${t}`)}\n`)}}let u=[];for(let r of c){let a=await(R(r)?I(e,t,n,r,i):L(e,t,n,r,i));u.push({exitCode:a,name:r.name})}let f=r.length;if(l.length>0){let t=l.map(({name:e})=>e);e.write(`⏭️ ${d.dim(d.bold(`${t.length} / ${f} ${F(`Command`,t.length)} Skipped:`))} ${d.dim(t.join(`, `))}\n`)}if(a){let t=u.filter(({exitCode:e})=>e===0).map(({name:e})=>e),n=u.filter(({exitCode:e})=>e!==0).map(({name:e})=>e);t.length>0&&e.write(`✅ ${d.green(d.bold(`${t.length} / ${f} ${F(`Command`,t.length)} Succeeded:`))} ${d.green(t.join(`, `))}\n`),n.length>0&&e.write(`❌ ${d.red(d.bold(`${n.length} / ${f} ${F(`Command`,n.length)} Failed:`))} ${d.red(n.join(`, `))}\n`)}return+!u.every(({exitCode:e})=>e===0)}async function W(e,t,n,o){let s=await l();if(s===void 0)throw Error("The `init` command must be used in a directory with a package.json file");let u=await l({cwd:c(import.meta.url)});if(u===void 0)return e.write(`Error: The script being called was not in a package, weird.
|
package/dist/index.d.ts
CHANGED
|
@@ -498,7 +498,6 @@ interface RuleOptions {
|
|
|
498
498
|
curly?: Linter.RuleEntry<Curly>;
|
|
499
499
|
/**
|
|
500
500
|
* Transforms the negation of a conjunction !(A && B) into the equivalent !A
|
|
501
|
-
*
|
|
502
501
|
* || !B according to De Morgan’s law
|
|
503
502
|
*
|
|
504
503
|
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
@@ -2053,6 +2052,13 @@ interface RuleOptions {
|
|
|
2053
2052
|
* @see https://eslint-plugin-package-json.dev/rules/no-empty-fields
|
|
2054
2053
|
*/
|
|
2055
2054
|
'json-package/no-empty-fields'?: Linter.RuleEntry<JsonPackageNoEmptyFields>;
|
|
2055
|
+
/**
|
|
2056
|
+
* Requires that dependencies do not use local file paths, which will likely
|
|
2057
|
+
* result in errors when installing from a registry.
|
|
2058
|
+
*
|
|
2059
|
+
* @see https://eslint-plugin-package-json.dev/rules/no-local-dependencies
|
|
2060
|
+
*/
|
|
2061
|
+
'json-package/no-local-dependencies'?: Linter.RuleEntry<JsonPackageNoLocalDependencies>;
|
|
2056
2062
|
/**
|
|
2057
2063
|
* Prevents adding unnecessary / redundant files.
|
|
2058
2064
|
*
|
|
@@ -2265,6 +2271,12 @@ interface RuleOptions {
|
|
|
2265
2271
|
* @see https://eslint-plugin-package-json.dev/rules/require-properties/require-peerDependencies
|
|
2266
2272
|
*/
|
|
2267
2273
|
'json-package/require-peerDependencies'?: Linter.RuleEntry<JsonPackageRequirePeerDependencies>;
|
|
2274
|
+
/**
|
|
2275
|
+
* Requires the `peerDependenciesMeta` property to be present.
|
|
2276
|
+
*
|
|
2277
|
+
* @see https://eslint-plugin-package-json.dev/rules/require-properties/require-peerDependenciesMeta
|
|
2278
|
+
*/
|
|
2279
|
+
'json-package/require-peerDependenciesMeta'?: Linter.RuleEntry<JsonPackageRequirePeerDependenciesMeta>;
|
|
2268
2280
|
/**
|
|
2269
2281
|
* Requires the `private` property to be present.
|
|
2270
2282
|
*
|
|
@@ -7060,6 +7072,12 @@ interface RuleOptions {
|
|
|
7060
7072
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-navigation-without-resolve/
|
|
7061
7073
|
*/
|
|
7062
7074
|
'svelte/no-navigation-without-resolve'?: Linter.RuleEntry<SvelteNoNavigationWithoutResolve>;
|
|
7075
|
+
/**
|
|
7076
|
+
* Disallow `<style>` elements nested inside other elements or blocks
|
|
7077
|
+
*
|
|
7078
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-nested-style-tag/
|
|
7079
|
+
*/
|
|
7080
|
+
'svelte/no-nested-style-tag'?: Linter.RuleEntry<[]>;
|
|
7063
7081
|
/**
|
|
7064
7082
|
* Disallow use of not function in event handler
|
|
7065
7083
|
*
|
|
@@ -7201,6 +7219,12 @@ interface RuleOptions {
|
|
|
7201
7219
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-const/
|
|
7202
7220
|
*/
|
|
7203
7221
|
'svelte/prefer-const'?: Linter.RuleEntry<SveltePreferConst>;
|
|
7222
|
+
/**
|
|
7223
|
+
* Disallow unnecessary `$derived.by()` when `$derived()` is sufficient
|
|
7224
|
+
*
|
|
7225
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-derived-over-derived-by/
|
|
7226
|
+
*/
|
|
7227
|
+
'svelte/prefer-derived-over-derived-by'?: Linter.RuleEntry<[]>;
|
|
7204
7228
|
/**
|
|
7205
7229
|
* Destructure values from object stores for better change tracking & fewer
|
|
7206
7230
|
* redraws
|
|
@@ -10337,6 +10361,7 @@ type HandleCallbackErr = [] | [string]; // ----- html/attrs-newline -----
|
|
|
10337
10361
|
type HtmlAttrsNewline = [] | [{
|
|
10338
10362
|
closeStyle?: 'newline' | 'sameline';
|
|
10339
10363
|
ifAttrsMoreThan?: number;
|
|
10364
|
+
maxLen?: number;
|
|
10340
10365
|
skip?: string[];
|
|
10341
10366
|
inline?: string[];
|
|
10342
10367
|
}]; // ----- html/element-newline -----
|
|
@@ -10432,6 +10457,7 @@ type HtmlRequireOpenGraphProtocol = [] | [string[]]; // ----- html/sort-attrs --
|
|
|
10432
10457
|
type HtmlSortAttrs = [] | [{
|
|
10433
10458
|
priority?: (string | {
|
|
10434
10459
|
pattern: string;
|
|
10460
|
+
order?: 'preserve' | 'alphabetically';
|
|
10435
10461
|
})[];
|
|
10436
10462
|
}]; // ----- html/use-baseline -----
|
|
10437
10463
|
type HtmlUseBaseline = [] | [{
|
|
@@ -11227,6 +11253,9 @@ type JsonPackageExportsSubpathsStyle = [] | [{
|
|
|
11227
11253
|
}]; // ----- json-package/no-empty-fields -----
|
|
11228
11254
|
type JsonPackageNoEmptyFields = [] | [{
|
|
11229
11255
|
ignoreProperties?: string[];
|
|
11256
|
+
}]; // ----- json-package/no-local-dependencies -----
|
|
11257
|
+
type JsonPackageNoLocalDependencies = [] | [{
|
|
11258
|
+
ignorePrivate?: boolean;
|
|
11230
11259
|
}]; // ----- json-package/order-properties -----
|
|
11231
11260
|
type JsonPackageOrderProperties = [] | [{
|
|
11232
11261
|
order?: 'sort-package-json' | string[];
|
|
@@ -11327,6 +11356,9 @@ type JsonPackageRequirePackageManager = [] | [{
|
|
|
11327
11356
|
}]; // ----- json-package/require-peerDependencies -----
|
|
11328
11357
|
type JsonPackageRequirePeerDependencies = [] | [{
|
|
11329
11358
|
ignorePrivate?: boolean;
|
|
11359
|
+
}]; // ----- json-package/require-peerDependenciesMeta -----
|
|
11360
|
+
type JsonPackageRequirePeerDependenciesMeta = [] | [{
|
|
11361
|
+
ignorePrivate?: boolean;
|
|
11330
11362
|
}]; // ----- json-package/require-publishConfig -----
|
|
11331
11363
|
type JsonPackageRequirePublishConfig = [] | [{
|
|
11332
11364
|
ignorePrivate?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kitschpatrol/eslint-config",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.3",
|
|
4
4
|
"description": "ESLint configuration for @kitschpatrol/shared-config.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"shared-config",
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@e18e/eslint-plugin": "^0.5.0",
|
|
46
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.
|
|
46
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
|
|
47
47
|
"@eslint-react/eslint-plugin": "2.1.1",
|
|
48
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
49
|
-
"@html-eslint/parser": "^0.
|
|
48
|
+
"@html-eslint/eslint-plugin": "^0.61.0",
|
|
49
|
+
"@html-eslint/parser": "^0.61.0",
|
|
50
50
|
"@pinojs/json-colorizer": "^4.0.0",
|
|
51
51
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
53
|
-
"@typescript-eslint/parser": "^8.
|
|
54
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^8.60.0",
|
|
53
|
+
"@typescript-eslint/parser": "^8.60.0",
|
|
54
|
+
"@vitest/eslint-plugin": "^1.6.18",
|
|
55
55
|
"astro-eslint-parser": "^1.4.0",
|
|
56
56
|
"cosmiconfig": "^9.0.1",
|
|
57
57
|
"cosmiconfig-typescript-loader": "^6.3.0",
|
|
@@ -61,33 +61,33 @@
|
|
|
61
61
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
62
62
|
"eslint-flat-config-utils": "^3.2.0",
|
|
63
63
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
64
|
-
"eslint-mdx": "^3.7.
|
|
64
|
+
"eslint-mdx": "^3.7.1",
|
|
65
65
|
"eslint-plugin-astro": "^1.7.0",
|
|
66
66
|
"eslint-plugin-de-morgan": "^2.1.2",
|
|
67
67
|
"eslint-plugin-depend": "^1.5.0",
|
|
68
68
|
"eslint-plugin-html": "^8.1.4",
|
|
69
69
|
"eslint-plugin-import-x": "^4.16.2",
|
|
70
|
-
"eslint-plugin-jsdoc": "^
|
|
71
|
-
"eslint-plugin-jsonc": "^3.
|
|
70
|
+
"eslint-plugin-jsdoc": "^63.0.0",
|
|
71
|
+
"eslint-plugin-jsonc": "^3.2.0",
|
|
72
72
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
73
73
|
"eslint-plugin-math": "^0.13.1",
|
|
74
|
-
"eslint-plugin-mdx": "^3.7.
|
|
74
|
+
"eslint-plugin-mdx": "^3.7.1",
|
|
75
75
|
"eslint-plugin-n": "^18.0.1",
|
|
76
76
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
77
|
-
"eslint-plugin-package-json": "^1.
|
|
77
|
+
"eslint-plugin-package-json": "^1.2.0",
|
|
78
78
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
79
79
|
"eslint-plugin-regexp": "^3.1.0",
|
|
80
|
-
"eslint-plugin-svelte": "^3.
|
|
81
|
-
"eslint-plugin-toml": "^1.
|
|
80
|
+
"eslint-plugin-svelte": "^3.18.0",
|
|
81
|
+
"eslint-plugin-toml": "^1.4.0",
|
|
82
82
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
83
|
-
"eslint-plugin-yml": "^3.
|
|
83
|
+
"eslint-plugin-yml": "^3.4.0",
|
|
84
84
|
"execa": "^9.6.1",
|
|
85
85
|
"find-workspaces": "^0.3.1",
|
|
86
86
|
"fs-extra": "^11.3.5",
|
|
87
87
|
"globals": "^17.6.0",
|
|
88
88
|
"json-stringify-pretty-compact": "^4.0.0",
|
|
89
89
|
"jsonc-eslint-parser": "^3.1.0",
|
|
90
|
-
"local-pkg": "^1.1
|
|
90
|
+
"local-pkg": "^1.2.1",
|
|
91
91
|
"package-up": "^5.0.0",
|
|
92
92
|
"picocolors": "^1.1.1",
|
|
93
93
|
"prettier": "^3.8.3",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"eslint-config-xo-typescript": "^9.0.0",
|
|
106
106
|
"eslint-typegen": "^2.3.1",
|
|
107
107
|
"globby": "^16.2.0",
|
|
108
|
-
"svelte": "^5.55.
|
|
108
|
+
"svelte": "^5.55.10"
|
|
109
109
|
},
|
|
110
110
|
"engines": {
|
|
111
111
|
"node": "^22.22.2 || >=24.0.0"
|