eslint-formatter-sukka 6.18.0 → 6.18.2

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.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var e,r,t,n,i,o,l=require("node:path"),a=require("node:process"),s=require("picocolors"),u=require("os"),c=require("tty"),f=require("ci-info"),p=require("node:url"),d=require("node:os");function h(e){var r=Object.create(null);return e&&Object.keys(e).forEach(function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}}),r.default=e,Object.freeze(r)}var m=h(u),E=h(c);const y=e=>161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,O=e=>12288===e||e>=65281&&e<=65376||e>=65504&&e<=65510,g=e=>e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9800&&e<=9811||9855===e||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||94192===e||94193===e||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,I=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,x=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,C=/\t{1,1000}/y,b=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,M=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,R=/\p{M}+/gu,v={limit:1/0,ellipsis:""},j=(e,r={},t={})=>{let n=r.limit??1/0,i=r.ellipsis??"",o=r?.ellipsisWidth??(i?j(i,v,t).width:0),l=t.ansiWidth??0,a=t.controlWidth??0,s=t.tabWidth??8,u=t.ambiguousWidth??1,c=t.emojiWidth??2,f=t.fullWidthWidth??2,p=t.regularWidth??1,d=t.wideWidth??2,h=0,m=0,E=e.length,T=0,_=!1,F=E,w=Math.max(0,n-o),A=0,P=0,W=0,k=0;e:for(;;){if(P>A||m>=E&&m>h){for(let r of(T=0,(e.slice(A,P)||e.slice(h,m)).replaceAll(R,""))){let e=r.codePointAt(0)||0;if(W+(k=O(e)?f:g(e)?d:u!==p&&y(e)?u:p)>w&&(F=Math.min(F,Math.max(A,h)+T)),W+k>n){_=!0;break e}T+=r.length,W+=k}A=P=0}if(m>=E)break;if(M.lastIndex=m,M.test(e)){if(W+(k=(T=M.lastIndex-m)*p)>w&&(F=Math.min(F,m+Math.floor((w-W)/p))),W+k>n){_=!0;break}W+=k,A=h,P=m,m=h=M.lastIndex;continue}if(I.lastIndex=m,I.test(e)){if(W+l>w&&(F=Math.min(F,m)),W+l>n){_=!0;break}W+=l,A=h,P=m,m=h=I.lastIndex;continue}if(x.lastIndex=m,x.test(e)){if(W+(k=(T=x.lastIndex-m)*a)>w&&(F=Math.min(F,m+Math.floor((w-W)/a))),W+k>n){_=!0;break}W+=k,A=h,P=m,m=h=x.lastIndex;continue}if(C.lastIndex=m,C.test(e)){if(W+(k=(T=C.lastIndex-m)*s)>w&&(F=Math.min(F,m+Math.floor((w-W)/s))),W+k>n){_=!0;break}W+=k,A=h,P=m,m=h=C.lastIndex;continue}if(b.lastIndex=m,b.test(e)){if(W+c>w&&(F=Math.min(F,m)),W+c>n){_=!0;break}W+=c,A=h,P=m,m=h=b.lastIndex;continue}m+=1}return{width:_?w:W,index:_?F:E,truncated:_,ellipsed:_&&n>=o}},T={limit:1/0,ellipsis:"",ellipsisWidth:0},_=(e,r={})=>j(e,T,r).width;function F(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if("function"==typeof r){var t=function e(){return this instanceof e?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var w=F(m),A=F(E);function P(){return r?e:(r=1,e=(e,r=process.argv)=>{let t=e.startsWith("-")?"":1===e.length?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return -1!==n&&(-1===i||n<i)})}var W=function(){if(o)return i;o=1;let e=function(){let e;if(n)return t;n=1;let r=P(),{env:i}=process;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(t,n){if(0===e)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(t&&!n&&void 0===e)return 0;let o=e||0;if("dumb"===i.TERM)return o;if("win32"===process.platform){let e=w.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in i)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in i)||"codeship"===i.CI_NAME?1:o;if("TEAMCITY_VERSION"in i)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(i.TEAMCITY_VERSION);if("truecolor"===i.COLORTERM)return 3;if("TERM_PROGRAM"in i){let e=parseInt((i.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(i.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(i.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(i.TERM)||"COLORTERM"in i?1:o}return r("no-color")||r("no-colors")||r("color=false")||r("color=never")?e=0:(r("color")||r("colors")||r("color=true")||r("color=always"))&&(e=1),"FORCE_COLOR"in i&&(e="true"===i.FORCE_COLOR?1:"false"===i.FORCE_COLOR?0:0===i.FORCE_COLOR.length?1:Math.min(parseInt(i.FORCE_COLOR,10),3)),t={supportsColor:function(e){return o(l(e,e&&e.isTTY))},stdout:o(l(!0,A.isatty(1))),stderr:o(l(!0,A.isatty(2)))}}(),r=P();function l(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let r=(e||"").split(".").map(e=>parseInt(e,10));return{major:r[0],minor:r[1],patch:r[2]}}function a(t){let{CI:n,FORCE_HYPERLINK:i,NETLIFY:o,TEAMCITY_VERSION:a,TERM_PROGRAM:s,TERM_PROGRAM_VERSION:u,VTE_VERSION:c,TERM:f}=process.env;if(i)return!(i.length>0&&0===parseInt(i,10));if(r("no-hyperlink")||r("no-hyperlinks")||r("hyperlink=false")||r("hyperlink=never"))return!1;if(r("hyperlink=true")||r("hyperlink=always")||o)return!0;if(!e.supportsColor(t)||t&&!t.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if("win32"===process.platform||n||a)return!1;if(s){let e=l(u||"");switch(s){case"iTerm.app":if(3===e.major)return e.minor>=1;return e.major>3;case"WezTerm":return e.major>=0x1343cac;case"vscode":return e.major>1||1===e.major&&e.minor>=72;case"ghostty":return!0}}if(c){if("0.50.0"===c)return!1;let e=l(c);return e.major>0||e.minor>=50}return"alacritty"===f||!1}return i={supportsHyperlink:a,stdout:a(process.stdout),stderr:a(process.stderr)}}();function k(e,r,t={}){return"\x1b]8;"+Object.keys(t).map(e=>e+"="+t[e]).join(":")+";"+r+"\x07"+e+"\x1b]8;;\x07"}const L={type:"separator"};module.exports=(e,r)=>{let t=[],n=0,i=0,o=0,u=0,c=0,h={},m=0,E=0,y=0,O=!1;e.sort((e,r)=>e.errorCount===r.errorCount?r.warningCount-e.warningCount:0===e.errorCount?-1:0===r.errorCount?1:r.errorCount-e.errorCount).forEach(e=>{let{messages:r,filePath:a,usedDeprecatedRules:f}=e;if(0===r.length)return;n+=e.errorCount,i+=e.warningCount,o+=e.fatalErrorCount,u+=e.fixableWarningCount,c+=e.fixableErrorCount,f.forEach(e=>{var r;h[r=e.ruleId]||(h[r]=e.replacedBy)}),0!==t.length&&t.push(L);let p=r.find(({severity:e})=>2===e)||r[0];t.push({type:"header",filePath:a,relativeFilePath:l.relative(".",a),firstLineCol:`${p.line}:${p.column}`}),r.sort((e,r)=>e.fatal===r.fatal&&e.severity===r.severity?e.line===r.line?e.column<r.column?-1:1:e.line<r.line?-1:1:(e.fatal||2===e.severity)&&(!r.fatal||2!==r.severity)?1:-1).forEach(e=>{let r=e.message.replaceAll(/\B`(.*?)`\B|\B'(.*?)'\B/g,(e,r,t)=>s.bold(r||t)),n=String(e.line||0),i=String(e.column||0),o=_(n),l=_(i),a=_(r);o>m&&(m=o),l>E&&(E=l),a>y&&(y=a),O||(O=e.line||e.column),t.push({type:"message",severity:e.fatal?"fatal":2===e.severity||"error"===e.severity?"error":"warning",line:n,lineWidth:o,column:i,columnWidth:l,message:r,messageWidth:a,ruleId:e.ruleId||""})})});let g="\n";a.stdout.isTTY&&!f.isCI&&"iTerm.app"===a.env.TERM_PROGRAM&&(g+=function(e=a.cwd()){return"\x1b]50;CurrentDir="+e+"\x07"}());let I=!f.isCI&&W.supportsHyperlink(a.stdout),x=d.hostname(),C=a.env.GNOME_TERMINAL_SCREEN;g+=`${t.map(e=>{if("header"===e.type){let r=O?s.hidden(s.dim(s.gray(`:${e.firstLineCol}`))):"";if(C){let t=p.pathToFileURL(e.filePath,{});return t.hostname=x,k(e.relativeFilePath,t.href)+r}return s.underline(e.relativeFilePath)+r}if("message"===e.type){let t;try{r&&"rulesMeta"in r&&(t=r.rulesMeta[e.ruleId].docs?.url)}catch{}let n=["","warning"===e.severity?s.yellow("warn "):s.red("error")," ".repeat(m-e.lineWidth)+s.dim(e.line+s.gray(":")+e.column)," ".repeat(E-e.columnWidth)+e.message," ".repeat(y-e.messageWidth)+(t&&I?k(s.dim(e.ruleId),t):s.dim(e.ruleId))];return O||n.splice(2,1),n.join(" ")}return""}).join("\n")}
1
+ "use strict";let e;var r=require("node:path"),t=require("node:process"),i=require("picocolors"),n=require("node:os"),l=require("node:tty"),o=require("process"),a=require("ci-info"),u=require("node:url");const s=e=>161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,f=e=>12288===e||e>=65281&&e<=65376||e>=65504&&e<=65510,d=e=>e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9800&&e<=9811||9855===e||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||94192===e||94193===e||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,c=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,m=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,h=/\t{1,1000}/y,p=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,E=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,I=/\p{M}+/gu,x={limit:1/0,ellipsis:""},y=(e,r={},t={})=>{let i=r.limit??1/0,n=r.ellipsis??"",l=r?.ellipsisWidth??(n?y(n,x,t).width:0),o=t.ansiWidth??0,a=t.controlWidth??0,u=t.tabWidth??8,T=t.ambiguousWidth??1,g=t.emojiWidth??2,C=t.fullWidthWidth??2,R=t.regularWidth??1,M=t.wideWidth??2,O=0,b=0,_=e.length,v=0,F=!1,A=_,j=Math.max(0,i-l),w=0,N=0,W=0,k=0;e:for(;;){if(N>w||b>=_&&b>O){for(let r of(v=0,(e.slice(w,N)||e.slice(O,b)).replaceAll(I,""))){let e=r.codePointAt(0)||0;if(W+(k=f(e)?C:d(e)?M:T!==R&&s(e)?T:R)>j&&(A=Math.min(A,Math.max(w,O)+v)),W+k>i){F=!0;break e}v+=r.length,W+=k}w=N=0}if(b>=_)break;if(E.lastIndex=b,E.test(e)){if(W+(k=(v=E.lastIndex-b)*R)>j&&(A=Math.min(A,b+Math.floor((j-W)/R))),W+k>i){F=!0;break}W+=k,w=O,N=b,b=O=E.lastIndex;continue}if(c.lastIndex=b,c.test(e)){if(W+o>j&&(A=Math.min(A,b)),W+o>i){F=!0;break}W+=o,w=O,N=b,b=O=c.lastIndex;continue}if(m.lastIndex=b,m.test(e)){if(W+(k=(v=m.lastIndex-b)*a)>j&&(A=Math.min(A,b+Math.floor((j-W)/a))),W+k>i){F=!0;break}W+=k,w=O,N=b,b=O=m.lastIndex;continue}if(h.lastIndex=b,h.test(e)){if(W+(k=(v=h.lastIndex-b)*u)>j&&(A=Math.min(A,b+Math.floor((j-W)/u))),W+k>i){F=!0;break}W+=k,w=O,N=b,b=O=h.lastIndex;continue}if(p.lastIndex=b,p.test(e)){if(W+g>j&&(A=Math.min(A,b)),W+g>i){F=!0;break}W+=g,w=O,N=b,b=O=p.lastIndex;continue}b+=1}return{width:F?j:W,index:F?A:_,truncated:F,ellipsed:F&&i>=l}},T={limit:1/0,ellipsis:"",ellipsisWidth:0},g=(e,r={})=>y(e,T,r).width;function C(e,r=globalThis.Deno?globalThis.Deno.args:t.argv){let i=e.startsWith("-")?"":1===e.length?"-":"--",n=r.indexOf(i+e),l=r.indexOf("--");return -1!==n&&(-1===l||n<l)}const{env:R}=t;function M(r,i={}){var l;return 0!==(l=function(r,{streamIsTTY:i,sniffFlags:l=!0}={}){let o=function(){if(!("FORCE_COLOR"in R))return;if("true"===R.FORCE_COLOR)return 1;if("false"===R.FORCE_COLOR)return 0;if(0===R.FORCE_COLOR.length)return 1;let e=Math.min(Number.parseInt(R.FORCE_COLOR,10),3);if([0,1,2,3].includes(e))return e}();void 0!==o&&(e=o);let a=l?e:o;if(0===a)return 0;if(l){if(C("color=16m")||C("color=full")||C("color=truecolor"))return 3;if(C("color=256"))return 2}if("TF_BUILD"in R&&"AGENT_NAME"in R)return 1;if(r&&!i&&void 0===a)return 0;let u=a||0;if("dumb"===R.TERM)return u;if("win32"===t.platform){let e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in R)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in R)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in R)||"codeship"===R.CI_NAME?1:u;if("TEAMCITY_VERSION"in R)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION);if("truecolor"===R.COLORTERM||"xterm-kitty"===R.TERM)return 3;if("TERM_PROGRAM"in R){let e=Number.parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:u}(r,{streamIsTTY:r&&r.isTTY,...i}))&&{level:l,hasBasic:!0,has256:l>=2,has16m:l>=3}}function O(e,r=o.argv){let t=e.startsWith("-")?"":1===e.length?"-":"--",i=r.indexOf(t+e),n=r.indexOf("--");return -1!==i&&(-1===n||i<n)}function b(e=""){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e)??[];return{major:0,minor:Number.parseInt(r[1],10),patch:Number.parseInt(r[2],10)}}let r=(e??"").split(".").map(e=>Number.parseInt(e,10));return{major:r[0],minor:r[1],patch:r[2]}}function _(e){let{CI:r,FORCE_HYPERLINK:i,NETLIFY:n,TEAMCITY_VERSION:l,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:a,VTE_VERSION:u,TERM:s}=t.env;if(i)return!(i.length>0&&0===Number.parseInt(i,10));if(O("no-hyperlink")||O("no-hyperlinks")||O("hyperlink=false")||O("hyperlink=never"))return!1;if(O("hyperlink=true")||O("hyperlink=always")||n)return!0;if(!M(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in t.env)return!0;if("win32"===t.platform||r||l)return!1;if(o){let e=b(a);switch(o){case"iTerm.app":if(3===e.major)return e.minor>=1;return e.major>3;case"WezTerm":return e.major>=0x1343cac;case"vscode":return e.major>1||1===e.major&&e.minor>=72;case"ghostty":return!0}}if(u){if("0.50.0"===u)return!1;let e=b(u);return e.major>0||e.minor>=50}return"alacritty"===s}function v(e,r,t={}){return"\x1b]8;"+Object.keys(t).map(e=>e+"="+t[e]).join(":")+";"+r+"\x07"+e+"\x1b]8;;\x07"}C("no-color")||C("no-colors")||C("color=false")||C("color=never")?e=0:(C("color")||C("colors")||C("color=true")||C("color=always"))&&(e=1),M({isTTY:l.isatty(1)}),M({isTTY:l.isatty(2)}),_(t.stdout),_(t.stderr);const F={type:"separator"};module.exports=(e,l)=>{let o=[],s=0,f=0,d=0,c=0,m=0,h={},p=0,E=0,I=0,x=!1;e.sort((e,r)=>e.errorCount===r.errorCount?r.warningCount-e.warningCount:0===e.errorCount?-1:0===r.errorCount?1:r.errorCount-e.errorCount).forEach(e=>{let{messages:t,filePath:n,usedDeprecatedRules:l}=e;if(0===t.length)return;s+=e.errorCount,f+=e.warningCount,d+=e.fatalErrorCount,c+=e.fixableWarningCount,m+=e.fixableErrorCount,l.forEach(e=>{var r;h[r=e.ruleId]||(h[r]=e.replacedBy)}),0!==o.length&&o.push(F);let a=t.find(({severity:e})=>2===e)||t[0];o.push({type:"header",filePath:n,relativeFilePath:r.relative(".",n),firstLineCol:`${a.line}:${a.column}`}),t.sort((e,r)=>e.fatal===r.fatal&&e.severity===r.severity?e.line===r.line?e.column<r.column?-1:1:e.line<r.line?-1:1:(e.fatal||2===e.severity)&&(!r.fatal||2!==r.severity)?1:-1).forEach(e=>{let r=e.message.replaceAll(/\B`(.*?)`\B|\B'(.*?)'\B/g,(e,r,t)=>i.bold(r||t)),t=String(e.line||0),n=String(e.column||0),l=g(t),a=g(n),u=g(r);l>p&&(p=l),a>E&&(E=a),u>I&&(I=u),x||(x=e.line||e.column),o.push({type:"message",severity:e.fatal?"fatal":2===e.severity||"error"===e.severity?"error":"warning",line:t,lineWidth:l,column:n,columnWidth:a,message:r,messageWidth:u,ruleId:e.ruleId||""})})});let y="\n";t.stdout.isTTY&&!a.isCI&&"iTerm.app"===t.env.TERM_PROGRAM&&(y+=function(e=t.cwd()){return"\x1b]50;CurrentDir="+e+"\x07"}());let T=!a.isCI&&_(t.stdout),C=n.hostname(),R=t.env.GNOME_TERMINAL_SCREEN;y+=`${o.map(e=>{if("header"===e.type){let r=x?i.hidden(i.dim(i.gray(`:${e.firstLineCol}`))):"";if(R){let t=u.pathToFileURL(e.filePath,{});return t.hostname=C,v(e.relativeFilePath,t.href)+r}return i.underline(e.relativeFilePath)+r}if("message"===e.type){let r;try{l&&"rulesMeta"in l&&(r=l.rulesMeta[e.ruleId].docs?.url)}catch{}let t=["","warning"===e.severity?i.yellow("warn "):i.red("error")," ".repeat(p-e.lineWidth)+i.dim(e.line+i.gray(":")+e.column)," ".repeat(E-e.columnWidth)+e.message," ".repeat(I-e.messageWidth)+(r&&T?v(i.dim(e.ruleId),r):i.dim(e.ruleId))];return x||t.splice(2,1),t.join(" ")}return""}).join("\n")}
2
2
 
3
- `;let b=Object.entries(h),M=b.length,R=Object.entries({problem:[!0,n+i+o],warning:[!0,i>0?s.yellow(i):s.green(0)],error:[!0,n>0?s.red(n):s.green(0)],fatal:[o>0,s.red(o)],fixable:[c+u>0,c+u],deprecated:[M>0,s.bold(s.gray(M))]}).filter(([,[e]])=>e),v=Math.max(...R.map(([e])=>e.length));return R.forEach(e=>{let[r,[,t]]=e;g+=`${" ".repeat(v-r.length)}${s.bold(`${r}:`)} ${t}
4
- `}),M>0&&b.forEach(([e,r])=>{g+="\n",g+=`${s.gray("deprecated:")} ${e}`,g+=r.length>0?s.gray(` (replaced by ${r.map(s.white).join(", ")})`):""}),g+="\n",n+i+o+M>0?g:""};
3
+ `;let M=Object.entries(h),O=M.length,b=Object.entries({problem:[!0,s+f+d],warning:[!0,f>0?i.yellow(f):i.green(0)],error:[!0,s>0?i.red(s):i.green(0)],fatal:[d>0,i.red(d)],fixable:[m+c>0,m+c],deprecated:[O>0,i.bold(i.gray(O))]}).filter(([,[e]])=>e),A=Math.max(...b.map(([e])=>e.length));return b.forEach(e=>{let[r,[,t]]=e;y+=`${" ".repeat(A-r.length)}${i.bold(`${r}:`)} ${t}
4
+ `}),O>0&&M.forEach(([e,r])=>{y+="\n",y+=`${i.gray("deprecated:")} ${e}`,y+=r.length>0?i.gray(` (replaced by ${r.map(i.white).join(", ")})`):""}),y+="\n",s+f+d+O>0?y:""};
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
- import type { ESLint } from 'eslint';
2
-
3
-
1
+ import { ESLint } from 'eslint';
4
2
 
5
3
  declare const pretty: ESLint.FormatterFunction;
6
4
 
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import e from"node:path";import r from"node:process";import t from"picocolors";import*as n from"os";import*as i from"tty";import{isCI as o}from"ci-info";import{pathToFileURL as l}from"node:url";import{hostname as a}from"node:os";let s=e=>161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,u=e=>12288===e||e>=65281&&e<=65376||e>=65504&&e<=65510,f=e=>e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9800&&e<=9811||9855===e||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||94192===e||94193===e||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,c=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,p=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,d=/\t{1,1000}/y,m=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,h=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,E=/\p{M}+/gu,y={limit:1/0,ellipsis:""},x=(e,r={},t={})=>{let n=r.limit??1/0,i=r.ellipsis??"",o=r?.ellipsisWidth??(i?x(i,y,t).width:0),l=t.ansiWidth??0,a=t.controlWidth??0,I=t.tabWidth??8,O=t.ambiguousWidth??1,g=t.emojiWidth??2,C=t.fullWidthWidth??2,M=t.regularWidth??1,R=t.wideWidth??2,b=0,v=0,T=e.length,_=0,j=!1,F=T,w=Math.max(0,n-o),A=0,W=0,P=0,k=0;e:for(;;){if(W>A||v>=T&&v>b){for(let r of(_=0,(e.slice(A,W)||e.slice(b,v)).replaceAll(E,""))){let e=r.codePointAt(0)||0;if(P+(k=u(e)?C:f(e)?R:O!==M&&s(e)?O:M)>w&&(F=Math.min(F,Math.max(A,b)+_)),P+k>n){j=!0;break e}_+=r.length,P+=k}A=W=0}if(v>=T)break;if(h.lastIndex=v,h.test(e)){if(P+(k=(_=h.lastIndex-v)*M)>w&&(F=Math.min(F,v+Math.floor((w-P)/M))),P+k>n){j=!0;break}P+=k,A=b,W=v,v=b=h.lastIndex;continue}if(c.lastIndex=v,c.test(e)){if(P+l>w&&(F=Math.min(F,v)),P+l>n){j=!0;break}P+=l,A=b,W=v,v=b=c.lastIndex;continue}if(p.lastIndex=v,p.test(e)){if(P+(k=(_=p.lastIndex-v)*a)>w&&(F=Math.min(F,v+Math.floor((w-P)/a))),P+k>n){j=!0;break}P+=k,A=b,W=v,v=b=p.lastIndex;continue}if(d.lastIndex=v,d.test(e)){if(P+(k=(_=d.lastIndex-v)*I)>w&&(F=Math.min(F,v+Math.floor((w-P)/I))),P+k>n){j=!0;break}P+=k,A=b,W=v,v=b=d.lastIndex;continue}if(m.lastIndex=v,m.test(e)){if(P+g>w&&(F=Math.min(F,v)),P+g>n){j=!0;break}P+=g,A=b,W=v,v=b=m.lastIndex;continue}v+=1}return{width:j?w:P,index:j?F:T,truncated:j,ellipsed:j&&n>=o}},I={limit:1/0,ellipsis:"",ellipsisWidth:0},O=(e,r={})=>x(e,I,r).width;function g(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var r=e.default;if("function"==typeof r){var t=function e(){return this instanceof e?Reflect.construct(r,arguments,this.constructor):r.apply(this,arguments)};t.prototype=r.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}),t}var C,M,R,b,v,T,_=g(n),j=g(i);function F(){return M?C:(M=1,C=(e,r=process.argv)=>{let t=e.startsWith("-")?"":1===e.length?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return -1!==n&&(-1===i||n<i)})}var w=function(){if(T)return v;T=1;let e=function(){let e;if(b)return R;b=1;let r=F(),{env:t}=process;function n(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function i(n,i){if(0===e)return 0;if(r("color=16m")||r("color=full")||r("color=truecolor"))return 3;if(r("color=256"))return 2;if(n&&!i&&void 0===e)return 0;let o=e||0;if("dumb"===t.TERM)return o;if("win32"===process.platform){let e=_.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in t)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in t)||"codeship"===t.CI_NAME?1:o;if("TEAMCITY_VERSION"in t)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(t.TEAMCITY_VERSION);if("truecolor"===t.COLORTERM)return 3;if("TERM_PROGRAM"in t){let e=parseInt((t.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(t.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(t.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(t.TERM)||"COLORTERM"in t?1:o}return r("no-color")||r("no-colors")||r("color=false")||r("color=never")?e=0:(r("color")||r("colors")||r("color=true")||r("color=always"))&&(e=1),"FORCE_COLOR"in t&&(e="true"===t.FORCE_COLOR?1:"false"===t.FORCE_COLOR?0:0===t.FORCE_COLOR.length?1:Math.min(parseInt(t.FORCE_COLOR,10),3)),R={supportsColor:function(e){return n(i(e,e&&e.isTTY))},stdout:n(i(!0,j.isatty(1))),stderr:n(i(!0,j.isatty(2)))}}(),r=F();function t(e){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e)||[];return{major:0,minor:parseInt(r[1],10),patch:parseInt(r[2],10)}}let r=(e||"").split(".").map(e=>parseInt(e,10));return{major:r[0],minor:r[1],patch:r[2]}}function n(n){let{CI:i,FORCE_HYPERLINK:o,NETLIFY:l,TEAMCITY_VERSION:a,TERM_PROGRAM:s,TERM_PROGRAM_VERSION:u,VTE_VERSION:f,TERM:c}=process.env;if(o)return!(o.length>0&&0===parseInt(o,10));if(r("no-hyperlink")||r("no-hyperlinks")||r("hyperlink=false")||r("hyperlink=never"))return!1;if(r("hyperlink=true")||r("hyperlink=always")||l)return!0;if(!e.supportsColor(n)||n&&!n.isTTY)return!1;if("WT_SESSION"in process.env)return!0;if("win32"===process.platform||i||a)return!1;if(s){let e=t(u||"");switch(s){case"iTerm.app":if(3===e.major)return e.minor>=1;return e.major>3;case"WezTerm":return e.major>=0x1343cac;case"vscode":return e.major>1||1===e.major&&e.minor>=72;case"ghostty":return!0}}if(f){if("0.50.0"===f)return!1;let e=t(f);return e.major>0||e.minor>=50}return"alacritty"===c||!1}return v={supportsHyperlink:n,stdout:n(process.stdout),stderr:n(process.stderr)}}();function A(e,r,t={}){return"\x1b]8;"+Object.keys(t).map(e=>e+"="+t[e]).join(":")+";"+r+"\x07"+e+"\x1b]8;;\x07"}let W={type:"separator"},P=(n,i)=>{let s=[],u=0,f=0,c=0,p=0,d=0,m={},h=0,E=0,y=0,x=!1;n.sort((e,r)=>e.errorCount===r.errorCount?r.warningCount-e.warningCount:0===e.errorCount?-1:0===r.errorCount?1:r.errorCount-e.errorCount).forEach(r=>{let{messages:n,filePath:i,usedDeprecatedRules:o}=r;if(0===n.length)return;u+=r.errorCount,f+=r.warningCount,c+=r.fatalErrorCount,p+=r.fixableWarningCount,d+=r.fixableErrorCount,o.forEach(e=>{var r;m[r=e.ruleId]||(m[r]=e.replacedBy)}),0!==s.length&&s.push(W);let l=n.find(({severity:e})=>2===e)||n[0];s.push({type:"header",filePath:i,relativeFilePath:e.relative(".",i),firstLineCol:`${l.line}:${l.column}`}),n.sort((e,r)=>e.fatal===r.fatal&&e.severity===r.severity?e.line===r.line?e.column<r.column?-1:1:e.line<r.line?-1:1:(e.fatal||2===e.severity)&&(!r.fatal||2!==r.severity)?1:-1).forEach(e=>{let r=e.message.replaceAll(/\B`(.*?)`\B|\B'(.*?)'\B/g,(e,r,n)=>t.bold(r||n)),n=String(e.line||0),i=String(e.column||0),o=O(n),l=O(i),a=O(r);o>h&&(h=o),l>E&&(E=l),a>y&&(y=a),x||(x=e.line||e.column),s.push({type:"message",severity:e.fatal?"fatal":2===e.severity||"error"===e.severity?"error":"warning",line:n,lineWidth:o,column:i,columnWidth:l,message:r,messageWidth:a,ruleId:e.ruleId||""})})});let I="\n";r.stdout.isTTY&&!o&&"iTerm.app"===r.env.TERM_PROGRAM&&(I+=function(e=r.cwd()){return"\x1b]50;CurrentDir="+e+"\x07"}());let g=!o&&w.supportsHyperlink(r.stdout),C=a(),M=r.env.GNOME_TERMINAL_SCREEN;I+=`${s.map(e=>{if("header"===e.type){let r=x?t.hidden(t.dim(t.gray(`:${e.firstLineCol}`))):"";if(M){let t=l(e.filePath,{});return t.hostname=C,A(e.relativeFilePath,t.href)+r}return t.underline(e.relativeFilePath)+r}if("message"===e.type){let r;try{i&&"rulesMeta"in i&&(r=i.rulesMeta[e.ruleId].docs?.url)}catch{}let n=["","warning"===e.severity?t.yellow("warn "):t.red("error")," ".repeat(h-e.lineWidth)+t.dim(e.line+t.gray(":")+e.column)," ".repeat(E-e.columnWidth)+e.message," ".repeat(y-e.messageWidth)+(r&&g?A(t.dim(e.ruleId),r):t.dim(e.ruleId))];return x||n.splice(2,1),n.join(" ")}return""}).join("\n")}
1
+ let e;import r from"node:path";import t from"node:process";import i from"picocolors";import n,{hostname as l}from"node:os";import o from"node:tty";import a from"process";import{isCI as u}from"ci-info";import{pathToFileURL as s}from"node:url";let f=e=>161===e||164===e||167===e||168===e||170===e||173===e||174===e||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||198===e||208===e||215===e||216===e||e>=222&&e<=225||230===e||e>=232&&e<=234||236===e||237===e||240===e||242===e||243===e||e>=247&&e<=250||252===e||254===e||257===e||273===e||275===e||283===e||294===e||295===e||299===e||e>=305&&e<=307||312===e||e>=319&&e<=322||324===e||e>=328&&e<=331||333===e||338===e||339===e||358===e||359===e||363===e||462===e||464===e||466===e||468===e||470===e||472===e||474===e||476===e||593===e||609===e||708===e||711===e||e>=713&&e<=715||717===e||720===e||e>=728&&e<=731||733===e||735===e||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||1025===e||e>=1040&&e<=1103||1105===e||8208===e||e>=8211&&e<=8214||8216===e||8217===e||8220===e||8221===e||e>=8224&&e<=8226||e>=8228&&e<=8231||8240===e||8242===e||8243===e||8245===e||8251===e||8254===e||8308===e||8319===e||e>=8321&&e<=8324||8364===e||8451===e||8453===e||8457===e||8467===e||8470===e||8481===e||8482===e||8486===e||8491===e||8531===e||8532===e||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||8585===e||e>=8592&&e<=8601||8632===e||8633===e||8658===e||8660===e||8679===e||8704===e||8706===e||8707===e||8711===e||8712===e||8715===e||8719===e||8721===e||8725===e||8730===e||e>=8733&&e<=8736||8739===e||8741===e||e>=8743&&e<=8748||8750===e||e>=8756&&e<=8759||8764===e||8765===e||8776===e||8780===e||8786===e||8800===e||8801===e||e>=8804&&e<=8807||8810===e||8811===e||8814===e||8815===e||8834===e||8835===e||8838===e||8839===e||8853===e||8857===e||8869===e||8895===e||8978===e||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||9632===e||9633===e||e>=9635&&e<=9641||9650===e||9651===e||9654===e||9655===e||9660===e||9661===e||9664===e||9665===e||e>=9670&&e<=9672||9675===e||e>=9678&&e<=9681||e>=9698&&e<=9701||9711===e||9733===e||9734===e||9737===e||9742===e||9743===e||9756===e||9758===e||9792===e||9794===e||9824===e||9825===e||e>=9827&&e<=9829||e>=9831&&e<=9834||9836===e||9837===e||9839===e||9886===e||9887===e||9919===e||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||9955===e||9960===e||9961===e||e>=9963&&e<=9969||9972===e||e>=9974&&e<=9977||9979===e||9980===e||9982===e||9983===e||10045===e||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||65533===e||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||127375===e||127376===e||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,m=e=>12288===e||e>=65281&&e<=65376||e>=65504&&e<=65510,d=e=>e>=4352&&e<=4447||8986===e||8987===e||9001===e||9002===e||e>=9193&&e<=9196||9200===e||9203===e||9725===e||9726===e||9748===e||9749===e||e>=9800&&e<=9811||9855===e||9875===e||9889===e||9898===e||9899===e||9917===e||9918===e||9924===e||9925===e||9934===e||9940===e||9962===e||9970===e||9971===e||9973===e||9978===e||9981===e||9989===e||9994===e||9995===e||10024===e||10060===e||10062===e||e>=10067&&e<=10069||10071===e||e>=10133&&e<=10135||10160===e||10175===e||11035===e||11036===e||11088===e||11093===e||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||94192===e||94193===e||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||110589===e||110590===e||e>=110592&&e<=110882||110898===e||e>=110928&&e<=110930||110933===e||e>=110948&&e<=110951||e>=110960&&e<=111355||126980===e||127183===e||127374===e||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||127568===e||127569===e||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||127988===e||e>=127992&&e<=128062||128064===e||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||128378===e||128405===e||128406===e||128420===e||e>=128507&&e<=128591||e>=128640&&e<=128709||128716===e||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||128747===e||128748===e||e>=128756&&e<=128764||e>=128992&&e<=129003||129008===e||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,c=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,p=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,h=/\t{1,1000}/y,E=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,x=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,I=/\p{M}+/gu,y={limit:1/0,ellipsis:""},g=(e,r={},t={})=>{let i=r.limit??1/0,n=r.ellipsis??"",l=r?.ellipsisWidth??(n?g(n,y,t).width:0),o=t.ansiWidth??0,a=t.controlWidth??0,u=t.tabWidth??8,s=t.ambiguousWidth??1,T=t.emojiWidth??2,M=t.fullWidthWidth??2,O=t.regularWidth??1,R=t.wideWidth??2,C=0,b=0,_=e.length,v=0,F=!1,A=_,j=Math.max(0,i-l),w=0,N=0,W=0,k=0;e:for(;;){if(N>w||b>=_&&b>C){for(let r of(v=0,(e.slice(w,N)||e.slice(C,b)).replaceAll(I,""))){let e=r.codePointAt(0)||0;if(W+(k=m(e)?M:d(e)?R:s!==O&&f(e)?s:O)>j&&(A=Math.min(A,Math.max(w,C)+v)),W+k>i){F=!0;break e}v+=r.length,W+=k}w=N=0}if(b>=_)break;if(x.lastIndex=b,x.test(e)){if(W+(k=(v=x.lastIndex-b)*O)>j&&(A=Math.min(A,b+Math.floor((j-W)/O))),W+k>i){F=!0;break}W+=k,w=C,N=b,b=C=x.lastIndex;continue}if(c.lastIndex=b,c.test(e)){if(W+o>j&&(A=Math.min(A,b)),W+o>i){F=!0;break}W+=o,w=C,N=b,b=C=c.lastIndex;continue}if(p.lastIndex=b,p.test(e)){if(W+(k=(v=p.lastIndex-b)*a)>j&&(A=Math.min(A,b+Math.floor((j-W)/a))),W+k>i){F=!0;break}W+=k,w=C,N=b,b=C=p.lastIndex;continue}if(h.lastIndex=b,h.test(e)){if(W+(k=(v=h.lastIndex-b)*u)>j&&(A=Math.min(A,b+Math.floor((j-W)/u))),W+k>i){F=!0;break}W+=k,w=C,N=b,b=C=h.lastIndex;continue}if(E.lastIndex=b,E.test(e)){if(W+T>j&&(A=Math.min(A,b)),W+T>i){F=!0;break}W+=T,w=C,N=b,b=C=E.lastIndex;continue}b+=1}return{width:F?j:W,index:F?A:_,truncated:F,ellipsed:F&&i>=l}},T={limit:1/0,ellipsis:"",ellipsisWidth:0},M=(e,r={})=>g(e,T,r).width;function O(e,r=globalThis.Deno?globalThis.Deno.args:t.argv){let i=e.startsWith("-")?"":1===e.length?"-":"--",n=r.indexOf(i+e),l=r.indexOf("--");return -1!==n&&(-1===l||n<l)}let{env:R}=t;function C(r,i={}){var l;return 0!==(l=function(r,{streamIsTTY:i,sniffFlags:l=!0}={}){let o=function(){if(!("FORCE_COLOR"in R))return;if("true"===R.FORCE_COLOR)return 1;if("false"===R.FORCE_COLOR)return 0;if(0===R.FORCE_COLOR.length)return 1;let e=Math.min(Number.parseInt(R.FORCE_COLOR,10),3);if([0,1,2,3].includes(e))return e}();void 0!==o&&(e=o);let a=l?e:o;if(0===a)return 0;if(l){if(O("color=16m")||O("color=full")||O("color=truecolor"))return 3;if(O("color=256"))return 2}if("TF_BUILD"in R&&"AGENT_NAME"in R)return 1;if(r&&!i&&void 0===a)return 0;let u=a||0;if("dumb"===R.TERM)return u;if("win32"===t.platform){let e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in R)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(e=>e in R)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(e=>e in R)||"codeship"===R.CI_NAME?1:u;if("TEAMCITY_VERSION"in R)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(R.TEAMCITY_VERSION);if("truecolor"===R.COLORTERM||"xterm-kitty"===R.TERM)return 3;if("TERM_PROGRAM"in R){let e=Number.parseInt((R.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(R.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(R.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(R.TERM)||"COLORTERM"in R?1:u}(r,{streamIsTTY:r&&r.isTTY,...i}))&&{level:l,hasBasic:!0,has256:l>=2,has16m:l>=3}}function b(e,r=a.argv){let t=e.startsWith("-")?"":1===e.length?"-":"--",i=r.indexOf(t+e),n=r.indexOf("--");return -1!==i&&(-1===n||i<n)}function _(e=""){if(/^\d{3,4}$/.test(e)){let r=/(\d{1,2})(\d{2})/.exec(e)??[];return{major:0,minor:Number.parseInt(r[1],10),patch:Number.parseInt(r[2],10)}}let r=(e??"").split(".").map(e=>Number.parseInt(e,10));return{major:r[0],minor:r[1],patch:r[2]}}function v(e){let{CI:r,FORCE_HYPERLINK:i,NETLIFY:n,TEAMCITY_VERSION:l,TERM_PROGRAM:o,TERM_PROGRAM_VERSION:a,VTE_VERSION:u,TERM:s}=t.env;if(i)return!(i.length>0&&0===Number.parseInt(i,10));if(b("no-hyperlink")||b("no-hyperlinks")||b("hyperlink=false")||b("hyperlink=never"))return!1;if(b("hyperlink=true")||b("hyperlink=always")||n)return!0;if(!C(e)||e&&!e.isTTY)return!1;if("WT_SESSION"in t.env)return!0;if("win32"===t.platform||r||l)return!1;if(o){let e=_(a);switch(o){case"iTerm.app":if(3===e.major)return e.minor>=1;return e.major>3;case"WezTerm":return e.major>=0x1343cac;case"vscode":return e.major>1||1===e.major&&e.minor>=72;case"ghostty":return!0}}if(u){if("0.50.0"===u)return!1;let e=_(u);return e.major>0||e.minor>=50}return"alacritty"===s}function F(e,r,t={}){return"\x1b]8;"+Object.keys(t).map(e=>e+"="+t[e]).join(":")+";"+r+"\x07"+e+"\x1b]8;;\x07"}O("no-color")||O("no-colors")||O("color=false")||O("color=never")?e=0:(O("color")||O("colors")||O("color=true")||O("color=always"))&&(e=1),C({isTTY:o.isatty(1)}),C({isTTY:o.isatty(2)}),v(t.stdout),v(t.stderr);let A={type:"separator"},j=(e,n)=>{let o=[],a=0,f=0,m=0,d=0,c=0,p={},h=0,E=0,x=0,I=!1;e.sort((e,r)=>e.errorCount===r.errorCount?r.warningCount-e.warningCount:0===e.errorCount?-1:0===r.errorCount?1:r.errorCount-e.errorCount).forEach(e=>{let{messages:t,filePath:n,usedDeprecatedRules:l}=e;if(0===t.length)return;a+=e.errorCount,f+=e.warningCount,m+=e.fatalErrorCount,d+=e.fixableWarningCount,c+=e.fixableErrorCount,l.forEach(e=>{var r;p[r=e.ruleId]||(p[r]=e.replacedBy)}),0!==o.length&&o.push(A);let u=t.find(({severity:e})=>2===e)||t[0];o.push({type:"header",filePath:n,relativeFilePath:r.relative(".",n),firstLineCol:`${u.line}:${u.column}`}),t.sort((e,r)=>e.fatal===r.fatal&&e.severity===r.severity?e.line===r.line?e.column<r.column?-1:1:e.line<r.line?-1:1:(e.fatal||2===e.severity)&&(!r.fatal||2!==r.severity)?1:-1).forEach(e=>{let r=e.message.replaceAll(/\B`(.*?)`\B|\B'(.*?)'\B/g,(e,r,t)=>i.bold(r||t)),t=String(e.line||0),n=String(e.column||0),l=M(t),a=M(n),u=M(r);l>h&&(h=l),a>E&&(E=a),u>x&&(x=u),I||(I=e.line||e.column),o.push({type:"message",severity:e.fatal?"fatal":2===e.severity||"error"===e.severity?"error":"warning",line:t,lineWidth:l,column:n,columnWidth:a,message:r,messageWidth:u,ruleId:e.ruleId||""})})});let y="\n";t.stdout.isTTY&&!u&&"iTerm.app"===t.env.TERM_PROGRAM&&(y+=function(e=t.cwd()){return"\x1b]50;CurrentDir="+e+"\x07"}());let g=!u&&v(t.stdout),T=l(),O=t.env.GNOME_TERMINAL_SCREEN;y+=`${o.map(e=>{if("header"===e.type){let r=I?i.hidden(i.dim(i.gray(`:${e.firstLineCol}`))):"";if(O){let t=s(e.filePath,{});return t.hostname=T,F(e.relativeFilePath,t.href)+r}return i.underline(e.relativeFilePath)+r}if("message"===e.type){let r;try{n&&"rulesMeta"in n&&(r=n.rulesMeta[e.ruleId].docs?.url)}catch{}let t=["","warning"===e.severity?i.yellow("warn "):i.red("error")," ".repeat(h-e.lineWidth)+i.dim(e.line+i.gray(":")+e.column)," ".repeat(E-e.columnWidth)+e.message," ".repeat(x-e.messageWidth)+(r&&g?F(i.dim(e.ruleId),r):i.dim(e.ruleId))];return I||t.splice(2,1),t.join(" ")}return""}).join("\n")}
2
2
 
3
- `;let R=Object.entries(m),b=R.length,v=Object.entries({problem:[!0,u+f+c],warning:[!0,f>0?t.yellow(f):t.green(0)],error:[!0,u>0?t.red(u):t.green(0)],fatal:[c>0,t.red(c)],fixable:[d+p>0,d+p],deprecated:[b>0,t.bold(t.gray(b))]}).filter(([,[e]])=>e),T=Math.max(...v.map(([e])=>e.length));return v.forEach(e=>{let[r,[,n]]=e;I+=`${" ".repeat(T-r.length)}${t.bold(`${r}:`)} ${n}
4
- `}),b>0&&R.forEach(([e,r])=>{I+="\n",I+=`${t.gray("deprecated:")} ${e}`,I+=r.length>0?t.gray(` (replaced by ${r.map(t.white).join(", ")})`):""}),I+="\n",u+f+c+b>0?I:""};export{P as default};
3
+ `;let R=Object.entries(p),C=R.length,b=Object.entries({problem:[!0,a+f+m],warning:[!0,f>0?i.yellow(f):i.green(0)],error:[!0,a>0?i.red(a):i.green(0)],fatal:[m>0,i.red(m)],fixable:[c+d>0,c+d],deprecated:[C>0,i.bold(i.gray(C))]}).filter(([,[e]])=>e),_=Math.max(...b.map(([e])=>e.length));return b.forEach(e=>{let[r,[,t]]=e;y+=`${" ".repeat(_-r.length)}${i.bold(`${r}:`)} ${t}
4
+ `}),C>0&&R.forEach(([e,r])=>{y+="\n",y+=`${i.gray("deprecated:")} ${e}`,y+=r.length>0?i.gray(` (replaced by ${r.map(i.white).join(", ")})`):""}),y+="\n",a+f+m+C>0?y:""};export{j as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-formatter-sukka",
3
- "version": "6.18.0",
3
+ "version": "6.18.2",
4
4
  "description": "Sukka's ESLint config",
5
5
  "homepage": "https://github.com/SukkaW/eslint-config-sukka",
6
6
  "repository": {
@@ -33,8 +33,8 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "fast-string-width": "^1.1.0",
36
- "supports-hyperlinks": "^3.2.0",
37
- "@eslint-sukka/rollup-config": "6.18.0"
36
+ "supports-hyperlinks": "^4.0.0",
37
+ "@eslint-sukka/rollup-config": "6.18.2"
38
38
  },
39
39
  "scripts": {
40
40
  "build": "rollup -c rollup.config.ts --configPlugin swc3"