eslint-cli-bundle 2.0.1 → 3.0.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/eslint.js CHANGED
@@ -1,25 +1,25 @@
1
1
  #!/usr/bin/env node
2
- import{i as e,t}from"./rolldown-runtime-CN7XbDR5.js";import{C as n,S as r,_ as i,a,n as o,p as s,r as c,t as l,v as u,w as d,x as f,y as p}from"./eslint-BYId4sVl.js";var m=/* @__PURE__ */ t(((t,n)=>{n.exports=o,o.sync=s;var r=e(`fs`);function i(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function a(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:i(t,n)}function o(e,t,n){r.stat(e,function(r,i){n(r,!r&&a(i,e,t))})}function s(e,t){return a(r.statSync(e),e,t)}})),h=/* @__PURE__ */ t(((t,n)=>{n.exports=i,i.sync=a;var r=e(`fs`);function i(e,t,n){r.stat(e,function(e,r){n(e,!e&&o(r,t))})}function a(e,t){return o(r.statSync(e),t)}function o(e,t){return e.isFile()&&s(e,t)}function s(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}})),g=/* @__PURE__ */ t(((t,n)=>{e(`fs`);var r=process.platform===`win32`||global.TESTING_WINDOWS?m():h();n.exports=i,i.sync=a;function i(e,t,n){if(typeof t==`function`&&(n=t,t={}),!n){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,r){i(e,t||{},function(e,t){e?r(e):n(t)})})}r(e,t||{},function(e,r){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function a(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}})),_=/* @__PURE__ */ t(((t,n)=>{let r=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,i=e(`path`),a=r?`;`:`:`,o=g(),s=e=>Object.assign(/* @__PURE__ */ Error(`not found: ${e}`),{code:`ENOENT`}),c=(e,t)=>{let n=t.colon||a,i=e.match(/\//)||r&&e.match(/\\/)?[``]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||
3
- /* istanbul ignore next: very unusual */``).split(n)],o=r?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=r?o.split(n):[``];return r&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:i,pathExt:s,pathExtExe:o}},l=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:r,pathExt:a,pathExtExe:l}=c(e,t),u=[],d=n=>new Promise((a,o)=>{if(n===r.length)return t.all&&u.length?a(u):o(s(e));let c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;a(f(p,n,0))}),f=(e,n,r)=>new Promise((i,s)=>{if(r===a.length)return i(d(n+1));let c=a[r];o(e+c,{pathExt:l},(a,o)=>{if(!a&&o){if(t.all)u.push(e+c);else return i(e+c)}return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};n.exports=l,l.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:r,pathExtExe:a}=c(e,t),l=[];for(let s=0;s<n.length;s++){let c=n[s],u=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<r.length;e++){let n=f+r[e];try{if(o.sync(n,{pathExt:a})){if(t.all)l.push(n);else return n}}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw s(e)}})),v=/* @__PURE__ */ t(((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n})),y=/* @__PURE__ */ t(((t,n)=>{let r=e(`path`),i=_(),a=v();function o(e,t){let n=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=i.sync(e.command,{path:n[a({env:n})],pathExt:t?r.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=r.resolve(s?e.options.cwd:``,l),l}function s(e){return o(e)||o(e,!0)}n.exports=s})),b=/* @__PURE__ */ t(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),x=/* @__PURE__ */ t(((e,t)=>{t.exports=/^#!(.*)/})),S=/* @__PURE__ */ t(((e,t)=>{let n=x();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}})),C=/* @__PURE__ */ t(((t,n)=>{let r=e(`fs`),i=S();function a(e){let t=Buffer.alloc(150),n;try{n=r.openSync(e,`r`),r.readSync(n,t,0,150,0),r.closeSync(n)}catch{}return i(t.toString())}n.exports=a})),w=/* @__PURE__ */ t(((t,n)=>{let r=e(`path`),i=y(),a=b(),o=C(),s=process.platform===`win32`,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){e.file=i(e);let t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}function d(e){if(!s)return e;let t=u(e),n=!c.test(t);if(e.options.forceShell||n){let n=l.test(t);e.command=r.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,n)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function f(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:d(r)}n.exports=f})),T=/* @__PURE__ */ t(((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(/* @__PURE__ */ Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),E=/* @__PURE__ */ t(((t,n)=>{let r=e(`child_process`),i=w(),a=T();function o(e,t,n){let o=i(e,t,n),s=r.spawn(o.command,o.args,o.options);return a.hookChildProcess(s,o),s}function s(e,t,n){let o=i(e,t,n),s=r.spawnSync(o.command,o.args,o.options);return s.error=s.error||a.verifyENOENTSync(s.status,o),s}n.exports=o,n.exports.spawn=o,n.exports.sync=s,n.exports._parse=i,n.exports._enoent=a})),D=/* @__PURE__ */ t(((e,t)=>{var n=Array.prototype.slice,r=typeof Object.keys==`function`?Object.keys:function(e){var t=[];for(var n in e)t.push(n);return t},i=t.exports=function(e,t){return e===0&&t===0?c(e,t):e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():s(e)?s(t):typeof e!=`object`&&typeof t!=`object`?e==t:l(e,t)};function a(e){return e==null}function o(e){return Object.prototype.toString.call(e)==`[object Arguments]`}function s(e){return typeof e==`number`&&e!==e}function c(e,t){return 1/e==1/t}function l(e,t){if(a(e)||a(t)||e.prototype!==t.prototype)return!1;if(o(e))return o(t)?(e=n.call(e),t=n.call(t),i(e,t)):!1;try{var s=r(e),c=r(t),l,u}catch{return!1}if(s.length!=c.length)return!1;for(s.sort(),c.sort(),u=s.length-1;u>=0;u--)if(s[u]!=c[u])return!1;for(u=s.length-1;u>=0;u--)if(l=s[u],!i(e[l],t[l]))return!1;return!0}})),O=/* @__PURE__ */ t(((e,t)=>{(function(){var n;try{n=typeof Intl<`u`&&Intl.Collator!==void 0?Intl.Collator(`generic`,{sensitivity:`base`}):null}catch{console.log(`Collator could not be initialized and wouldn't be used`)}var r=[],i=[],a={get:function(e,t,a){var o=a&&n&&a.useCollator,s=e.length,c=t.length;if(s===0)return c;if(c===0)return s;for(var l,u,d=0,f,p;d<c;++d)r[d]=d,i[d]=t.charCodeAt(d);r[c]=c;var m;if(o)for(d=0;d<s;++d){for(u=d+1,f=0;f<c;++f)l=u,m=n.compare(e.charAt(d),String.fromCharCode(i[f]))===0,u=r[f]+ +!m,p=l+1,u>p&&(u=p),p=r[f+1]+1,u>p&&(u=p),r[f]=l;r[f]=u}else for(d=0;d<s;++d){for(u=d+1,f=0;f<c;++f)l=u,m=e.charCodeAt(d)===i[f],u=r[f]+ +!m,p=l+1,u>p&&(u=p),p=r[f+1]+1,u>p&&(u=p),r[f]=l;r[f]=u}return u}};typeof define<`u`&&define!==null&&define.amd?define(function(){return a}):t!=null&&e!==void 0&&t.exports===e?t.exports=a:typeof self<`u`&&typeof self.postMessage==`function`&&typeof self.importScripts==`function`?self.Levenshtein=a:typeof window<`u`&&window!==null&&(window.Levenshtein=a)})()})),k=/* @__PURE__ */ t(((e,t)=>{(function(){var e=p(),n=e.map,r=e.sortBy,i=O();t.exports={closestString:function(e,t){var a,o,s;if(e.length)return a=n(function(e){var n=t.length>e.length?[t,e]:[e,t],r=n[0],a=n[1];return{string:e,distance:i.get(r,a)}})(e),o=r(function(e){return e.distance},a)[0],s=o.string,o.distance,s},nameToRaw:function(e){return e.length===1||e===`NUM`?`-`+e:`--`+e},dasherize:function(t){return/^[A-Z]/.test(t)?t:e.dasherize(t)},naturalJoin:function(e){return e.length<3?e.join(` or `):e.slice(0,-1).join(`, `)+`, or `+e[e.length-1]}}}).call(e)})),A=/* @__PURE__ */ t(((e,t)=>{function n(e){let t=e.length-1,n=e[t];for(;n===` `||n===` `;)n=e[--t];return e.substring(0,t+1)}function r(e){return e.split(`
2
+ import{r as e,t}from"./rolldown-runtime-C7uQZ-1I.js";import{C as n,S as r,T as i,_ as a,n as o,t as s,v as c,w as l,y as u}from"./eslint-helpers-4m3QC9jt.js";import{t as d}from"./eslint-C-fkO7XK.js";import{t as f}from"./shared/translate-cli-options.js";var p=/* @__PURE__ */ t(((t,n)=>{n.exports=o,o.sync=s;var r=e(`fs`);function i(e,t){var n=t.pathExt===void 0?process.env.PATHEXT:t.pathExt;if(!n||(n=n.split(`;`),n.indexOf(``)!==-1))return!0;for(var r=0;r<n.length;r++){var i=n[r].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}function a(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:i(t,n)}function o(e,t,n){r.stat(e,function(r,i){n(r,!r&&a(i,e,t))})}function s(e,t){return a(r.statSync(e),e,t)}})),m=/* @__PURE__ */ t(((t,n)=>{n.exports=i,i.sync=a;var r=e(`fs`);function i(e,t,n){r.stat(e,function(e,r){n(e,!e&&o(r,t))})}function a(e,t){return o(r.statSync(e),t)}function o(e,t){return e.isFile()&&s(e,t)}function s(e,t){var n=e.mode,r=e.uid,i=e.gid,a=t.uid===void 0?process.getuid&&process.getuid():t.uid,o=t.gid===void 0?process.getgid&&process.getgid():t.gid,s=64,c=8,l=1,u=s|c;return n&l||n&c&&i===o||n&s&&r===a||n&u&&a===0}})),h=/* @__PURE__ */ t(((t,n)=>{e(`fs`);var r=process.platform===`win32`||global.TESTING_WINDOWS?p():m();n.exports=i,i.sync=a;function i(e,t,n){if(typeof t==`function`&&(n=t,t={}),!n){if(typeof Promise!=`function`)throw TypeError(`callback not provided`);return new Promise(function(n,r){i(e,t||{},function(e,t){e?r(e):n(t)})})}r(e,t||{},function(e,r){e&&(e.code===`EACCES`||t&&t.ignoreErrors)&&(e=null,r=!1),n(e,r)})}function a(e,t){try{return r.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code===`EACCES`)return!1;throw e}}})),g=/* @__PURE__ */ t(((t,n)=>{let r=process.platform===`win32`||process.env.OSTYPE===`cygwin`||process.env.OSTYPE===`msys`,i=e(`path`),a=r?`;`:`:`,o=h(),s=e=>Object.assign(/* @__PURE__ */ Error(`not found: ${e}`),{code:`ENOENT`}),c=(e,t)=>{let n=t.colon||a,i=e.match(/\//)||r&&e.match(/\\/)?[``]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||
3
+ /* istanbul ignore next: very unusual */``).split(n)],o=r?t.pathExt||process.env.PATHEXT||`.EXE;.CMD;.BAT;.COM`:``,s=r?o.split(n):[``];return r&&e.indexOf(`.`)!==-1&&s[0]!==``&&s.unshift(``),{pathEnv:i,pathExt:s,pathExtExe:o}},l=(e,t,n)=>{typeof t==`function`&&(n=t,t={}),t||={};let{pathEnv:r,pathExt:a,pathExtExe:l}=c(e,t),u=[],d=n=>new Promise((a,o)=>{if(n===r.length)return t.all&&u.length?a(u):o(s(e));let c=r[n],l=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(l,e),p=!l&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;a(f(p,n,0))}),f=(e,n,r)=>new Promise((i,s)=>{if(r===a.length)return i(d(n+1));let c=a[r];o(e+c,{pathExt:l},(a,o)=>{if(!a&&o){if(t.all)u.push(e+c);else return i(e+c)}return i(f(e,n,r+1))})});return n?d(0).then(e=>n(null,e),n):d(0)};n.exports=l,l.sync=(e,t)=>{t||={};let{pathEnv:n,pathExt:r,pathExtExe:a}=c(e,t),l=[];for(let s=0;s<n.length;s++){let c=n[s],u=/^".*"$/.test(c)?c.slice(1,-1):c,d=i.join(u,e),f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;for(let e=0;e<r.length;e++){let n=f+r[e];try{if(o.sync(n,{pathExt:a})){if(t.all)l.push(n);else return n}}catch{}}}if(t.all&&l.length)return l;if(t.nothrow)return null;throw s(e)}})),_=/* @__PURE__ */ t(((e,t)=>{let n=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)===`win32`?Object.keys(t).reverse().find(e=>e.toUpperCase()===`PATH`)||`Path`:`PATH`};t.exports=n,t.exports.default=n})),v=/* @__PURE__ */ t(((t,n)=>{let r=e(`path`),i=g(),a=_();function o(e,t){let n=e.options.env||process.env,o=process.cwd(),s=e.options.cwd!=null,c=s&&process.chdir!==void 0&&!process.chdir.disabled;if(c)try{process.chdir(e.options.cwd)}catch{}let l;try{l=i.sync(e.command,{path:n[a({env:n})],pathExt:t?r.delimiter:void 0})}catch{}finally{c&&process.chdir(o)}return l&&=r.resolve(s?e.options.cwd:``,l),l}function s(e){return o(e)||o(e,!0)}n.exports=s})),y=/* @__PURE__ */ t(((e,t)=>{let n=/([()\][%!^"`<>&|;, *?])/g;function r(e){return e=e.replace(n,`^$1`),e}function i(e,t){return e=`${e}`,e=e.replace(/(?=(\\+?)?)\1"/g,`$1$1\\"`),e=e.replace(/(?=(\\+?)?)\1$/,`$1$1`),e=`"${e}"`,e=e.replace(n,`^$1`),t&&(e=e.replace(n,`^$1`)),e}t.exports.command=r,t.exports.argument=i})),b=/* @__PURE__ */ t(((e,t)=>{t.exports=/^#!(.*)/})),x=/* @__PURE__ */ t(((e,t)=>{let n=b();t.exports=(e=``)=>{let t=e.match(n);if(!t)return null;let[r,i]=t[0].replace(/#! ?/,``).split(` `),a=r.split(`/`).pop();return a===`env`?i:i?`${a} ${i}`:a}})),S=/* @__PURE__ */ t(((t,n)=>{let r=e(`fs`),i=x();function a(e){let t=Buffer.alloc(150),n;try{n=r.openSync(e,`r`),r.readSync(n,t,0,150,0),r.closeSync(n)}catch{}return i(t.toString())}n.exports=a})),C=/* @__PURE__ */ t(((t,n)=>{let r=e(`path`),i=v(),a=y(),o=S(),s=process.platform===`win32`,c=/\.(?:com|exe)$/i,l=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function u(e){e.file=i(e);let t=e.file&&o(e.file);return t?(e.args.unshift(e.file),e.command=t,i(e)):e.file}function d(e){if(!s)return e;let t=u(e),n=!c.test(t);if(e.options.forceShell||n){let n=l.test(t);e.command=r.normalize(e.command),e.command=a.command(e.command),e.args=e.args.map(e=>a.argument(e,n)),e.args=[`/d`,`/s`,`/c`,`"${[e.command].concat(e.args).join(` `)}"`],e.command=process.env.comspec||`cmd.exe`,e.options.windowsVerbatimArguments=!0}return e}function f(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:d(r)}n.exports=f})),w=/* @__PURE__ */ t(((e,t)=>{let n=process.platform===`win32`;function r(e,t){return Object.assign(/* @__PURE__ */ Error(`${t} ${e.command} ENOENT`),{code:`ENOENT`,errno:`ENOENT`,syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function i(e,t){if(!n)return;let r=e.emit;e.emit=function(n,i){if(n===`exit`){let n=a(i,t);if(n)return r.call(e,`error`,n)}return r.apply(e,arguments)}}function a(e,t){return n&&e===1&&!t.file?r(t.original,`spawn`):null}function o(e,t){return n&&e===1&&!t.file?r(t.original,`spawnSync`):null}t.exports={hookChildProcess:i,verifyENOENT:a,verifyENOENTSync:o,notFoundError:r}})),T=/* @__PURE__ */ t(((t,n)=>{let r=e(`child_process`),i=C(),a=w();function o(e,t,n){let o=i(e,t,n),s=r.spawn(o.command,o.args,o.options);return a.hookChildProcess(s,o),s}function s(e,t,n){let o=i(e,t,n),s=r.spawnSync(o.command,o.args,o.options);return s.error=s.error||a.verifyENOENTSync(s.status,o),s}n.exports=o,n.exports.spawn=o,n.exports.sync=s,n.exports._parse=i,n.exports._enoent=a})),E=/* @__PURE__ */ t(((e,t)=>{var n=Array.prototype.slice,r=typeof Object.keys==`function`?Object.keys:function(e){var t=[];for(var n in e)t.push(n);return t},i=t.exports=function(e,t){return e===0&&t===0?c(e,t):e===t?!0:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():s(e)?s(t):typeof e!=`object`&&typeof t!=`object`?e==t:l(e,t)};function a(e){return e==null}function o(e){return Object.prototype.toString.call(e)==`[object Arguments]`}function s(e){return typeof e==`number`&&e!==e}function c(e,t){return 1/e==1/t}function l(e,t){if(a(e)||a(t)||e.prototype!==t.prototype)return!1;if(o(e))return o(t)?(e=n.call(e),t=n.call(t),i(e,t)):!1;try{var s=r(e),c=r(t),l,u}catch{return!1}if(s.length!=c.length)return!1;for(s.sort(),c.sort(),u=s.length-1;u>=0;u--)if(s[u]!=c[u])return!1;for(u=s.length-1;u>=0;u--)if(l=s[u],!i(e[l],t[l]))return!1;return!0}})),D=/* @__PURE__ */ t(((e,t)=>{(function(){var n;try{n=typeof Intl<`u`&&Intl.Collator!==void 0?Intl.Collator(`generic`,{sensitivity:`base`}):null}catch{console.log(`Collator could not be initialized and wouldn't be used`)}var r=[],i=[],a={get:function(e,t,a){var o=a&&n&&a.useCollator,s=e.length,c=t.length;if(s===0)return c;if(c===0)return s;for(var l,u,d=0,f,p;d<c;++d)r[d]=d,i[d]=t.charCodeAt(d);r[c]=c;var m;if(o)for(d=0;d<s;++d){for(u=d+1,f=0;f<c;++f)l=u,m=n.compare(e.charAt(d),String.fromCharCode(i[f]))===0,u=r[f]+ +!m,p=l+1,u>p&&(u=p),p=r[f+1]+1,u>p&&(u=p),r[f]=l;r[f]=u}else for(d=0;d<s;++d){for(u=d+1,f=0;f<c;++f)l=u,m=e.charCodeAt(d)===i[f],u=r[f]+ +!m,p=l+1,u>p&&(u=p),p=r[f+1]+1,u>p&&(u=p),r[f]=l;r[f]=u}return u}};typeof define<`u`&&define!==null&&define.amd?define(function(){return a}):t!=null&&e!==void 0&&t.exports===e?t.exports=a:typeof self<`u`&&typeof self.postMessage==`function`&&typeof self.importScripts==`function`?self.Levenshtein=a:typeof window<`u`&&window!==null&&(window.Levenshtein=a)})()})),O=/* @__PURE__ */ t(((e,t)=>{(function(){var e=u(),n=e.map,r=e.sortBy,i=D();t.exports={closestString:function(e,t){var a,o,s;if(e.length)return a=n(function(e){var n=t.length>e.length?[t,e]:[e,t],r=n[0],a=n[1];return{string:e,distance:i.get(r,a)}})(e),o=r(function(e){return e.distance},a)[0],s=o.string,o.distance,s},nameToRaw:function(e){return e.length===1||e===`NUM`?`-`+e:`--`+e},dasherize:function(t){return/^[A-Z]/.test(t)?t:e.dasherize(t)},naturalJoin:function(e){return e.length<3?e.join(` or `):e.slice(0,-1).join(`, `)+`, or `+e[e.length-1]}}}).call(e)})),k=/* @__PURE__ */ t(((e,t)=>{function n(e){let t=e.length-1,n=e[t];for(;n===` `||n===` `;)n=e[--t];return e.substring(0,t+1)}function r(e){return e.split(`
4
4
  `).map(e=>n(e)).join(`
5
5
  `)}t.exports=function(e,t){if(t||={},e==null)return e;var n=t.width||50,a=typeof t.indent==`string`?t.indent:` `,o=t.newline||`
6
6
  `+a,s=typeof t.escape==`function`?t.escape:i,c=`.{1,`+n+`}`;t.cut!==!0&&(c+=`([\\s​]+|$)|[^\\s​]+?([\\s​]+|$)`);var l=new RegExp(c,`g`),u=a+(e.match(l)||[]).map(function(e){return e.slice(-1)===`
7
- `&&(e=e.slice(0,e.length-1)),s(e)}).join(o);return t.trim===!0&&(u=r(u)),u};function i(e){return e}})),j=/* @__PURE__ */ t(((e,t)=>{(function(){var e=p(),n=e.id,r,i,a,o,s,c,l,u,d,f,m,h,g,_;e.find,r=e.sort,i=e.min,a=e.max,o=e.map,s=e.unlines,e=k(),c=e.nameToRaw,l=e.dasherize,u=e.naturalJoin,d=A(),f=function(e,t){var n=t===void 0?[``,e-1]:[x(` `,e),t-e-1],r=n[0],i=n[1];return function(e){return d(e,{indent:r,width:i,trim:!0})}},m=function(e,t,n){var r=e.option,i=(a=e.shortNames)??[],a,s=e.longNames??[],l=e.type,u,d,p,m,h,g,_,v,y;return e.description,u=t.aliasSeparator,d=t.typeSeparator,p=t.initialIndent,e.negateName&&(r=`no-`+r,s&&=o(function(e){return`no-`+e},s)),m=r.length===1?[r].concat(i,s):i.concat([r],s),h=o(c,m).join(u),g=h.length,_=r===`NUM`?`::`:d,v=_.length,n!=null&&!e.boolean&&p+g+v+l.length>n?(y=f(p+g+v,n),h+``+_+y(l).replace(/^\s+/,``)):h+(e.boolean?``:_+``+l)},h=function(e){e.aliasSeparator??=`, `,e.typeSeparator??=` `,e.descriptionSeparator??=` `,e.initialIndent??=2,e.secondaryIndent??=4,e.maxPadFactor??=1.5},g=function(e,t){var r=t.stdout,i=(a=t.helpStyle)??{},a;return h(i),function(t){var a=r!=null&&r.isTTY?r.columns-1:null,o=a?f(a):n,c,u,d,p,h,g,_,v,b,S,C,w,T;try{c=e(l(t))}catch(e){return u=e,u.message}return d=m(c,i),p=c.default&&!c.negateName?`
7
+ `&&(e=e.slice(0,e.length-1)),s(e)}).join(o);return t.trim===!0&&(u=r(u)),u};function i(e){return e}})),A=/* @__PURE__ */ t(((e,t)=>{(function(){var e=u(),n=e.id,r,i,a,o,s,c,l,d,f,p,m,h,g,_;e.find,r=e.sort,i=e.min,a=e.max,o=e.map,s=e.unlines,e=O(),c=e.nameToRaw,l=e.dasherize,d=e.naturalJoin,f=k(),p=function(e,t){var n=t===void 0?[``,e-1]:[x(` `,e),t-e-1],r=n[0],i=n[1];return function(e){return f(e,{indent:r,width:i,trim:!0})}},m=function(e,t,n){var r=e.option,i=(a=e.shortNames)??[],a,s=e.longNames??[],l=e.type,u,d,f,m,h,g,_,v,y;return e.description,u=t.aliasSeparator,d=t.typeSeparator,f=t.initialIndent,e.negateName&&(r=`no-`+r,s&&=o(function(e){return`no-`+e},s)),m=r.length===1?[r].concat(i,s):i.concat([r],s),h=o(c,m).join(u),g=h.length,_=r===`NUM`?`::`:d,v=_.length,n!=null&&!e.boolean&&f+g+v+l.length>n?(y=p(f+g+v,n),h+``+_+y(l).replace(/^\s+/,``)):h+(e.boolean?``:_+``+l)},h=function(e){e.aliasSeparator??=`, `,e.typeSeparator??=` `,e.descriptionSeparator??=` `,e.initialIndent??=2,e.secondaryIndent??=4,e.maxPadFactor??=1.5},g=function(e,t){var r=t.stdout,i=(a=t.helpStyle)??{},a;return h(i),function(t){var a=r!=null&&r.isTTY?r.columns-1:null,o=a?p(a):n,c,u,d,f,h,g,_,v,b,S,C,w,T;try{c=e(l(t))}catch(e){return u=e,u.message}return d=m(c,i),f=c.default&&!c.negateName?`
8
8
  default: `+c.default:``,h=c.restPositional?`Everything after this option is considered a positional argument, even if it looks like an option.`:``,g=c.longDescription||c.description&&y(c.description),_=g&&h?g+` `+h:(v=g||h)?v:``,b=`description:`,S=_?a&&_.length-1-b.length>a?`
9
9
  `+b+`
10
10
  `+o(_):`
11
11
  `+b+` `+_:``,C=(v=c.example)?(w=[].concat(v),w.length>1?`
12
12
  examples:
13
13
  `+s(w):`
14
- example: `+w[0]):``,T=p||S||C?`
15
- `+x(`=`,d.length):``,d+``+T+p+S+C}},_=function(e){var t=e.options,n=e.prepend,o=e.append,c=(l=e.helpStyle)??{},l,d=e.stdout,p,g,_,y;return h(c),c.aliasSeparator,c.typeSeparator,p=c.descriptionSeparator,g=c.maxPadFactor,_=c.initialIndent,y=c.secondaryIndent,function(e){var l=e??{},h=l.showHidden,S=l.interpolate,C=d!=null&&d.isTTY?d.columns-1:null,w=[],T=function(e){return w.push(e??``)},E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,ee,Y,X;for(n&&(T(S?b(n,S):n),T()),E=[],D=0,O=0,k=[],A=0,j=(l=t).length;A<j;++A)M=l[A],(h||!M.hidden)&&((N=M.heading)?E.push({type:`heading`,value:N}):(P=m(M,c,C),F=[],(N=M.description)!=null&&F.push(N),(N=M.enum)&&F.push(`either: `+u(N)),M.default&&!M.negateName&&F.push(`default: `+M.default),I=F.join(` - `),E.push({type:`option`,pre:P,desc:I,descLen:I.length}),L=P.length,D++,O+=L,k.push(L)));for(R=r(k),z=R[R.length-1],B=_+O/D,V=D>2?i(B*g,z):z,A=R.length-1;A>=0;--A)if(L=R[A],L<=V){H=L;break}if(U=p.length,C!=null)for(W=0,G=0,A=0,j=E.length;A<j;++A)M=E[A],M.type===`option`&&(P=M.pre,I=M.desc,K=M.descLen,K===0?M.wrap=`none`:(L=a(H,P.length)+_+U,q=L+K,q>C?K/2.5>C-L?(W++,M.wrap=`full`):(G++,M.wrap=`partial`):M.wrap=`none`));for(J=x(` `,_),ee=D>1&&W+G*.5>D*.5,A=0,j=E.length;A<j;++A)if(Y=A,M=E[A],M.type===`heading`)Y!==0&&T(),T(M.value+`:`);else{if(P=M.pre,I=M.desc,K=M.descLen,X=M.wrap,C!=null){if(ee||X===`full`){X=f(_+y,C),T(J+``+P+`
16
- `+X(I));continue}if(X===`partial`){X=f(_+U+a(H,P.length),C),T(J+``+v(P,H)+p+X(I).replace(/^\s+/,``));continue}}T(K===0?J+``+P:J+``+v(P,H)+p+I)}return o&&(T(),T(S?b(o,S):o)),s(w)}};function v(e,t){var n=t-e.length;return e+``+x(` `,n>0?n:0)}function y(e){var t=e.charAt(0).toUpperCase(),n=e.slice(1),r=/[\.!\?]$/.test(e)?``:`.`;return t+``+n+r}function b(e,t){return e.replace(/{{([a-zA-Z$_][a-zA-Z$_0-9]*)}}/g,function(e,n){return t[n]??`{{`+n+`}}`})}t.exports={generateHelp:_,generateHelpForOption:g};function x(e,t){for(var n=``;t>0;(t>>=1)&&(e+=e))t&1&&(n+=e);return n}}).call(e)})),M=/* @__PURE__ */ t(((e,t)=>{(function(){var e,n,r,a,o,s,c,l,d,f,m,h,g,_,v,y,b,x,S,C,w,T={}.toString,E=[].slice,O=Array.from||function(e){return E.call(e)};e=`0.9.4`,n=p(),n.id,r=n.map,n.compact,a=n.any,n.groupBy,o=n.partition,s=n.chars,n.isItNaN,c=n.keys,n.Obj,l=n.camelize,d=D(),n=k(),f=n.closestString,m=n.nameToRaw,h=n.dasherize,g=n.naturalJoin,n=j(),_=n.generateHelp,v=n.generateHelpForOption,n=u(),y=n.parsedTypeCheck,b=n.parseType,x=i().parsedTypeParse,S=function(e){var t,n,r={};for(t in e)n=e[t],r[l(t)]=n;return r},C=function(e){var t=`--?[a-zA-Z][-a-z-A-Z0-9]*=`,n=RegExp(`(?:`+t+`)?(?:'(?:\\\\'|[^'])+'|"(?:\\\\"|[^"])+")|[^'"\\s]+`,`g`),i=RegExp(`^(`+t+`)?['"]([\\s\\S]*)['"]$`);return r(function(e){return e.replace(i,`$1$2`)},e.match(n)||[])},w=function(e){var t={},n={},r=[],i,l,u;return T.call(e.stdout).slice(8,-1)===`Undefined`&&(e.stdout=process.stdout),e.positionalAnywhere??=!0,e.typeAliases??={},e.defaults??={},e.concatRepeatedArrays!=null&&(e.defaults.concatRepeatedArrays=e.concatRepeatedArrays),e.mergeRepeatedObjects!=null&&(e.defaults.mergeRepeatedObjects=e.mergeRepeatedObjects),i=function(i){var a,s,c,l,u,d,f,p,m,h,g,_,v,y,S,C,w,D,k,A,j,M;if(T.call(i).slice(8,-1)!==`Array`)throw Error(`No options defined.`);for(a=0,s=i.length;a<s;++a)if(c=i[a],c.heading==null){if(l=c.option,t[l]!=null)throw Error(`Option '`+l+`' already defined.`);for(u in d=e.defaults)f=d[u],c[u]??(c[u]=f);if(c.type===`Boolean`&&(c.boolean??(c.boolean=!0)),c.parsedType==null){if(!c.type)throw Error(`No type defined for option '`+l+`'.`);try{p=(m=e.typeAliases[c.type])??c.type,c.parsedType=b(p)}catch(e){throw h=e,Error(`Option '`+l+`': Error parsing type '`+c.type+`': `+h.message)}}if(c.default)try{n[l]=x(c.parsedType,c.default)}catch(e){throw h=e,Error(`Option '`+l+`': Error parsing default value '`+c.default+`' for type '`+c.type+`': `+h.message)}if(c.enum&&!c.parsedPossiblities){for(g=[],_=c.parsedType,v=0,y=(d=c.enum).length;v<y;++v){S=d[v];try{g.push(x(_,S))}catch(e){throw h=e,Error(`Option '`+l+`': Error parsing enum value '`+S+`' for type '`+c.type+`': `+h.message)}}c.parsedPossibilities=g}if(m=c.dependsOn){if(m.length){if(d=[].concat(c.dependsOn),C=d[0],w=E.call(d,1),D=C.toLowerCase(),w.length){if(D===`and`||D===`or`)c.dependsOn=[D].concat(O(w));else throw Error(`Option '`+l+`': If you have more than one dependency, you must specify either 'and' or 'or'`)}else(d=D.toLowerCase())===`and`||d===`or`?c.dependsOn=null:c.dependsOn=[`and`,C]}else c.dependsOn=null}if(c.required&&r.push(l),t[l]=c,c.concatRepeatedArrays!=null){if(k=c.concatRepeatedArrays,T.call(k).slice(8,-1)===`Boolean`)c.concatRepeatedArrays=[k,{}];else if(k.length===1)c.concatRepeatedArrays=[k[0],{}];else if(k.length!==2)throw Error(`Invalid setting for concatRepeatedArrays`)}if(c.alias||c.aliases){if(l===`NUM`)throw Error(`-NUM option can't have aliases.`);for(c.alias&&(c.aliases??(c.aliases=[].concat(c.alias))),v=0,y=(d=c.aliases).length;v<y;++v){if(A=d[v],t[A]!=null)throw Error(`Option '`+A+`' already defined.`);t[A]=c}d=o(N,c.aliases),j=d[0],M=d[1],c.shortNames??(c.shortNames=j),c.longNames??(c.longNames=M)}(!c.aliases||c.shortNames.length===0)&&c.type===`Boolean`&&c.default===`true`&&(c.negateName=!0)}function N(e){return e.length===1}},i(e.options),l=function(e){var n=t[e],r;if(n==null)throw r=f(c(t),e),Error(`Invalid option '`+m(e)+`'`+(r?` - perhaps you meant '`+m(r)+`'?`:`.`));return n},u=function(i,o){var c=(o??{}).slice,u={},f=[],p=!1,_=!1,v=null,b=function(e,t){var n=l(e),r,i,o;if(n.boolean)r=t;else{try{i=n.concatRepeatedArrays,r=i!=null&&i[0]&&i[1].oneValuePerFlag&&n.parsedType.length===1&&n.parsedType[0].structure===`array`?[x(n.parsedType[0].of,t)]:x(n.parsedType,t)}catch{throw Error(`Invalid value for option '`+e+`' - expected type `+n.type+`, received value: `+t+`.`)}if(n.enum&&!a(function(e){return d(e,r)},n.parsedPossibilities))throw Error(`Option `+e+`: '`+r+`' not one of `+g(n.enum)+`.`)}o=T.call(u[e]).slice(8,-1),u[e]==null?u[e]=r:n.concatRepeatedArrays!=null&&n.concatRepeatedArrays[0]&&o===`Array`?u[e]=u[e].concat(r):n.mergeRepeatedObjects&&o===`Object`?A(u[e],r):u[e]=r,n.restPositional&&(p=!0),n.overrideRequired&&(_=!0)},w=function(){var e,t,r;for(e in t=n)r=t[e],u[e]??(u[e]=r)},D=function(){var e,t,n,i;if(!_){for(e=0,n=(t=r).length;e<n;++e)if(i=t[e],!u[i])throw Error(`Option `+m(i)+` is required.`)}},O=function(e,t){throw Error(`The options `+m(e)+` and `+m(t)+` are mutually exclusive - you cannot use them at the same time.`)},k=function(){var t=e.mutuallyExclusive,n,r,i,a,o,s,c,l,d,f;if(t)for(n=0,r=t.length;n<r;++n)for(i=t[n],a=null,o=0,s=i.length;o<s;++o)if(c=i[o],T.call(c).slice(8,-1)===`Array`){for(l=0,d=c.length;l<d;++l)if(f=c[l],f in u){if(a!=null)O(a,f);else{a=f;break}}}else c in u&&(a==null?a=c:O(a,c))},j=function(e){var t=e.dependsOn,n,r,i,a,o,s;if(!t||e.dependenciesMet)return!0;for(n=t[0],r=E.call(t,1),i=0,a=r.length;i<a;++i)if(o=r[i],s=u[o],s&&j(s)){if(n===`or`)return!0}else if(n===`and`)throw Error(`The option '`+e.option+`' did not have its dependencies met.`);if(n===`and`)return!0;throw Error(`The option '`+e.option+`' did not meet any of its dependencies.`)},M=function(){for(var e in u)j(t[e])},N=function(){if(v)throw Error(`Value for '`+v+`' of type '`+l(v).type+`' required.`)},P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,ee,Y,X,te,ne,Z,Q,$,re,ie;switch(T.call(i).slice(8,-1)){case`String`:P=C(i.slice(c??0));break;case`Array`:P=i.slice(c??2);break;case`Object`:for(F in u={},i)if(I=i[F],F!==`_`){if(L=l(h(F)),y(L.parsedType,I))u[L.option]=I;else throw Error(`Option '`+L.option+`': Invalid type for '`+I+`' - expected type '`+L.type+`'.`)}return k(),M(),w(),D(),R=S(u),R._=i._||[],R;default:throw Error(`Invalid argument to 'parse': `+i+`.`)}for(z=0,B=P.length;z<B;++z)if(V=P[z],V===`--`)p=!0;else if(p)f.push(V);else if(H=V.match(/^(--?)([a-zA-Z][-a-zA-Z0-9]*)(=)?(.*)?$/)){if(U=H,N(),W=U[1].length===1,G=U[2],K=U[3]!=null,q=U[4],K&&q==null)throw Error(`No value for '`+G+`' specified.`);if(W)for(J=s(G),ee=J.length,Y=0,X=J.length;Y<X;++Y)if(te=Y,ne=J[Y],Z=l(ne),Q=Z.option,p)f.push(ne);else if(te===ee-1)K?($=Z.boolean?x([{type:`Boolean`}],q):q,b(Q,$)):Z.boolean?b(Q,!0):v=Q;else if(Z.boolean)b(Q,!0);else throw Error(`Can't set argument '`+ne+`' when not last flag in a group of short flags.`);else if(re=!1,(H=G.match(/^no-(.+)$/))?(re=!0,ie=H[1],Z=l(ie)):Z=l(G),Q=Z.option,Z.boolean)$=!K||x([{type:`Boolean`}],q),re?b(Q,!$):b(Q,$);else{if(re)throw Error(`Only use 'no-' prefix for Boolean options, not with '`+ie+`'.`);K?b(Q,q):v=Q}}else if(H=V.match(/^-([0-9]+(?:\.[0-9]+)?)$/)){if(Z=t.NUM,!Z)throw Error(`No -NUM option defined.`);b(Z.option,H[1])}else v?(b(v,V),v=null):(f.push(V),e.positionalAnywhere||(p=!0));return N(),k(),M(),w(),D(),R=S(u),R._=f,R},{parse:u,parseArgv:function(e){return u(e,{slice:2})},generateHelp:_(e),generateHelpForOption:v(l,e)}},w.VERSION=e,t.exports=w;function A(e,t){var n={}.hasOwnProperty;for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}}).call(e)})),N=/* @__PURE__ */ t(((e,t)=>{let n=M();t.exports=function(){return n({prepend:`eslint [options] file.js [file.js] [dir]`,defaults:{concatRepeatedArrays:!0,mergeRepeatedObjects:!0},options:[{heading:`Basic configuration`},{option:`config-lookup`,type:`Boolean`,default:`true`,description:`Disable look up for eslint.config.*`},{option:`config`,alias:`c`,type:`path::String`,description:`Use this configuration instead of eslint.config.* look up`},{option:`inspect-config`,type:`Boolean`,description:`Open the config inspector with the current configuration`},{option:`ext`,type:`[String]`,description:`Specify additional file extensions to lint`},{option:`global`,type:`[String]`,description:`Define global variables`},{option:`parser`,type:`String`,description:`Specify the parser to be used`},{option:`parser-options`,type:`Object`,description:`Specify parser options`},{heading:`Specify Rules and Plugins`},{option:`plugin`,type:`[String]`,description:`Specify plugins`},{option:`rule`,type:`Object`,description:`Specify rules`},{heading:`Fix Problems`},{option:`fix`,type:`Boolean`,default:!1,description:`Automatically fix problems`},{option:`fix-dry-run`,type:`Boolean`,default:!1,description:`Automatically fix problems without saving the changes to the file system`},{option:`fix-type`,type:`Array`,description:`Specify the types of fixes to apply (directive, problem, suggestion, layout)`},{heading:`Ignore Files`},{option:`ignore`,type:`Boolean`,default:`true`,description:`Disable use of ignore files and patterns`},{option:`ignore-pattern`,type:`[String]`,description:`Patterns of files to ignore`,concatRepeatedArrays:[!0,{oneValuePerFlag:!0}]},{heading:`Use stdin`},{option:`stdin`,type:`Boolean`,default:`false`,description:`Lint code provided on <STDIN>`},{option:`stdin-filename`,type:`String`,description:`Specify filename to process STDIN as`},{heading:`Handle Warnings`},{option:`quiet`,type:`Boolean`,default:`false`,description:`Report errors only`},{option:`max-warnings`,type:`Int`,default:`-1`,description:`Number of warnings to trigger nonzero exit code`},{heading:`Output`},{option:`output-file`,alias:`o`,type:`path::String`,description:`Specify file to write report to`},{option:`format`,alias:`f`,type:`String`,default:`stylish`,description:`Use a specific output format`},{option:`color`,type:`Boolean`,alias:`no-color`,description:`Force enabling/disabling of color`},{heading:`Inline configuration comments`},{option:`inline-config`,type:`Boolean`,default:`true`,description:`Prevent comments from changing config or rules`},{option:`report-unused-disable-directives`,type:`Boolean`,default:void 0,description:`Adds reported errors for unused eslint-disable and eslint-enable directives`},{option:`report-unused-disable-directives-severity`,type:`String`,default:void 0,description:`Chooses severity level for reporting unused eslint-disable and eslint-enable directives`,enum:[`off`,`warn`,`error`,`0`,`1`,`2`]},{option:`report-unused-inline-configs`,type:`String`,default:void 0,description:`Adds reported errors for unused eslint inline config comments`,enum:[`off`,`warn`,`error`,`0`,`1`,`2`]},{heading:`Caching`},{option:`cache`,type:`Boolean`,default:`false`,description:`Only check changed files`},{option:`cache-file`,type:`path::String`,default:`.eslintcache`,description:`Path to the cache file. Deprecated: use --cache-location`},{option:`cache-location`,type:`path::String`,description:`Path to the cache file or directory`},{option:`cache-strategy`,dependsOn:[`cache`],type:`String`,default:`metadata`,enum:[`metadata`,`content`],description:`Strategy to use for detecting changed files in the cache`},{heading:`Suppressing Violations`},{option:`suppress-all`,type:`Boolean`,default:`false`,description:`Suppress all violations`},{option:`suppress-rule`,type:`[String]`,description:`Suppress specific rules`},{option:`suppressions-location`,type:`path::String`,description:`Specify the location of the suppressions file`},{option:`prune-suppressions`,type:`Boolean`,default:`false`,description:`Prune unused suppressions`},{option:`pass-on-unpruned-suppressions`,type:`Boolean`,default:`false`,description:`Ignore unused suppressions`},{heading:`Miscellaneous`},{option:`init`,type:`Boolean`,default:`false`,description:`Run config initialization wizard`},{option:`env-info`,type:`Boolean`,default:`false`,description:`Output execution environment information`},{option:`error-on-unmatched-pattern`,type:`Boolean`,default:`true`,description:`Prevent errors when pattern is unmatched`},{option:`exit-on-fatal-error`,type:`Boolean`,default:`false`,description:`Exit with exit code 2 in case of fatal error`},{option:`warn-ignored`,type:`Boolean`,default:`true`,description:`Suppress warnings when the file list includes ignored files`},{option:`pass-on-no-patterns`,type:`Boolean`,default:!1,description:`Exit with exit code 0 in case no file patterns are passed`},{option:`debug`,type:`Boolean`,default:!1,description:`Output debugging information`},{option:`help`,alias:`h`,type:`Boolean`,description:`Show help`},{option:`version`,alias:`v`,type:`Boolean`,description:`Output the version number`},{option:`print-config`,type:`path::String`,description:`Print the configuration for the given file`},{option:`stats`,type:`Boolean`,default:`false`,description:`Add statistics to the lint report`},{option:`flag`,type:`[String]`,description:`Enable a feature flag`},{option:`mcp`,type:`Boolean`,description:`Start the ESLint MCP server`},{option:`concurrency`,type:`Int|String`,default:`off`,description:`Number of linting threads, auto to choose automatically, off for no multithreading`}]})}})),P=/* @__PURE__ */ t(((e,t)=>{
14
+ example: `+w[0]):``,T=f||S||C?`
15
+ `+x(`=`,d.length):``,d+``+T+f+S+C}},_=function(e){var t=e.options,n=e.prepend,o=e.append,c=(l=e.helpStyle)??{},l,u=e.stdout,f,g,_,y;return h(c),c.aliasSeparator,c.typeSeparator,f=c.descriptionSeparator,g=c.maxPadFactor,_=c.initialIndent,y=c.secondaryIndent,function(e){var l=e??{},h=l.showHidden,S=l.interpolate,C=u!=null&&u.isTTY?u.columns-1:null,w=[],T=function(e){return w.push(e??``)},E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,ee,Y,X;for(n&&(T(S?b(n,S):n),T()),E=[],D=0,O=0,k=[],A=0,j=(l=t).length;A<j;++A)M=l[A],(h||!M.hidden)&&((N=M.heading)?E.push({type:`heading`,value:N}):(P=m(M,c,C),F=[],(N=M.description)!=null&&F.push(N),(N=M.enum)&&F.push(`either: `+d(N)),M.default&&!M.negateName&&F.push(`default: `+M.default),I=F.join(` - `),E.push({type:`option`,pre:P,desc:I,descLen:I.length}),L=P.length,D++,O+=L,k.push(L)));for(R=r(k),z=R[R.length-1],B=_+O/D,V=D>2?i(B*g,z):z,A=R.length-1;A>=0;--A)if(L=R[A],L<=V){H=L;break}if(U=f.length,C!=null)for(W=0,G=0,A=0,j=E.length;A<j;++A)M=E[A],M.type===`option`&&(P=M.pre,I=M.desc,K=M.descLen,K===0?M.wrap=`none`:(L=a(H,P.length)+_+U,q=L+K,q>C?K/2.5>C-L?(W++,M.wrap=`full`):(G++,M.wrap=`partial`):M.wrap=`none`));for(J=x(` `,_),ee=D>1&&W+G*.5>D*.5,A=0,j=E.length;A<j;++A)if(Y=A,M=E[A],M.type===`heading`)Y!==0&&T(),T(M.value+`:`);else{if(P=M.pre,I=M.desc,K=M.descLen,X=M.wrap,C!=null){if(ee||X===`full`){X=p(_+y,C),T(J+``+P+`
16
+ `+X(I));continue}if(X===`partial`){X=p(_+U+a(H,P.length),C),T(J+``+v(P,H)+f+X(I).replace(/^\s+/,``));continue}}T(K===0?J+``+P:J+``+v(P,H)+f+I)}return o&&(T(),T(S?b(o,S):o)),s(w)}};function v(e,t){var n=t-e.length;return e+``+x(` `,n>0?n:0)}function y(e){var t=e.charAt(0).toUpperCase(),n=e.slice(1),r=/[\.!\?]$/.test(e)?``:`.`;return t+``+n+r}function b(e,t){return e.replace(/{{([a-zA-Z$_][a-zA-Z$_0-9]*)}}/g,function(e,n){return t[n]??`{{`+n+`}}`})}t.exports={generateHelp:_,generateHelpForOption:g};function x(e,t){for(var n=``;t>0;(t>>=1)&&(e+=e))t&1&&(n+=e);return n}}).call(e)})),j=/* @__PURE__ */ t(((e,t)=>{(function(){var e,n,r,i,o,s,l,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T={}.toString,D=[].slice,k=Array.from||function(e){return D.call(e)};e=`0.9.4`,n=u(),n.id,r=n.map,n.compact,i=n.any,n.groupBy,o=n.partition,s=n.chars,n.isItNaN,l=n.keys,n.Obj,d=n.camelize,f=E(),n=O(),p=n.closestString,m=n.nameToRaw,h=n.dasherize,g=n.naturalJoin,n=A(),_=n.generateHelp,v=n.generateHelpForOption,n=c(),y=n.parsedTypeCheck,b=n.parseType,x=a().parsedTypeParse,S=function(e){var t,n,r={};for(t in e)n=e[t],r[d(t)]=n;return r},C=function(e){var t=`--?[a-zA-Z][-a-z-A-Z0-9]*=`,n=RegExp(`(?:`+t+`)?(?:'(?:\\\\'|[^'])+'|"(?:\\\\"|[^"])+")|[^'"\\s]+`,`g`),i=RegExp(`^(`+t+`)?['"]([\\s\\S]*)['"]$`);return r(function(e){return e.replace(i,`$1$2`)},e.match(n)||[])},w=function(e){var t={},n={},r=[],a,c,u;return T.call(e.stdout).slice(8,-1)===`Undefined`&&(e.stdout=process.stdout),e.positionalAnywhere??=!0,e.typeAliases??={},e.defaults??={},e.concatRepeatedArrays!=null&&(e.defaults.concatRepeatedArrays=e.concatRepeatedArrays),e.mergeRepeatedObjects!=null&&(e.defaults.mergeRepeatedObjects=e.mergeRepeatedObjects),a=function(i){var a,s,c,l,u,d,f,p,m,h,g,_,v,y,S,C,w,E,O,A,j,M;if(T.call(i).slice(8,-1)!==`Array`)throw Error(`No options defined.`);for(a=0,s=i.length;a<s;++a)if(c=i[a],c.heading==null){if(l=c.option,t[l]!=null)throw Error(`Option '`+l+`' already defined.`);for(u in d=e.defaults)f=d[u],c[u]??(c[u]=f);if(c.type===`Boolean`&&(c.boolean??(c.boolean=!0)),c.parsedType==null){if(!c.type)throw Error(`No type defined for option '`+l+`'.`);try{p=(m=e.typeAliases[c.type])??c.type,c.parsedType=b(p)}catch(e){throw h=e,Error(`Option '`+l+`': Error parsing type '`+c.type+`': `+h.message)}}if(c.default)try{n[l]=x(c.parsedType,c.default)}catch(e){throw h=e,Error(`Option '`+l+`': Error parsing default value '`+c.default+`' for type '`+c.type+`': `+h.message)}if(c.enum&&!c.parsedPossiblities){for(g=[],_=c.parsedType,v=0,y=(d=c.enum).length;v<y;++v){S=d[v];try{g.push(x(_,S))}catch(e){throw h=e,Error(`Option '`+l+`': Error parsing enum value '`+S+`' for type '`+c.type+`': `+h.message)}}c.parsedPossibilities=g}if(m=c.dependsOn){if(m.length){if(d=[].concat(c.dependsOn),C=d[0],w=D.call(d,1),E=C.toLowerCase(),w.length){if(E===`and`||E===`or`)c.dependsOn=[E].concat(k(w));else throw Error(`Option '`+l+`': If you have more than one dependency, you must specify either 'and' or 'or'`)}else(d=E.toLowerCase())===`and`||d===`or`?c.dependsOn=null:c.dependsOn=[`and`,C]}else c.dependsOn=null}if(c.required&&r.push(l),t[l]=c,c.concatRepeatedArrays!=null){if(O=c.concatRepeatedArrays,T.call(O).slice(8,-1)===`Boolean`)c.concatRepeatedArrays=[O,{}];else if(O.length===1)c.concatRepeatedArrays=[O[0],{}];else if(O.length!==2)throw Error(`Invalid setting for concatRepeatedArrays`)}if(c.alias||c.aliases){if(l===`NUM`)throw Error(`-NUM option can't have aliases.`);for(c.alias&&(c.aliases??(c.aliases=[].concat(c.alias))),v=0,y=(d=c.aliases).length;v<y;++v){if(A=d[v],t[A]!=null)throw Error(`Option '`+A+`' already defined.`);t[A]=c}d=o(N,c.aliases),j=d[0],M=d[1],c.shortNames??(c.shortNames=j),c.longNames??(c.longNames=M)}(!c.aliases||c.shortNames.length===0)&&c.type===`Boolean`&&c.default===`true`&&(c.negateName=!0)}function N(e){return e.length===1}},a(e.options),c=function(e){var n=t[e],r;if(n==null)throw r=p(l(t),e),Error(`Invalid option '`+m(e)+`'`+(r?` - perhaps you meant '`+m(r)+`'?`:`.`));return n},u=function(a,o){var l=(o??{}).slice,u={},d=[],p=!1,_=!1,v=null,b=function(e,t){var n=c(e),r,a,o;if(n.boolean)r=t;else{try{a=n.concatRepeatedArrays,r=a!=null&&a[0]&&a[1].oneValuePerFlag&&n.parsedType.length===1&&n.parsedType[0].structure===`array`?[x(n.parsedType[0].of,t)]:x(n.parsedType,t)}catch{throw Error(`Invalid value for option '`+e+`' - expected type `+n.type+`, received value: `+t+`.`)}if(n.enum&&!i(function(e){return f(e,r)},n.parsedPossibilities))throw Error(`Option `+e+`: '`+r+`' not one of `+g(n.enum)+`.`)}o=T.call(u[e]).slice(8,-1),u[e]==null?u[e]=r:n.concatRepeatedArrays!=null&&n.concatRepeatedArrays[0]&&o===`Array`?u[e]=u[e].concat(r):n.mergeRepeatedObjects&&o===`Object`?j(u[e],r):u[e]=r,n.restPositional&&(p=!0),n.overrideRequired&&(_=!0)},w=function(){var e,t,r;for(e in t=n)r=t[e],u[e]??(u[e]=r)},E=function(){var e,t,n,i;if(!_){for(e=0,n=(t=r).length;e<n;++e)if(i=t[e],!u[i])throw Error(`Option `+m(i)+` is required.`)}},O=function(e,t){throw Error(`The options `+m(e)+` and `+m(t)+` are mutually exclusive - you cannot use them at the same time.`)},k=function(){var t=e.mutuallyExclusive,n,r,i,a,o,s,c,l,d,f;if(t)for(n=0,r=t.length;n<r;++n)for(i=t[n],a=null,o=0,s=i.length;o<s;++o)if(c=i[o],T.call(c).slice(8,-1)===`Array`){for(l=0,d=c.length;l<d;++l)if(f=c[l],f in u){if(a!=null)O(a,f);else{a=f;break}}}else c in u&&(a==null?a=c:O(a,c))},A=function(e){var t=e.dependsOn,n,r,i,a,o,s;if(!t||e.dependenciesMet)return!0;for(n=t[0],r=D.call(t,1),i=0,a=r.length;i<a;++i)if(o=r[i],s=u[o],s&&A(s)){if(n===`or`)return!0}else if(n===`and`)throw Error(`The option '`+e.option+`' did not have its dependencies met.`);if(n===`and`)return!0;throw Error(`The option '`+e.option+`' did not meet any of its dependencies.`)},M=function(){for(var e in u)A(t[e])},N=function(){if(v)throw Error(`Value for '`+v+`' of type '`+c(v).type+`' required.`)},P,F,I,L,R,z,B,V,H,U,W,G,K,q,J,ee,Y,X,te,ne,Z,Q,$,re,ie;switch(T.call(a).slice(8,-1)){case`String`:P=C(a.slice(l??0));break;case`Array`:P=a.slice(l??2);break;case`Object`:for(F in u={},a)if(I=a[F],F!==`_`){if(L=c(h(F)),y(L.parsedType,I))u[L.option]=I;else throw Error(`Option '`+L.option+`': Invalid type for '`+I+`' - expected type '`+L.type+`'.`)}return k(),M(),w(),E(),R=S(u),R._=a._||[],R;default:throw Error(`Invalid argument to 'parse': `+a+`.`)}for(z=0,B=P.length;z<B;++z)if(V=P[z],V===`--`)p=!0;else if(p)d.push(V);else if(H=V.match(/^(--?)([a-zA-Z][-a-zA-Z0-9]*)(=)?(.*)?$/)){if(U=H,N(),W=U[1].length===1,G=U[2],K=U[3]!=null,q=U[4],K&&q==null)throw Error(`No value for '`+G+`' specified.`);if(W)for(J=s(G),ee=J.length,Y=0,X=J.length;Y<X;++Y)if(te=Y,ne=J[Y],Z=c(ne),Q=Z.option,p)d.push(ne);else if(te===ee-1)K?($=Z.boolean?x([{type:`Boolean`}],q):q,b(Q,$)):Z.boolean?b(Q,!0):v=Q;else if(Z.boolean)b(Q,!0);else throw Error(`Can't set argument '`+ne+`' when not last flag in a group of short flags.`);else if(re=!1,(H=G.match(/^no-(.+)$/))?(re=!0,ie=H[1],Z=c(ie)):Z=c(G),Q=Z.option,Z.boolean)$=!K||x([{type:`Boolean`}],q),re?b(Q,!$):b(Q,$);else{if(re)throw Error(`Only use 'no-' prefix for Boolean options, not with '`+ie+`'.`);K?b(Q,q):v=Q}}else if(H=V.match(/^-([0-9]+(?:\.[0-9]+)?)$/)){if(Z=t.NUM,!Z)throw Error(`No -NUM option defined.`);b(Z.option,H[1])}else v?(b(v,V),v=null):(d.push(V),e.positionalAnywhere||(p=!0));return N(),k(),M(),w(),E(),R=S(u),R._=d,R},{parse:u,parseArgv:function(e){return u(e,{slice:2})},generateHelp:_(e),generateHelpForOption:v(c,e)}},w.VERSION=e,t.exports=w;function j(e,t){var n={}.hasOwnProperty;for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e}}).call(e)})),M=/* @__PURE__ */ t(((e,t)=>{let n=j();t.exports=function(){return n({prepend:`eslint [options] file.js [file.js] [dir]`,defaults:{concatRepeatedArrays:!0,mergeRepeatedObjects:!0},options:[{heading:`Basic configuration`},{option:`config-lookup`,type:`Boolean`,default:`true`,description:`Disable look up for eslint.config.*`},{option:`config`,alias:`c`,type:`path::String`,description:`Use this configuration instead of eslint.config.* look up`},{option:`inspect-config`,type:`Boolean`,description:`Open the config inspector with the current configuration`},{option:`ext`,type:`[String]`,description:`Specify additional file extensions to lint`},{option:`global`,type:`[String]`,description:`Define global variables`},{option:`parser`,type:`String`,description:`Specify the parser to be used`},{option:`parser-options`,type:`Object`,description:`Specify parser options`},{heading:`Specify Rules and Plugins`},{option:`plugin`,type:`[String]`,description:`Specify plugins`},{option:`rule`,type:`Object`,description:`Specify rules`},{heading:`Fix Problems`},{option:`fix`,type:`Boolean`,default:!1,description:`Automatically fix problems`},{option:`fix-dry-run`,type:`Boolean`,default:!1,description:`Automatically fix problems without saving the changes to the file system`},{option:`fix-type`,type:`Array`,description:`Specify the types of fixes to apply (directive, problem, suggestion, layout)`},{heading:`Ignore Files`},{option:`ignore`,type:`Boolean`,default:`true`,description:`Disable use of ignore files and patterns`},{option:`ignore-pattern`,type:`[String]`,description:`Patterns of files to ignore`,concatRepeatedArrays:[!0,{oneValuePerFlag:!0}]},{heading:`Use stdin`},{option:`stdin`,type:`Boolean`,default:`false`,description:`Lint code provided on <STDIN>`},{option:`stdin-filename`,type:`String`,description:`Specify filename to process STDIN as`},{heading:`Handle Warnings`},{option:`quiet`,type:`Boolean`,default:`false`,description:`Report errors only`},{option:`max-warnings`,type:`Int`,default:`-1`,description:`Number of warnings to trigger nonzero exit code`},{heading:`Output`},{option:`output-file`,alias:`o`,type:`path::String`,description:`Specify file to write report to`},{option:`format`,alias:`f`,type:`String`,default:`stylish`,description:`Use a specific output format`},{option:`color`,type:`Boolean`,alias:`no-color`,description:`Force enabling/disabling of color`},{heading:`Inline configuration comments`},{option:`inline-config`,type:`Boolean`,default:`true`,description:`Prevent comments from changing config or rules`},{option:`report-unused-disable-directives`,type:`Boolean`,default:void 0,description:`Adds reported errors for unused eslint-disable and eslint-enable directives`},{option:`report-unused-disable-directives-severity`,type:`String`,default:void 0,description:`Chooses severity level for reporting unused eslint-disable and eslint-enable directives`,enum:[`off`,`warn`,`error`,`0`,`1`,`2`]},{option:`report-unused-inline-configs`,type:`String`,default:void 0,description:`Adds reported errors for unused eslint inline config comments`,enum:[`off`,`warn`,`error`,`0`,`1`,`2`]},{heading:`Caching`},{option:`cache`,type:`Boolean`,default:`false`,description:`Only check changed files`},{option:`cache-file`,type:`path::String`,default:`.eslintcache`,description:`Path to the cache file. Deprecated: use --cache-location`},{option:`cache-location`,type:`path::String`,description:`Path to the cache file or directory`},{option:`cache-strategy`,dependsOn:[`cache`],type:`String`,default:`metadata`,enum:[`metadata`,`content`],description:`Strategy to use for detecting changed files in the cache`},{heading:`Suppressing Violations`},{option:`suppress-all`,type:`Boolean`,default:`false`,description:`Suppress all violations`},{option:`suppress-rule`,type:`[String]`,description:`Suppress specific rules`},{option:`suppressions-location`,type:`path::String`,description:`Specify the location of the suppressions file`},{option:`prune-suppressions`,type:`Boolean`,default:`false`,description:`Prune unused suppressions`},{option:`pass-on-unpruned-suppressions`,type:`Boolean`,default:`false`,description:`Ignore unused suppressions`},{heading:`Miscellaneous`},{option:`init`,type:`Boolean`,default:`false`,description:`Run config initialization wizard`},{option:`env-info`,type:`Boolean`,default:`false`,description:`Output execution environment information`},{option:`error-on-unmatched-pattern`,type:`Boolean`,default:`true`,description:`Prevent errors when pattern is unmatched`},{option:`exit-on-fatal-error`,type:`Boolean`,default:`false`,description:`Exit with exit code 2 in case of fatal error`},{option:`warn-ignored`,type:`Boolean`,default:`true`,description:`Suppress warnings when the file list includes ignored files`},{option:`pass-on-no-patterns`,type:`Boolean`,default:!1,description:`Exit with exit code 0 in case no file patterns are passed`},{option:`debug`,type:`Boolean`,default:!1,description:`Output debugging information`},{option:`help`,alias:`h`,type:`Boolean`,description:`Show help`},{option:`version`,alias:`v`,type:`Boolean`,description:`Output the version number`},{option:`print-config`,type:`path::String`,description:`Print the configuration for the given file`},{option:`stats`,type:`Boolean`,default:`false`,description:`Add statistics to the lint report`},{option:`flag`,type:`[String]`,description:`Enable a feature flag`},{option:`mcp`,type:`Boolean`,description:`Start the ESLint MCP server`},{option:`concurrency`,type:`Int|String`,default:`off`,description:`Number of linting threads, auto to choose automatically, off for no multithreading`}]})}})),N=/* @__PURE__ */ t(((e,t)=>{
17
17
  /* c8 ignore next */
18
- t.exports={info(...e){console.log(...e)},warn(...e){console.warn(...e)},error(...e){console.error(...e)}}})),F=/* @__PURE__ */ t(((t,r)=>{let i=e(`node:path`),a=E(),o=e(`node:os`),s=P(),c=n();function l(){let e=/* @__PURE__ */ new Map;function t(e,t){return!i.relative(e,t).startsWith(`..`)}function n(t,n){let r=[t,...n].join(` `);if(e.has(r))return e.get(r);let i=a.sync(t,n,{encoding:`utf8`});if(i.error)throw i.error;let o=i.stdout.trim();return e.set(r,o),o}function r(e){return e.startsWith(`v`)?e:`v${e}`}function c(e){let t=[`--version`];try{return r(n(e,t))}catch(n){throw s.error(`Error finding ${e} version running the command \`${e} ${t.join(` `)}\``),n}}function l(e,{global:i=!1}={}){let a=[`bin`,`-g`],o=[`ls`,`--depth=0`,`--json`,e];i&&o.push(`-g`);try{let e=JSON.parse(n(`npm`,o));if(Object.keys(e).length===0||!(e.dependencies&&e.dependencies.eslint))return`Not found`;let[,c]=process.argv,l;try{l=n(`npm`,a)}catch(e){throw s.error(`Error finding npm binary path when running command \`npm ${a.join(` `)}\``),e}let u=t(l,c),d=e.dependencies.eslint.version;return(i&&u||!i&&!u)&&(d+=` (Currently used)`),r(d)}catch(t){throw s.error(`Error finding ${e} version running the command \`npm ${o.join(` `)}\``),t}}return[`Environment Info:`,``,`Node version: ${process.version}`,`npm version: ${c(`npm`)}`,`Local ESLint version: ${l(`eslint`,{global:!1})}`,`Global ESLint version: ${l(`eslint`,{global:!0})}`,`Operating System: ${o.platform()} ${o.release()}`].join(`
19
- `)}function u(){return`v${c.version}`}r.exports={__esModule:!0,environment:l,version:u}})),I=/* @__PURE__ */ t((t=>{let{createRequire:n}=e(`module`),{pathToFileURL:r}=e(`url`),i=/* @__PURE__ */ new Set([`/`,`\\`]);function a(e){return i.has(e[e.length-1])?e:e+`/`}t.ModuleImporter=class{constructor(e=process.cwd()){this.cwd=a(e)}resolve(e){return n(this.cwd).resolve(e)}import(e){let t=this.resolve(e);return import(r(t).href)}}})),L=/* @__PURE__ */ t(((e,t)=>{let{normalizeSeverityToString:n}=s(),{getShorthandName:r,normalizePackageName:i}=a(),{ModuleImporter:o}=I();async function c(e,t){let n={};return await Promise.all(t.map(async t=>{let a=i(t,`eslint-plugin`),o=await e.import(a);if(!(`default`in o))throw Error(`"${a}" cannot be used with the \`--plugin\` option because its default module does not provide a \`default\` export`);let s=r(t,`eslint-plugin`);n[s]=o.default})),n}function l(e){return e.severity===2}function u(e){return e.severity===2}async function d({cache:e,cacheFile:t,cacheLocation:r,cacheStrategy:i,concurrency:a,config:s,configLookup:d,errorOnUnmatchedPattern:f,ext:p,fix:m,fixDryRun:h,fixType:g,flag:_,global:v,ignore:y,ignorePattern:b,inlineConfig:x,parser:S,parserOptions:C,plugin:w,quiet:T,reportUnusedDisableDirectives:E,reportUnusedDisableDirectivesSeverity:D,reportUnusedInlineConfigs:O,rule:k,stats:A,warnIgnored:j,passOnNoPatterns:M,maxWarnings:N}){let P=new o,F=typeof s==`string`?s:!d;F===!1&&(F=void 0);let I={};v&&(I.globals=v.reduce((e,t)=>(t.endsWith(`:true`)?e[t.slice(0,-5)]=`writable`:e[t]=`readonly`,e),{})),C&&(I.parserOptions=C),S&&(I.parser=await P.import(S));let L=[{...Object.keys(I).length>0?{languageOptions:I}:{},rules:k||{}}];return(E||D!==void 0)&&(L[0].linterOptions={reportUnusedDisableDirectives:E?`error`:n(D)}),O!==void 0&&(L[0].linterOptions={...L[0].linterOptions,reportUnusedInlineConfigs:n(O)}),w&&(L[0].plugins=await c(P,w)),p&&L.push({files:p.map(e=>`**/*${e.startsWith(`.`)?``:`.`}${e}`)}),{allowInlineConfig:x,cache:e,cacheLocation:r||t,cacheStrategy:i,concurrency:a,errorOnUnmatchedPattern:f,fix:(m||h)&&(!T||l),fixTypes:g,flags:_,ignore:y,ignorePatterns:b,overrideConfig:L,overrideConfigFile:F,passOnNoPatterns:M,ruleFilter:T&&N===-1?u:()=>!0,stats:A,warnIgnored:j}}t.exports=d})),R=/* @__PURE__ */ t(((t,n)=>{r();let i=e(`node:fs`),{mkdir:a,stat:s,writeFile:u}=e(`node:fs/promises`),p=e(`node:path`),{pathToFileURL:m}=e(`node:url`),{ESLint:h,locateConfigFileToUse:g}=l(),_=N(),v=P(),y=F(),b=L(),{getCacheFile:x}=o(),{SuppressionsService:S}=c(),C=d()(`eslint:cli`);function w(e){let t=0,n=0,r=0;for(let i of e)t+=i.errorCount,n+=i.fatalErrorCount,r+=i.warningCount;return{errorCount:t,fatalErrorCount:n,warningCount:r}}function T(e){let t=new URL(`./shared/translate-cli-options.js`,m(f)).href,n=`import translateOptions from ${JSON.stringify(t)};\nexport default await translateOptions(${JSON.stringify(e)});\n`;return new URL(`data:text/javascript;base64,${Buffer.from(n).toString(`base64`)}`)}async function D(e){try{return(await s(e)).isDirectory()}catch(e){if(e.code===`ENOENT`||e.code===`ENOTDIR`)return!1;throw e}}async function O(e,t,n,r,i){let o;try{o=await e.loadFormatter(n)}catch(e){return v.error(e.message),!1}let s=await o.format(t,i);if(r){let e=p.resolve(process.cwd(),r);if(await D(e))return v.error(`Cannot write to output file path, it is a directory: %s`,r),!1;try{await a(p.dirname(e),{recursive:!0}),await u(e,s)}catch(e){return v.error(`There was a problem writing the output file:
20
- %s`,e),!1}}else s&&v.info(s);return!0}function k(e){if(e===void 0||e===`auto`||e===`off`)return;let t=Number(e);if(!Number.isInteger(t)||t<1)throw Error(`Option concurrency: '${e}' is not a positive integer, 'auto' or 'off'.`)}let A={async calculateInspectConfigFlags(e){let{configFilePath:t,basePath:n}=await g({cwd:process.cwd(),configFile:e});return[`--config`,t,`--basePath`,n]},async execute(e,t){Array.isArray(e)&&C(`CLI args: %o`,e.slice(2));let n=_(),r;try{r=n.parse(e),k(r.concurrency)}catch(e){return v.error(e.message),2}let a=r._,o=typeof t==`string`;if(r.help)return v.info(n.generateHelp()),0;if(r.version)return v.info(y.version()),0;if(r.envInfo)try{return v.info(y.environment()),0}catch(e){return C(`Error retrieving environment info`),v.error(e.message),2}if(r.printConfig){if(a.length)return v.error(`The --print-config option must be used with exactly one file name.`),2;if(o)return v.error(`The --print-config option is not available for piped-in code.`),2;let e=await new h(await b(r)).calculateConfigForFile(r.printConfig);return v.info(JSON.stringify(e,null,` `)),0}if(r.inspectConfig){v.info(`You can also run this command directly using 'npx @eslint/config-inspector@latest' in the same directory as your configuration file.`);try{let e=await b(r),t=E(),n=await A.calculateInspectConfigFlags(e.overrideConfigFile);t.sync(`npx`,[`@eslint/config-inspector@latest`,...n],{encoding:`utf8`,stdio:`inherit`})}catch(e){return v.error(e),2}return 0}if(C(`Running on %s`,o?`text`:`files`),r.fix&&r.fixDryRun)return v.error(`The --fix option and the --fix-dry-run option cannot be used together.`),2;if(o&&r.fix)return v.error(`The --fix option is not available for piped-in code; use --fix-dry-run instead.`),2;if(r.fixType&&!r.fix&&!r.fixDryRun)return v.error(`The --fix-type option requires either --fix or --fix-dry-run.`),2;if(r.reportUnusedDisableDirectives&&r.reportUnusedDisableDirectivesSeverity!==void 0)return v.error(`The --report-unused-disable-directives option and the --report-unused-disable-directives-severity option cannot be used together.`),2;if(r.ext){if(r.ext.length===0)return v.error(`The --ext option value cannot be empty.`),2;let e=r.ext.indexOf(``);if(e>=0)return v.error(`The --ext option arguments cannot be empty strings. Found an empty string at index ${e}.`),2}if(r.suppressAll&&r.suppressRule)return v.error(`The --suppress-all option and the --suppress-rule option cannot be used together.`),2;if(r.suppressAll&&r.pruneSuppressions)return v.error(`The --suppress-all option and the --prune-suppressions option cannot be used together.`),2;if(r.suppressRule&&r.pruneSuppressions)return v.error(`The --suppress-rule option and the --prune-suppressions option cannot be used together.`),2;if(o&&(r.suppressAll||r.suppressRule||r.pruneSuppressions))return v.error(`The --suppress-all, --suppress-rule, and --prune-suppressions options cannot be used with piped-in code.`),2;let s;if(r.concurrency!==`off`){let e=T(r);s=await h.fromOptionsModule(e)}else{let e=await b(r);s=new h(e)}let c;c=o?await s.lintText(t,{filePath:r.stdinFilename}):await s.lintFiles(a),r.fix&&(C(`Fix mode enabled - applying fixes`),await h.outputFixes(c));let l={};if(!o){let e=x(r.suppressionsLocation||S.DEFAULT_SUPPRESSIONS_FILENAME,process.cwd(),{prefix:`suppressions_`});if(r.suppressionsLocation&&!i.existsSync(e)&&!r.suppressAll&&!r.suppressRule)return v.error("The suppressions file does not exist. Please run the command with `--suppress-all` or `--suppress-rule` to create it."),2;if(r.suppressAll||r.suppressRule||r.pruneSuppressions||i.existsSync(e)){let t=new S({filePath:e,cwd:process.cwd()});(r.suppressAll||r.suppressRule)&&await t.suppress(c,r.suppressRule),r.pruneSuppressions&&await t.prune(c);let n=t.applySuppressions(c,await t.load());c=n.results,l=n.unused}}let u=c;r.quiet&&(C(`Quiet mode enabled - filtering out warnings`),u=h.getErrorResults(u));let d=w(c),f=r.maxWarnings>=0&&d.warningCount>r.maxWarnings,p={};if(r.color!==void 0&&(C(`Color setting for output: %s`,r.color),p.color=r.color),f&&(p.maxWarningsExceeded={maxWarnings:r.maxWarnings,foundWarnings:d.warningCount}),await O(s,u,r.format,r.outputFile,p)){let e=r.exitOnFatalError&&d.fatalErrorCount>0;return!d.errorCount&&f&&v.error(`ESLint found too many warnings (maximum: %s).`,r.maxWarnings),!r.passOnUnprunedSuppressions&&Object.keys(l).length>0?(v.error("There are suppressions left that do not occur anymore. To resolve this, re-run the command with `--prune-suppressions` to remove unused suppressions. To ignore unused suppressions, use `--pass-on-unpruned-suppressions`."),C(`%O`,l),2):e?2:d.errorCount||f?1:0}return 2}};n.exports=A})),z=/* @__PURE__ */ t((()=>{e(`node:module`).enableCompileCache?.(),process.argv.includes(`--debug`)&&d().enable(`eslint:*,-eslint:code-path,eslintrc:*`);function t(){return new Promise((e,t)=>{let n=``,r=``;process.stdin.setEncoding(`utf8`).on(`readable`,()=>{for(;(r=process.stdin.read())!==null;)n+=r}).on(`end`,()=>e(n)).on(`error`,t)})}function r(e,t){let n=E().sync(e,t,{encoding:`utf8`,stdio:`inherit`});if(n.error)throw n.error;if(n.signal){process.kill(process.pid,n.signal);return}process.exitCode=n.status??0}function i(t){let n=e(`node:util`);if(typeof t!=`object`||!t)return String(t);if(typeof t.messageTemplate==`string`)try{return e(`../messages/${t.messageTemplate}.js`)(t.messageData||{})}catch{}return typeof t.stack==`string`?t.stack:n.format(`%o`,t)}let a=/* @__PURE__ */ new Set,o=!1;function s(e){process.exitCode=2,o=!0;let{version:t}=n(),r=`
18
+ t.exports={info(...e){console.log(...e)},warn(...e){console.warn(...e)},error(...e){console.error(...e)}}})),P=/* @__PURE__ */ t(((t,n)=>{let r=e(`node:path`),i=T(),a=e(`node:os`),o=N(),s=l();function c(){let e=/* @__PURE__ */ new Map;function t(e,t){return!r.relative(e,t).startsWith(`..`)}function n(t,n){let r=[t,...n].join(` `);if(e.has(r))return e.get(r);let a=i.sync(t,n,{encoding:`utf8`});if(a.error)throw a.error;let o=a.stdout.trim();return e.set(r,o),o}function s(e){return e.startsWith(`v`)?e:`v${e}`}function c(e){let t=[`--version`];try{return s(n(e,t))}catch(n){throw o.error(`Error finding ${e} version running the command \`${e} ${t.join(` `)}\``),n}}function l(e,{global:r=!1}={}){let i=[`bin`,`-g`],a=[`ls`,`--depth=0`,`--json`,e];r&&a.push(`-g`);try{let e=JSON.parse(n(`npm`,a));if(Object.keys(e).length===0||!(e.dependencies&&e.dependencies.eslint))return`Not found`;let[,c]=process.argv,l;try{l=n(`npm`,i)}catch(e){throw o.error(`Error finding npm binary path when running command \`npm ${i.join(` `)}\``),e}let u=t(l,c),d=e.dependencies.eslint.version;return(r&&u||!r&&!u)&&(d+=` (Currently used)`),s(d)}catch(t){throw o.error(`Error finding ${e} version running the command \`npm ${a.join(` `)}\``),t}}return[`Environment Info:`,``,`Node version: ${process.version}`,`npm version: ${c(`npm`)}`,`Local ESLint version: ${l(`eslint`,{global:!1})}`,`Global ESLint version: ${l(`eslint`,{global:!0})}`,`Operating System: ${a.platform()} ${a.release()}`].join(`
19
+ `)}function u(){return`v${s.version}`}n.exports={__esModule:!0,environment:c,version:u}})),F=/* @__PURE__ */ t(((t,a)=>{n();let c=e(`node:fs`),{mkdir:l,stat:u,writeFile:p}=e(`node:fs/promises`),m=e(`node:path`),{pathToFileURL:h}=e(`node:url`),{ESLint:g,locateConfigFileToUse:_}=d(),v=M(),y=N(),b=P(),x=f(),{getCacheFile:S}=s(),{SuppressionsService:C}=o(),w=i()(`eslint:cli`);function E(e){let t=0,n=0,r=0;for(let i of e)t+=i.errorCount,n+=i.fatalErrorCount,r+=i.warningCount;return{errorCount:t,fatalErrorCount:n,warningCount:r}}function D(e){let t=new URL(`./shared/translate-cli-options.js`,h(r)).href,n=`import translateOptions from ${JSON.stringify(t)};\nexport default await translateOptions(${JSON.stringify(e)});\n`;return new URL(`data:text/javascript;base64,${Buffer.from(n).toString(`base64`)}`)}async function O(e){try{return(await u(e)).isDirectory()}catch(e){if(e.code===`ENOENT`||e.code===`ENOTDIR`)return!1;throw e}}async function k(e,t,n,r,i){let a;try{a=await e.loadFormatter(n)}catch(e){return y.error(e.message),!1}let o=await a.format(t,i);if(r){let e=m.resolve(process.cwd(),r);if(await O(e))return y.error(`Cannot write to output file path, it is a directory: %s`,r),!1;try{await l(m.dirname(e),{recursive:!0}),await p(e,o)}catch(e){return y.error(`There was a problem writing the output file:
20
+ %s`,e),!1}}else o&&y.info(o);return!0}function A(e){if(e===void 0||e===`auto`||e===`off`)return;let t=Number(e);if(!Number.isInteger(t)||t<1)throw Error(`Option concurrency: '${e}' is not a positive integer, 'auto' or 'off'.`)}let j={async calculateInspectConfigFlags(e){let{configFilePath:t,basePath:n}=await _({cwd:process.cwd(),configFile:e});return[`--config`,t,`--basePath`,n]},async execute(e,t){Array.isArray(e)&&w(`CLI args: %o`,e.slice(2));let n=v(),r;try{r=n.parse(e),A(r.concurrency)}catch(e){return y.error(e.message),2}let i=r._,a=typeof t==`string`;if(r.help)return y.info(n.generateHelp()),0;if(r.version)return y.info(b.version()),0;if(r.envInfo)try{return y.info(b.environment()),0}catch(e){return w(`Error retrieving environment info`),y.error(e.message),2}if(r.printConfig){if(i.length)return y.error(`The --print-config option must be used with exactly one file name.`),2;if(a)return y.error(`The --print-config option is not available for piped-in code.`),2;let e=await new g(await x(r)).calculateConfigForFile(r.printConfig);return y.info(JSON.stringify(e,null,` `)),0}if(r.inspectConfig){y.info(`You can also run this command directly using 'npx @eslint/config-inspector@latest' in the same directory as your configuration file.`);try{let e=await x(r),t=T(),n=await j.calculateInspectConfigFlags(e.overrideConfigFile);t.sync(`npx`,[`@eslint/config-inspector@latest`,...n],{encoding:`utf8`,stdio:`inherit`})}catch(e){return y.error(e),2}return 0}if(w(`Running on %s`,a?`text`:`files`),r.fix&&r.fixDryRun)return y.error(`The --fix option and the --fix-dry-run option cannot be used together.`),2;if(a&&r.fix)return y.error(`The --fix option is not available for piped-in code; use --fix-dry-run instead.`),2;if(r.fixType&&!r.fix&&!r.fixDryRun)return y.error(`The --fix-type option requires either --fix or --fix-dry-run.`),2;if(r.reportUnusedDisableDirectives&&r.reportUnusedDisableDirectivesSeverity!==void 0)return y.error(`The --report-unused-disable-directives option and the --report-unused-disable-directives-severity option cannot be used together.`),2;if(r.ext){if(r.ext.length===0)return y.error(`The --ext option value cannot be empty.`),2;let e=r.ext.indexOf(``);if(e>=0)return y.error(`The --ext option arguments cannot be empty strings. Found an empty string at index ${e}.`),2}if(r.suppressAll&&r.suppressRule)return y.error(`The --suppress-all option and the --suppress-rule option cannot be used together.`),2;if(r.suppressAll&&r.pruneSuppressions)return y.error(`The --suppress-all option and the --prune-suppressions option cannot be used together.`),2;if(r.suppressRule&&r.pruneSuppressions)return y.error(`The --suppress-rule option and the --prune-suppressions option cannot be used together.`),2;if(a&&(r.suppressAll||r.suppressRule||r.pruneSuppressions))return y.error(`The --suppress-all, --suppress-rule, and --prune-suppressions options cannot be used with piped-in code.`),2;let o;if(r.concurrency!==`off`){let e=D(r);o=await g.fromOptionsModule(e)}else{let e=await x(r);o=new g(e)}let s;s=a?await o.lintText(t,{filePath:r.stdinFilename}):await o.lintFiles(i),r.fix&&(w(`Fix mode enabled - applying fixes`),await g.outputFixes(s));let l={};if(!a){let e=S(r.suppressionsLocation||C.DEFAULT_SUPPRESSIONS_FILENAME,process.cwd(),{prefix:`suppressions_`});if(r.suppressionsLocation&&!c.existsSync(e)&&!r.suppressAll&&!r.suppressRule)return y.error("The suppressions file does not exist. Please run the command with `--suppress-all` or `--suppress-rule` to create it."),2;if(r.suppressAll||r.suppressRule||r.pruneSuppressions||c.existsSync(e)){let t=new C({filePath:e,cwd:process.cwd()});(r.suppressAll||r.suppressRule)&&await t.suppress(s,r.suppressRule),r.pruneSuppressions&&await t.prune(s);let n=t.applySuppressions(s,await t.load());s=n.results,l=n.unused}}let u=s;r.quiet&&(w(`Quiet mode enabled - filtering out warnings`),u=g.getErrorResults(u));let d=E(s),f=r.maxWarnings>=0&&d.warningCount>r.maxWarnings,p={};if(r.color!==void 0&&(w(`Color setting for output: %s`,r.color),p.color=r.color),f&&(p.maxWarningsExceeded={maxWarnings:r.maxWarnings,foundWarnings:d.warningCount}),await k(o,u,r.format,r.outputFile,p)){let e=r.exitOnFatalError&&d.fatalErrorCount>0;return!d.errorCount&&f&&y.error(`ESLint found too many warnings (maximum: %s).`,r.maxWarnings),!r.passOnUnprunedSuppressions&&Object.keys(l).length>0?(y.error("There are suppressions left that do not occur anymore. To resolve this, re-run the command with `--prune-suppressions` to remove unused suppressions. To ignore unused suppressions, use `--pass-on-unpruned-suppressions`."),w(`%O`,l),2):e?2:d.errorCount||f?1:0}return 2}};a.exports=j})),I=/* @__PURE__ */ t((()=>{e(`node:module`).enableCompileCache?.(),process.argv.includes(`--debug`)&&i().enable(`eslint:*,-eslint:code-path,eslintrc:*`);function t(){return new Promise((e,t)=>{let n=``,r=``;process.stdin.setEncoding(`utf8`).on(`readable`,()=>{for(;(r=process.stdin.read())!==null;)n+=r}).on(`end`,()=>e(n)).on(`error`,t)})}function n(e,t){let n=T().sync(e,t,{encoding:`utf8`,stdio:`inherit`});if(n.error)throw n.error;if(n.signal){process.kill(process.pid,n.signal);return}process.exitCode=n.status??0}function r(t){let n=e(`node:util`);if(typeof t!=`object`||!t)return String(t);if(typeof t.messageTemplate==`string`)try{return e(`../messages/${t.messageTemplate}.js`)(t.messageData||{})}catch{}return typeof t.stack==`string`?t.stack:n.format(`%o`,t)}let a=/* @__PURE__ */ new Set,o=!1;function s(e){process.exitCode=2,o=!0;let{version:t}=l(),n=`
21
21
  Oops! Something went wrong! :(
22
22
 
23
23
  ESLint: ${t}
24
24
 
25
- ${i(e)}`;a.has(r)||(console.error(r),a.add(r))}(async function(){if(process.on(`uncaughtException`,s),process.on(`unhandledRejection`,s),process.argv.includes(`--init`)){console.warn(`You can also run this command directly using 'npm init @eslint/config@latest'.`),r(`npm`,[`init`,`@eslint/config@latest`]);return}if(process.argv.includes(`--mcp`)){console.warn(`You can also run this command directly using 'npx @eslint/mcp@latest'.`),r(`npx`,[`@eslint/mcp@latest`]);return}let e=await R().execute(process.argv,process.argv.includes(`--stdin`)?await t():void 0);o||(process.exitCode=e)})().catch(s)}));export default z();export{};
25
+ ${r(e)}`;a.has(n)||(console.error(n),a.add(n))}(async function(){if(process.on(`uncaughtException`,s),process.on(`unhandledRejection`,s),process.argv.includes(`--init`)){console.warn(`You can also run this command directly using 'npm init @eslint/config@latest'.`),n(`npm`,[`init`,`@eslint/config@latest`]);return}if(process.argv.includes(`--mcp`)){console.warn(`You can also run this command directly using 'npx @eslint/mcp@latest'.`),n(`npx`,[`@eslint/mcp@latest`]);return}let e=await F().execute(process.argv,process.argv.includes(`--stdin`)?await t():void 0);o||(process.exitCode=e)})().catch(s)}));export default I();export{};