eslint-config-sukka 6.17.1 → 6.18.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/dist/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- import { constants, FlatESLintConfigItem } from '@eslint-sukka/shared';
1
+ import { constants } from '@eslint-sukka/shared';
2
+ import type { FlatESLintConfigItem } from '@eslint-sukka/shared';
2
3
  export { constants } from '@eslint-sukka/shared';
3
4
 
5
+
6
+
4
7
  interface OptionsIgnores {
5
8
  /**
6
9
  * If `customGlobs` is not provided, or provided one is set to `false` or `null`, only the built-in globs will be used.
@@ -15,6 +18,8 @@ interface OptionsIgnores {
15
18
  }
16
19
  declare function ignores(options?: OptionsIgnores): FlatESLintConfigItem[];
17
20
 
21
+
22
+
18
23
  interface OptionsJavaScript {
19
24
  module?: boolean;
20
25
  /**
@@ -63,6 +68,8 @@ interface OptionsJavaScript {
63
68
  };
64
69
  }
65
70
 
71
+
72
+
66
73
  interface OptionsTypeScript {
67
74
  allowJs?: boolean;
68
75
  isInEditor?: boolean;
@@ -72,12 +79,18 @@ interface OptionsTypeScript {
72
79
  allowDefaultProject?: string[];
73
80
  }
74
81
 
82
+
83
+
75
84
  interface OptionsLegacy {
76
85
  browser?: boolean;
77
86
  node?: boolean;
78
87
  files?: FlatESLintConfigItem['files'];
79
88
  }
80
89
 
90
+
91
+
92
+
93
+
81
94
  interface EslintReactAdditionalComponents {
82
95
  name: string;
83
96
  as: string;
@@ -105,6 +118,8 @@ interface OptionsReact {
105
118
  };
106
119
  }
107
120
 
121
+
122
+
108
123
  interface OptionsStyleX {
109
124
  opt?: StyleXESLintOptions;
110
125
  }
@@ -121,6 +136,14 @@ interface PropLimits {
121
136
  };
122
137
  }
123
138
 
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
124
147
  interface OptionsNode {
125
148
  strict?: boolean;
126
149
  module?: boolean;
@@ -129,6 +152,17 @@ interface OptionsNode {
129
152
  hasReact?: boolean;
130
153
  }
131
154
 
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
132
166
  type SharedOptions<T = object> = Omit<T, 'isInEditor' | 'enable'> & {
133
167
  enable?: boolean;
134
168
  };
@@ -16,4 +16,4 @@ ${ur(this.state)} ${u.message}
16
16
  `,r=this.value?D:e;switch(this.state){case"submit":return`${t}${F.gray(uu)} ${F.dim(r)}`;case"cancel":return`${t}${F.gray(uu)} ${F.strikethrough(F.dim(r))}
17
17
  ${F.gray(uu)}`;default:return`${t}${F.cyan(uu)} ${this.value?`${F.green(ue)} ${D}`:`${F.dim(ut)} ${F.dim(D)}`} ${F.dim("/")} ${this.value?`${F.dim(ut)} ${F.dim(e)}`:`${F.green(ue)} ${e}`}
18
18
  ${F.cyan(uD)}
19
- `}}}).prompt()}});const ui=Symbol.for("quansync.getIsAsync"),us="[Quansync] Yielded an unexpected promise in sync context";function uF(u){return u&&"object"==typeof u&&"function"==typeof u.then}function uo(u){let D=function*(...D){return(yield ui)?yield u.async.apply(this,D):u.sync.apply(this,D)};function e(...t){let r=D.apply(this,t);return r.then=(...D)=>u.async.apply(this,t).then(...D),r.__quansync=!0,r}return e.sync=u.sync,e.async=u.async,e}function uC(u,D){if(u===ui)return D;if(u&&"object"==typeof u&&"function"==typeof u[Symbol.iterator]&&"__quansync"in u)return D?uE(u):ua(u);if(!D&&uF(u))throw Error(us);return u}function ua(u){let D=u.next();for(;!D.done;)try{D=u.next(uC(D.value))}catch(e){D=u.throw(e)}return uC(D.value)}async function uE(u){let D=u.next();for(;!D.done;)try{D=u.next(await uC(D.value,!0))}catch(e){D=u.throw(e)}return D.value}const ul=function(u){return uF(u)?uo({async:()=>Promise.resolve(u),sync:()=>{if(uF(u))throw Error(us);return u}}):"function"!=typeof u?uo(u):uo({name:u.name,async(...D){return uE(u.apply(this,D))},sync(...D){return ua(u.apply(this,D))}})},uc=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],uh={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},up=ul({sync:u=>{try{return o.statSync(u).isFile()}catch{return!1}},async:async u=>{try{return(await o.promises.stat(u)).isFile()}catch{return!1}}}),uB=ul(function*(u,D){return u&&(yield up(u))?function(u,D){try{let e;let t=JSON.parse(o.readFileSync(u,"utf8"));if("string"==typeof t.packageManager){let[u,r]=t.packageManager.replace(/^\^/,"").split("@"),n=r;if("yarn"===u&&Number.parseInt(r)>1)return e="yarn@berry",n="berry",{name:u,agent:e,version:n};if("pnpm"===u&&7>Number.parseInt(r))return e="pnpm@6",{name:u,agent:e,version:n};if(uc.includes(u))return e=u,{name:u,agent:e,version:n};else return D?.(t.packageManager)??null}}catch{}return null}(u,D):null}),ud=ul(function*(u={}){let{cwd:D,onUnknown:e}=u;for(let u of function*(u=n.cwd()){let D=C.resolve(u),{root:e}=C.parse(D);for(;D&&D!==e;)yield D,D=C.dirname(D)}(D)){for(let D of Object.keys(uh))if(yield up(C.join(u,D))){let t=uh[D],r=yield uB(C.join(u,"package.json"),e);if(r)return r;return{name:t,agent:t}}let D=yield uB(C.join(u,"package.json"),e);if(D)return D}return null});ud.sync;const uf=a.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:B&&"SCRIPT"===B.tagName.toUpperCase()&&B.src||new URL("vendor-CxX8zK-R.cjs",document.baseURI).href);var um=Object.create,uA=Object.defineProperty,ug=Object.getOwnPropertyDescriptor,uy=Object.getOwnPropertyNames,ub=Object.getPrototypeOf,uv=Object.prototype.hasOwnProperty,uw=(u=function(u){if("u">typeof uf)return uf.apply(this,arguments);throw Error('Dynamic require of "'+u+'" is not supported')},"u">typeof uf?uf:"u">typeof Proxy?new Proxy(u,{get:(u,D)=>("u">typeof uf?uf:u)[D]}):u),u_=(u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),ux=u_((u,D)=>{D.exports=r,r.sync=function(u,D){return t(e.statSync(u),u,D)};var e=uw("fs");function t(u,D,e){return!!(u.isSymbolicLink()||u.isFile())&&function(u,D){var e=void 0!==D.pathExt?D.pathExt:process.env.PATHEXT;if(!e||-1!==(e=e.split(";")).indexOf(""))return!0;for(var t=0;t<e.length;t++){var r=e[t].toLowerCase();if(r&&u.substr(-r.length).toLowerCase()===r)return!0}return!1}(D,e)}function r(u,D,r){e.stat(u,function(e,n){r(e,!e&&t(n,u,D))})}}),u$=u_((u,D)=>{D.exports=t,t.sync=function(u,D){return r(e.statSync(u),D)};var e=uw("fs");function t(u,D,t){e.stat(u,function(u,e){t(u,!u&&r(e,D))})}function r(u,D){var e,t,r,n,i,s,F,o,C;return u.isFile()&&(e=u,t=D,r=e.mode,n=e.uid,i=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),F=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),C=parseInt("010",8),r&parseInt("001",8)||r&C&&i===F||r&o&&n===s||r&(o|C)&&0===s)}}),uO=u_((u,D)=>{var e;function t(u,D,r){if("function"==typeof D&&(r=D,D={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(e,r){t(u,D||{},function(u,D){u?r(u):e(D)})})}e(u,D||{},function(u,e){u&&("EACCES"===u.code||D&&D.ignoreErrors)&&(u=null,e=!1),r(u,e)})}uw("fs"),e="win32"===process.platform||global.TESTING_WINDOWS?ux():u$(),D.exports=t,t.sync=function(u,D){try{return e.sync(u,D||{})}catch(u){if(D&&D.ignoreErrors||"EACCES"===u.code)return!1;throw u}}}),uk=u_((u,D)=>{var e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=uw("path"),r=e?";":":",n=uO(),i=u=>Object.assign(Error(`not found: ${u}`),{code:"ENOENT"}),s=(u,D)=>{let t=D.colon||r,n=u.match(/\//)||e&&u.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(t)],i=e?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=e?i.split(t):[""];return e&&-1!==u.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},F=(u,D,e)=>{"function"==typeof D&&(e=D,D={}),D||(D={});let{pathEnv:r,pathExt:F,pathExtExe:o}=s(u,D),C=[],a=e=>new Promise((n,s)=>{if(e===r.length)return D.all&&C.length?n(C):s(i(u));let F=r[e],o=/^".*"$/.test(F)?F.slice(1,-1):F,a=t.join(o,u);n(E(!o&&/^\.[\\\/]/.test(u)?u.slice(0,2)+a:a,e,0))}),E=(u,e,t)=>new Promise((r,i)=>{if(t===F.length)return r(a(e+1));let s=F[t];n(u+s,{pathExt:o},(n,i)=>{if(!n&&i){if(!D.all)return r(u+s);C.push(u+s)}return r(E(u,e,t+1))})});return e?a(0).then(u=>e(null,u),e):a(0)};D.exports=F,F.sync=(u,D)=>{let{pathEnv:e,pathExt:r,pathExtExe:F}=s(u,D=D||{}),o=[];for(let i=0;i<e.length;i++){let s=e[i],C=/^".*"$/.test(s)?s.slice(1,-1):s,a=t.join(C,u),E=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+a:a;for(let u=0;u<r.length;u++){let e=E+r[u];try{if(n.sync(e,{pathExt:F})){if(!D.all)return e;o.push(e)}}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw i(u)}}),uS=u_((u,D)=>{var e=(u={})=>{let D=u.env||process.env;return"win32"!==(u.platform||process.platform)?"PATH":Object.keys(D).reverse().find(u=>"PATH"===u.toUpperCase())||"Path"};D.exports=e,D.exports.default=e}),uT=u_((u,D)=>{var e=uw("path"),t=uk(),r=uS();function n(u,D){let n,i=u.options.env||process.env,s=process.cwd(),F=null!=u.options.cwd,o=F&&void 0!==process.chdir&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}try{n=t.sync(u.command,{path:i[r({env:i})],pathExt:D?e.delimiter:void 0})}catch{}finally{o&&process.chdir(s)}return n&&(n=e.resolve(F?u.options.cwd:"",n)),n}D.exports=function(u){return n(u)||n(u,!0)}}),uj=u_((u,D)=>{var e=/([()\][%!^"`<>&|;, *?])/g;D.exports.command=function(u){return u=u.replace(e,"^$1")},D.exports.argument=function(u,D){return u=(u=(u=`${u}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1"),u=(u=`"${u}"`).replace(e,"^$1"),D&&(u=u.replace(e,"^$1")),u}}),uP=u_((u,D)=>{D.exports=/^#!(.*)/}),uM=u_((u,D)=>{var e=uP();D.exports=(u="")=>{let D=u.match(e);if(!D)return null;let[t,r]=D[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return"env"===n?r:r?`${n} ${r}`:n}}),uN=u_((u,D)=>{var e=uw("fs"),t=uM();D.exports=function(u){let D=Buffer.alloc(150),r;try{r=e.openSync(u,"r"),e.readSync(r,D,0,150,0),e.closeSync(r)}catch{}return t(D.toString())}}),uR=u_((u,D)=>{var e=uw("path"),t=uT(),r=uj(),n=uN(),i="win32"===process.platform,s=/\.(?:com|exe)$/i,F=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;D.exports=function(u,D,o){D&&!Array.isArray(D)&&(o=D,D=null);let C={command:u,args:D=D?D.slice(0):[],options:o=Object.assign({},o),file:void 0,original:{command:u,args:D}};return o.shell?C:function(u){let D;if(!i)return u;let o=(u.file=t(u),(D=u.file&&n(u.file))?(u.args.unshift(u.file),u.command=D,t(u)):u.file),C=!s.test(o);if(u.options.forceShell||C){let D=F.test(o);u.command=e.normalize(u.command),u.command=r.command(u.command),u.args=u.args.map(u=>r.argument(u,D));let t=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${t}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}(C)}}),uL=u_((u,D)=>{var e="win32"===process.platform;function t(u,D){return Object.assign(Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}function r(u,D){return e&&1===u&&!D.file?t(D.original,"spawn"):null}D.exports={hookChildProcess:function(u,D){if(!e)return;let t=u.emit;u.emit=function(e,n){if("exit"===e){let e=r(n,D);if(e)return t.call(u,"error",e)}return t.apply(u,arguments)}},verifyENOENT:r,verifyENOENTSync:function(u,D){return e&&1===u&&!D.file?t(D.original,"spawnSync"):null},notFoundError:t}}),uq=u_((u,D)=>{var e=uw("child_process"),t=uR(),r=uL();function n(u,D,n){let i=t(u,D,n),s=e.spawn(i.command,i.args,i.options);return r.hookChildProcess(s,i),s}D.exports=n,D.exports.spawn=n,D.exports.sync=function(u,D,n){let i=t(u,D,n),s=e.spawnSync(i.command,i.args,i.options);return s.error=s.error||r.verifyENOENTSync(s.status,i),s},D.exports._parse=t,D.exports._enoent=r}),uI=/^path$/i,uW={key:"PATH",value:""},uz=u=>{let D=u.length,e=new h.PassThrough,t=()=>{0==--D&&e.emit("end")};for(let D of u)D.pipe(e,{end:!1}),D.on("end",t);return e},uU=((u,D,e,t)=>{if(D&&"object"==typeof D||"function"==typeof D)for(let r of uy(D))uv.call(u,r)||r===e||uA(u,r,{get:()=>D[r],enumerable:!(t=ug(D,r))||t.enumerable});return u})(uA(null!=(D=uq())?um(ub(D)):{},"default",{value:D,enumerable:!0}),D),uG=class extends Error{result;output;get exitCode(){if(null!==this.result.exitCode)return this.result.exitCode}constructor(u,D){super(`Process exited with non-zero status (${u.exitCode})`),this.result=u,this.output=D}},uH={timeout:void 0,persist:!1},uK={windowsHide:!0},uY=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&null!==this._process.exitCode)return this._process.exitCode}constructor(u,D,e){this._options={...uH,...e},this._command=u,this._args=D??[],this._processClosed=new Promise(u=>{this._resolveClose=u})}kill(u){return this._process?.kill(u)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(u,D,e){return uV(u,D,{...e,stdin:this})}async *[Symbol.asyncIterator](){let u=this._process;if(!u)return;let D=[];this._streamErr&&D.push(this._streamErr),this._streamOut&&D.push(this._streamOut);let e=uz(D);for await(let u of p.createInterface({input:e}))yield u.toString();if(await this._processClosed,u.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&0!==this.exitCode&&void 0!==this.exitCode)throw new uG(this)}async _waitForOutput(){let u=this._process;if(!u)throw Error("No process was started");let D="",e="";if(this._streamOut)for await(let u of this._streamOut)e+=u.toString();if(this._streamErr)for await(let u of this._streamErr)D+=u.toString();if(await this._processClosed,this._options?.stdin&&await this._options.stdin,u.removeAllListeners(),this._thrownError)throw this._thrownError;let t={stderr:D,stdout:e,exitCode:this.exitCode};if(this._options.throwOnError&&0!==this.exitCode&&void 0!==this.exitCode)throw new uG(this,t);return t}then(u,D){return this._waitForOutput().then(u,D)}_streamOut;_streamErr;spawn(){var u,D,e;let t,r,n=c.cwd(),i=this._options,s={...uK,...i.nodeOptions},F=[];this._resetState(),void 0!==i.timeout&&F.push(AbortSignal.timeout(i.timeout)),void 0!==i.signal&&F.push(i.signal),!0===i.persist&&(s.detached=!0),F.length>0&&(s.signal=function(u){let D=new AbortController;for(let e of u){if(e.aborted)return D.abort(),e;let u=()=>{D.abort(e.reason)};e.addEventListener("abort",u,{signal:D.signal})}return D.signal}(F)),u=s.env,r=function(u,D){let e=D.value.split(l.delimiter),t=u,r;do e.push(l.resolve(t,"node_modules",".bin")),r=t,t=l.dirname(t);while(t!==r);return{key:D.key,value:e.join(l.delimiter)}}(n,function(u){for(let D in u){if(!Object.prototype.hasOwnProperty.call(u,D)||!uI.test(D))continue;let e=u[D];return e?{key:D,value:e}:uW}return uW}(t={...process.env,...u})),t[r.key]=r.value,s.env=t;let{command:o,args:C}=(D=this._command,e=this._args,{command:l.normalize(D),args:e??[]}),a=(0,uU._parse)(o,C,s),h=E.spawn(a.command,a.args,a.options);if(h.stderr&&(this._streamErr=h.stderr),h.stdout&&(this._streamOut=h.stdout),this._process=h,h.once("error",this._onError),h.once("close",this._onClose),void 0!==i.stdin&&h.stdin&&i.stdin.process){let{stdout:u}=i.stdin.process;u&&u.pipe(h.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(u=>{this._resolveClose=u}),this._thrownError=void 0}_onError=u=>{if("AbortError"===u.name&&(!(u.cause instanceof Error)||"TimeoutError"!==u.cause.name)){this._aborted=!0;return}this._thrownError=u};_onClose=()=>{this._resolveClose&&this._resolveClose()}},uJ=(u,D,e)=>{let t=new uY(u,D,e);return t.spawn(),t},uV=uJ;async function uZ(u=n.cwd()){let D=await ud({cwd:u,onUnknown(u){console.warn("[@antfu/install-pkg] Unknown packageManager:",u)}});return D?.agent||null}async function uX(u,D={}){let e=D.packageManager||await uZ(D.cwd)||"npm",[t]=e.split("@");Array.isArray(u)||(u=[u]);let r=("function"==typeof D.additionalArgs?D.additionalArgs(t,e):D.additionalArgs)||[];return D.preferOffline&&("yarn@berry"===e?r.unshift("--cached"):r.unshift("--prefer-offline")),"pnpm"===t&&o.existsSync(C.resolve(D.cwd??n.cwd(),"pnpm-workspace.yaml"))&&r.unshift("-w","--prod=false"),uJ(t,["yarn"===t?"add":"install",D.dev?"-D":"",...r,...u].filter(Boolean),{nodeOptions:{stdio:D.silent?"ignore":"inherit",cwd:D.cwd},throwOnError:!0})}var uQ=Object.freeze({__proto__:null,detectPackageManager:uZ,installPackage:uX});exports.a=function(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u},exports.b=uQ,exports.g=function(u){if(Object.prototype.hasOwnProperty.call(u,"__esModule"))return u;var D=u.default;if("function"==typeof D){var e=function u(){return this instanceof u?Reflect.construct(D,arguments,this.constructor):D.apply(this,arguments)};e.prototype=D.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(u).forEach(function(D){var t=Object.getOwnPropertyDescriptor(u,D);Object.defineProperty(e,D,t.get?t:{enumerable:!0,get:function(){return u[D]}})}),e},exports.i=un;
19
+ `}}}).prompt()}});const ui=Symbol.for("quansync.getIsAsync"),us="[Quansync] Yielded an unexpected promise in sync context";function uF(u){return u&&"object"==typeof u&&"function"==typeof u.then}function uo(u){let D=function*(...D){return(yield ui)?yield u.async.apply(this,D):u.sync.apply(this,D)};function e(...t){let r=D.apply(this,t);return r.then=(...D)=>u.async.apply(this,t).then(...D),r.__quansync=!0,r}return e.sync=u.sync,e.async=u.async,e}function uC(u,D){if(u===ui)return D;if(u&&"object"==typeof u&&"function"==typeof u[Symbol.iterator]&&"__quansync"in u)return D?uE(u):ua(u);if(!D&&uF(u))throw Error(us);return u}function ua(u){let D=u.next();for(;!D.done;)try{D=u.next(uC(D.value))}catch(e){D=u.throw(e)}return uC(D.value)}async function uE(u){let D=u.next();for(;!D.done;)try{D=u.next(await uC(D.value,!0))}catch(e){D=u.throw(e)}return D.value}const ul=function(u){return uF(u)?uo({async:()=>Promise.resolve(u),sync:()=>{if(uF(u))throw Error(us);return u}}):"function"!=typeof u?uo(u):uo({name:u.name,async(...D){return uE(u.apply(this,D))},sync(...D){return ua(u.apply(this,D))}})},uc=["npm","yarn","yarn@berry","pnpm","pnpm@6","bun","deno"],uh={"bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","pnpm-lock.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},up=ul({sync:u=>{try{return o.statSync(u).isFile()}catch{return!1}},async:async u=>{try{return(await o.promises.stat(u)).isFile()}catch{return!1}}}),uB=ul(function*(u,D){return u&&(yield up(u))?function(u,D){try{let e,t=JSON.parse(o.readFileSync(u,"utf8"));if("string"==typeof t.packageManager){let[u,r]=t.packageManager.replace(/^\^/,"").split("@"),n=r;if("yarn"===u&&Number.parseInt(r)>1)return e="yarn@berry",n="berry",{name:u,agent:e,version:n};if("pnpm"===u&&7>Number.parseInt(r))return e="pnpm@6",{name:u,agent:e,version:n};if(uc.includes(u))return e=u,{name:u,agent:e,version:n};else return D?.(t.packageManager)??null}}catch{}return null}(u,D):null}),ud=ul(function*(u={}){let{cwd:D,onUnknown:e}=u;for(let u of function*(u=n.cwd()){let D=C.resolve(u),{root:e}=C.parse(D);for(;D&&D!==e;)yield D,D=C.dirname(D)}(D)){for(let D of Object.keys(uh))if(yield up(C.join(u,D))){let t=uh[D],r=yield uB(C.join(u,"package.json"),e);if(r)return r;return{name:t,agent:t}}let D=yield uB(C.join(u,"package.json"),e);if(D)return D}return null});ud.sync;const uf=a.createRequire("undefined"==typeof document?require("url").pathToFileURL(__filename).href:B&&"SCRIPT"===B.tagName.toUpperCase()&&B.src||new URL("vendor-B-Kaqfoj.cjs",document.baseURI).href);var um=Object.create,uA=Object.defineProperty,ug=Object.getOwnPropertyDescriptor,uy=Object.getOwnPropertyNames,ub=Object.getPrototypeOf,uv=Object.prototype.hasOwnProperty,uw=(u=function(u){if("u">typeof uf)return uf.apply(this,arguments);throw Error('Dynamic require of "'+u+'" is not supported')},"u">typeof uf?uf:"u">typeof Proxy?new Proxy(u,{get:(u,D)=>("u">typeof uf?uf:u)[D]}):u),u_=(u,D)=>()=>(D||u((D={exports:{}}).exports,D),D.exports),ux=u_((u,D)=>{D.exports=r,r.sync=function(u,D){return t(e.statSync(u),u,D)};var e=uw("fs");function t(u,D,e){return!!(u.isSymbolicLink()||u.isFile())&&function(u,D){var e=void 0!==D.pathExt?D.pathExt:process.env.PATHEXT;if(!e||-1!==(e=e.split(";")).indexOf(""))return!0;for(var t=0;t<e.length;t++){var r=e[t].toLowerCase();if(r&&u.substr(-r.length).toLowerCase()===r)return!0}return!1}(D,e)}function r(u,D,r){e.stat(u,function(e,n){r(e,!e&&t(n,u,D))})}}),u$=u_((u,D)=>{D.exports=t,t.sync=function(u,D){return r(e.statSync(u),D)};var e=uw("fs");function t(u,D,t){e.stat(u,function(u,e){t(u,!u&&r(e,D))})}function r(u,D){var e,t,r,n,i,s,F,o,C;return u.isFile()&&(e=u,t=D,r=e.mode,n=e.uid,i=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),F=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),C=parseInt("010",8),r&parseInt("001",8)||r&C&&i===F||r&o&&n===s||r&(o|C)&&0===s)}}),uO=u_((u,D)=>{var e;function t(u,D,r){if("function"==typeof D&&(r=D,D={}),!r){if("function"!=typeof Promise)throw TypeError("callback not provided");return new Promise(function(e,r){t(u,D||{},function(u,D){u?r(u):e(D)})})}e(u,D||{},function(u,e){u&&("EACCES"===u.code||D&&D.ignoreErrors)&&(u=null,e=!1),r(u,e)})}uw("fs"),e="win32"===process.platform||global.TESTING_WINDOWS?ux():u$(),D.exports=t,t.sync=function(u,D){try{return e.sync(u,D||{})}catch(u){if(D&&D.ignoreErrors||"EACCES"===u.code)return!1;throw u}}}),uk=u_((u,D)=>{var e="win32"===process.platform||"cygwin"===process.env.OSTYPE||"msys"===process.env.OSTYPE,t=uw("path"),r=e?";":":",n=uO(),i=u=>Object.assign(Error(`not found: ${u}`),{code:"ENOENT"}),s=(u,D)=>{let t=D.colon||r,n=u.match(/\//)||e&&u.match(/\\/)?[""]:[...e?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(t)],i=e?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=e?i.split(t):[""];return e&&-1!==u.indexOf(".")&&""!==s[0]&&s.unshift(""),{pathEnv:n,pathExt:s,pathExtExe:i}},F=(u,D,e)=>{"function"==typeof D&&(e=D,D={}),D||(D={});let{pathEnv:r,pathExt:F,pathExtExe:o}=s(u,D),C=[],a=e=>new Promise((n,s)=>{if(e===r.length)return D.all&&C.length?n(C):s(i(u));let F=r[e],o=/^".*"$/.test(F)?F.slice(1,-1):F,a=t.join(o,u);n(E(!o&&/^\.[\\\/]/.test(u)?u.slice(0,2)+a:a,e,0))}),E=(u,e,t)=>new Promise((r,i)=>{if(t===F.length)return r(a(e+1));let s=F[t];n(u+s,{pathExt:o},(n,i)=>{if(!n&&i){if(!D.all)return r(u+s);C.push(u+s)}return r(E(u,e,t+1))})});return e?a(0).then(u=>e(null,u),e):a(0)};D.exports=F,F.sync=(u,D)=>{let{pathEnv:e,pathExt:r,pathExtExe:F}=s(u,D=D||{}),o=[];for(let i=0;i<e.length;i++){let s=e[i],C=/^".*"$/.test(s)?s.slice(1,-1):s,a=t.join(C,u),E=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+a:a;for(let u=0;u<r.length;u++){let e=E+r[u];try{if(n.sync(e,{pathExt:F})){if(!D.all)return e;o.push(e)}}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw i(u)}}),uS=u_((u,D)=>{var e=(u={})=>{let D=u.env||process.env;return"win32"!==(u.platform||process.platform)?"PATH":Object.keys(D).reverse().find(u=>"PATH"===u.toUpperCase())||"Path"};D.exports=e,D.exports.default=e}),uT=u_((u,D)=>{var e=uw("path"),t=uk(),r=uS();function n(u,D){let n,i=u.options.env||process.env,s=process.cwd(),F=null!=u.options.cwd,o=F&&void 0!==process.chdir&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}try{n=t.sync(u.command,{path:i[r({env:i})],pathExt:D?e.delimiter:void 0})}catch{}finally{o&&process.chdir(s)}return n&&(n=e.resolve(F?u.options.cwd:"",n)),n}D.exports=function(u){return n(u)||n(u,!0)}}),uj=u_((u,D)=>{var e=/([()\][%!^"`<>&|;, *?])/g;D.exports.command=function(u){return u=u.replace(e,"^$1")},D.exports.argument=function(u,D){return u=(u=(u=`${u}`).replace(/(\\*)"/g,'$1$1\\"')).replace(/(\\*)$/,"$1$1"),u=(u=`"${u}"`).replace(e,"^$1"),D&&(u=u.replace(e,"^$1")),u}}),uP=u_((u,D)=>{D.exports=/^#!(.*)/}),uM=u_((u,D)=>{var e=uP();D.exports=(u="")=>{let D=u.match(e);if(!D)return null;let[t,r]=D[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return"env"===n?r:r?`${n} ${r}`:n}}),uN=u_((u,D)=>{var e=uw("fs"),t=uM();D.exports=function(u){let D=Buffer.alloc(150),r;try{r=e.openSync(u,"r"),e.readSync(r,D,0,150,0),e.closeSync(r)}catch{}return t(D.toString())}}),uR=u_((u,D)=>{var e=uw("path"),t=uT(),r=uj(),n=uN(),i="win32"===process.platform,s=/\.(?:com|exe)$/i,F=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;D.exports=function(u,D,o){D&&!Array.isArray(D)&&(o=D,D=null);let C={command:u,args:D=D?D.slice(0):[],options:o=Object.assign({},o),file:void 0,original:{command:u,args:D}};return o.shell?C:function(u){let D;if(!i)return u;let o=(u.file=t(u),(D=u.file&&n(u.file))?(u.args.unshift(u.file),u.command=D,t(u)):u.file),C=!s.test(o);if(u.options.forceShell||C){let D=F.test(o);u.command=e.normalize(u.command),u.command=r.command(u.command),u.args=u.args.map(u=>r.argument(u,D));let t=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${t}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}(C)}}),uL=u_((u,D)=>{var e="win32"===process.platform;function t(u,D){return Object.assign(Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}function r(u,D){return e&&1===u&&!D.file?t(D.original,"spawn"):null}D.exports={hookChildProcess:function(u,D){if(!e)return;let t=u.emit;u.emit=function(e,n){if("exit"===e){let e=r(n,D);if(e)return t.call(u,"error",e)}return t.apply(u,arguments)}},verifyENOENT:r,verifyENOENTSync:function(u,D){return e&&1===u&&!D.file?t(D.original,"spawnSync"):null},notFoundError:t}}),uq=u_((u,D)=>{var e=uw("child_process"),t=uR(),r=uL();function n(u,D,n){let i=t(u,D,n),s=e.spawn(i.command,i.args,i.options);return r.hookChildProcess(s,i),s}D.exports=n,D.exports.spawn=n,D.exports.sync=function(u,D,n){let i=t(u,D,n),s=e.spawnSync(i.command,i.args,i.options);return s.error=s.error||r.verifyENOENTSync(s.status,i),s},D.exports._parse=t,D.exports._enoent=r}),uI=/^path$/i,uW={key:"PATH",value:""},uz=u=>{let D=u.length,e=new h.PassThrough,t=()=>{0==--D&&e.emit("end")};for(let D of u)D.pipe(e,{end:!1}),D.on("end",t);return e},uU=((u,D,e,t)=>{if(D&&"object"==typeof D||"function"==typeof D)for(let r of uy(D))uv.call(u,r)||r===e||uA(u,r,{get:()=>D[r],enumerable:!(t=ug(D,r))||t.enumerable});return u})(uA(null!=(D=uq())?um(ub(D)):{},"default",{value:D,enumerable:!0}),D),uG=class extends Error{result;output;get exitCode(){if(null!==this.result.exitCode)return this.result.exitCode}constructor(u,D){super(`Process exited with non-zero status (${u.exitCode})`),this.result=u,this.output=D}},uH={timeout:void 0,persist:!1},uK={windowsHide:!0},uY=class{_process;_aborted=!1;_options;_command;_args;_resolveClose;_processClosed;_thrownError;get process(){return this._process}get pid(){return this._process?.pid}get exitCode(){if(this._process&&null!==this._process.exitCode)return this._process.exitCode}constructor(u,D,e){this._options={...uH,...e},this._command=u,this._args=D??[],this._processClosed=new Promise(u=>{this._resolveClose=u})}kill(u){return this._process?.kill(u)===!0}get aborted(){return this._aborted}get killed(){return this._process?.killed===!0}pipe(u,D,e){return uV(u,D,{...e,stdin:this})}async *[Symbol.asyncIterator](){let u=this._process;if(!u)return;let D=[];this._streamErr&&D.push(this._streamErr),this._streamOut&&D.push(this._streamOut);let e=uz(D);for await(let u of p.createInterface({input:e}))yield u.toString();if(await this._processClosed,u.removeAllListeners(),this._thrownError)throw this._thrownError;if(this._options?.throwOnError&&0!==this.exitCode&&void 0!==this.exitCode)throw new uG(this)}async _waitForOutput(){let u=this._process;if(!u)throw Error("No process was started");let D="",e="";if(this._streamOut)for await(let u of this._streamOut)e+=u.toString();if(this._streamErr)for await(let u of this._streamErr)D+=u.toString();if(await this._processClosed,this._options?.stdin&&await this._options.stdin,u.removeAllListeners(),this._thrownError)throw this._thrownError;let t={stderr:D,stdout:e,exitCode:this.exitCode};if(this._options.throwOnError&&0!==this.exitCode&&void 0!==this.exitCode)throw new uG(this,t);return t}then(u,D){return this._waitForOutput().then(u,D)}_streamOut;_streamErr;spawn(){var u,D,e;let t,r,n=c.cwd(),i=this._options,s={...uK,...i.nodeOptions},F=[];this._resetState(),void 0!==i.timeout&&F.push(AbortSignal.timeout(i.timeout)),void 0!==i.signal&&F.push(i.signal),!0===i.persist&&(s.detached=!0),F.length>0&&(s.signal=function(u){let D=new AbortController;for(let e of u){if(e.aborted)return D.abort(),e;let u=()=>{D.abort(e.reason)};e.addEventListener("abort",u,{signal:D.signal})}return D.signal}(F)),u=s.env,r=function(u,D){let e=D.value.split(l.delimiter),t=u,r;do e.push(l.resolve(t,"node_modules",".bin")),r=t,t=l.dirname(t);while(t!==r);return{key:D.key,value:e.join(l.delimiter)}}(n,function(u){for(let D in u){if(!Object.prototype.hasOwnProperty.call(u,D)||!uI.test(D))continue;let e=u[D];return e?{key:D,value:e}:uW}return uW}(t={...process.env,...u})),t[r.key]=r.value,s.env=t;let{command:o,args:C}=(D=this._command,e=this._args,{command:l.normalize(D),args:e??[]}),a=(0,uU._parse)(o,C,s),h=E.spawn(a.command,a.args,a.options);if(h.stderr&&(this._streamErr=h.stderr),h.stdout&&(this._streamOut=h.stdout),this._process=h,h.once("error",this._onError),h.once("close",this._onClose),void 0!==i.stdin&&h.stdin&&i.stdin.process){let{stdout:u}=i.stdin.process;u&&u.pipe(h.stdin)}}_resetState(){this._aborted=!1,this._processClosed=new Promise(u=>{this._resolveClose=u}),this._thrownError=void 0}_onError=u=>{if("AbortError"===u.name&&(!(u.cause instanceof Error)||"TimeoutError"!==u.cause.name)){this._aborted=!0;return}this._thrownError=u};_onClose=()=>{this._resolveClose&&this._resolveClose()}},uJ=(u,D,e)=>{let t=new uY(u,D,e);return t.spawn(),t},uV=uJ;async function uZ(u=n.cwd()){let D=await ud({cwd:u,onUnknown(u){console.warn("[@antfu/install-pkg] Unknown packageManager:",u)}});return D?.agent||null}async function uX(u,D={}){let e=D.packageManager||await uZ(D.cwd)||"npm",[t]=e.split("@");Array.isArray(u)||(u=[u]);let r=("function"==typeof D.additionalArgs?D.additionalArgs(t,e):D.additionalArgs)||[];return D.preferOffline&&("yarn@berry"===e?r.unshift("--cached"):r.unshift("--prefer-offline")),"pnpm"===t&&o.existsSync(C.resolve(D.cwd??n.cwd(),"pnpm-workspace.yaml"))&&r.unshift("-w","--prod=false"),uJ(t,["yarn"===t?"add":"install",D.dev?"-D":"",...r,...u].filter(Boolean),{nodeOptions:{stdio:D.silent?"ignore":"inherit",cwd:D.cwd},throwOnError:!0})}var uQ=Object.freeze({__proto__:null,detectPackageManager:uZ,installPackage:uX});exports.a=function(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u},exports.b=uQ,exports.g=function(u){if(Object.prototype.hasOwnProperty.call(u,"__esModule"))return u;var D=u.default;if("function"==typeof D){var e=function u(){return this instanceof u?Reflect.construct(D,arguments,this.constructor):D.apply(this,arguments)};e.prototype=D.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(u).forEach(function(D){var t=Object.getOwnPropertyDescriptor(u,D);Object.defineProperty(e,D,t.get?t:{enumerable:!0,get:function(){return u[D]}})}),e},exports.i=un;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-sukka",
3
- "version": "6.17.1",
3
+ "version": "6.18.0",
4
4
  "description": "Sukka's ESLint config",
5
5
  "homepage": "https://github.com/SukkaW/eslint-config-sukka",
6
6
  "repository": {
@@ -28,23 +28,24 @@
28
28
  "dependencies": {
29
29
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
30
30
  "@eslint/js": "^9.22.0",
31
- "@typescript-eslint/parser": "^8.26.1",
31
+ "@typescript-eslint/parser": "^8.27.0",
32
32
  "ci-info": "^4.2.0",
33
33
  "defu": "^6.1.4",
34
- "eslint-import-resolver-oxc": "^0.13.1",
34
+ "eslint-import-resolver-typescript": "^4.2.2",
35
35
  "eslint-plugin-autofix": "^2.2.0",
36
36
  "eslint-plugin-de-morgan": "^1.2.1",
37
- "eslint-plugin-import-x": "^4.6.1",
37
+ "eslint-plugin-import-x": "^4.9.1",
38
38
  "eslint-plugin-jsonc": "^2.19.1",
39
+ "eslint-plugin-paths": "1.1.0",
39
40
  "eslint-plugin-promise": "^7.2.1",
40
41
  "eslint-plugin-regexp": "^2.7.0",
41
42
  "eslint-plugin-unused-imports": "^4.1.4",
42
- "foxts": "^1.7.0",
43
+ "foxts": "^2.0.1",
43
44
  "jsonc-eslint-parser": "^2.4.0",
44
45
  "picocolors": "^1.1.1",
45
- "typescript-eslint": "^8.26.1",
46
- "@eslint-sukka/shared": "6.17.1",
47
- "eslint-plugin-sukka": "6.17.1"
46
+ "typescript-eslint": "^8.27.0",
47
+ "@eslint-sukka/shared": "6.18.0",
48
+ "eslint-plugin-sukka": "6.18.0"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@antfu/install-pkg": "^1.0.0",
@@ -55,10 +56,10 @@
55
56
  "@stylistic/eslint-plugin-ts": "^4.2.0",
56
57
  "eslint-config-flat-gitignore": "^2.1.0",
57
58
  "eslint-plugin-antfu": "^3.1.1",
58
- "@eslint-sukka/node": "6.17.1",
59
- "@eslint-sukka/react": "6.17.1",
60
- "@eslint-sukka/yaml": "6.17.1",
61
- "@eslint-sukka/rollup-config": "6.17.1"
59
+ "@eslint-sukka/node": "6.18.0",
60
+ "@eslint-sukka/react": "6.18.0",
61
+ "@eslint-sukka/yaml": "6.18.0",
62
+ "@eslint-sukka/rollup-config": "6.18.0"
62
63
  },
63
64
  "scripts": {
64
65
  "codegen": "SWC_NODE_IGNORE_DYNAMIC=true node -r @swc-node/register scripts/codegen.ts",