pickier 0.1.46 → 0.1.47
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/bin/cli.js +1 -1
- package/dist/{chunk-42qsthnp.js → chunk-01k0pc58.js} +1 -1
- package/dist/{chunk-7qvwm5vw.js → chunk-4emmmy24.js} +4 -1
- package/dist/{chunk-zbpzmryw.js → chunk-6g75fbqa.js} +1 -1
- package/dist/{chunk-z8fqk4hm.js → chunk-cynz1zp8.js} +1 -1
- package/dist/{chunk-v5qnwhnr.js → chunk-tz5268rh.js} +1 -1
- package/dist/src/index.js +1 -1
- package/package.json +1 -1
package/dist/bin/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import{L as N}from"../chunk-h6ac3d60.js";import J from"process";async function I(){let E=J.argv.slice(2),Q=E[0]==="run",C=Q?1:0,O=Q?"auto":"lint",X=!1,Y=!1,Z=!1,_=!1,$,T=[],x=!0;for(let y=C;y<E.length;y++){let q=E[y];if(q==="--mode")O=E[++y]||"auto";else if(q==="--format")Z=!0,O="format";else if(q==="--check")X=!0;else if(q==="--write")Y=!0;else if(q==="--config")$=E[++y];else if(q==="--verbose")_=!0;else if(q==="--ext"||q==="--ignore-path")y++;else if(q==="--fix"||q==="--dry-run"||q==="--reporter"||q==="--max-warnings"||q==="--cache"){x=!1,T.length=0;break}else if(q.startsWith("--"));else T.push(q)}if(x&&(O==="format"||O==="auto"||O==="lint")&&T.length>0){let{runUnified:y}=await import("../chunk-
|
|
3
|
+
import{L as N}from"../chunk-h6ac3d60.js";import J from"process";async function I(){let E=J.argv.slice(2),Q=E[0]==="run",C=Q?1:0,O=Q?"auto":"lint",X=!1,Y=!1,Z=!1,_=!1,$,T=[],x=!0;for(let y=C;y<E.length;y++){let q=E[y];if(q==="--mode")O=E[++y]||"auto";else if(q==="--format")Z=!0,O="format";else if(q==="--check")X=!0;else if(q==="--write")Y=!0;else if(q==="--config")$=E[++y];else if(q==="--verbose")_=!0;else if(q==="--ext"||q==="--ignore-path")y++;else if(q==="--fix"||q==="--dry-run"||q==="--reporter"||q==="--max-warnings"||q==="--cache"){x=!1,T.length=0;break}else if(q.startsWith("--"));else T.push(q)}if(x&&(O==="format"||O==="auto"||O==="lint")&&T.length>0){let{runUnified:y}=await import("../chunk-01k0pc58.js"),q=await y(T,{mode:O,check:X,write:Y,verbose:_,config:$});J.exit(q)}let{CLI:L}=await import("../chunk-88xjkex3.js"),{version:F}=await import("../chunk-6g75fbqa.js"),H=new L("pickier"),V=(y)=>{let[q,B]=y;return[Array.isArray(q)?q.filter((W)=>typeof W==="string"):[],B&&typeof B==="object"?B:{}]};H.command("[...globs]","Lint files (default)").option("--fix","Auto-fix lint problems").option("--format","Format files instead of linting").option("--dry-run","Simulate fixes without writing").option("--check","Check formatting without writing (CI-friendly)").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...y)=>{let[q,B]=V(y);if(q.length===0){H.outputHelp();return}let{runUnified:K}=await import("../chunk-01k0pc58.js"),D;if(B.format){if(D="format",!B.check)B.write=!0}else D="lint";let W=await K(q,{...B,mode:D});J.exit(W)}),H.command("lint [...globs]","[DEPRECATION] Use `pickier [...globs]` instead. Lint files").option("--fix","Auto-fix problems").option("--dry-run","Simulate fixes without writing").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...y)=>{let[q,B]=V(y),{runUnified:K}=await import("../chunk-01k0pc58.js"),D=await K(q,{...B,mode:"lint"});J.exit(D)}),H.command("format [...globs]","[DEPRECATION] Use `pickier [...globs] --format` instead. Format files").option("--write","Write changes to files").option("--check","Check without writing (CI-friendly)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file").option("--ext <exts>","Comma-separated extensions").option("--verbose","Verbose output").example("pickier format . --write").example("pickier format . --check").action(async(...y)=>{let[q,B]=V(y),{runUnified:K}=await import("../chunk-01k0pc58.js"),D=await K(q,{...B,mode:"format"});J.exit(D)}),H.command("run [...globs]","Unified mode (auto, lint, or format)").option("--mode <mode>","auto|lint|format",{default:"auto"}).option("--fix","Auto-fix problems (lint mode)").option("--dry-run","Simulate fixes without writing (lint mode)").option("--max-warnings <n>","Max warnings before non-zero exit (lint mode)",{default:-1}).option("--reporter <name>","stylish|json|compact (lint mode)",{default:"stylish"}).option("--write","Write changes to files (format mode)").option("--check","Check without writing (format mode)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache (lint mode)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...y)=>{let[q,B]=V(y),{runUnified:K}=await import("../chunk-01k0pc58.js"),D=await K(q,B);J.exit(D)}),H.command("version","Show the version of the CLI").action(async()=>{let{version:y}=await import("../chunk-6g75fbqa.js");J.stdout.write(`${y}
|
|
4
4
|
`)}),H.version(F),H.help(),H.parse()}I().catch((E)=>{let Q=E instanceof Error?E.message:String(E);J.stderr.write(`pickier: ${Q}
|
|
5
5
|
`),J.exit(1)});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{h as a}from"./chunk-
|
|
2
|
+
import{h as a}from"./chunk-tz5268rh.js";import"./chunk-1r3qehn7.js";import"./chunk-bf2bz66g.js";import"./chunk-h6ac3d60.js";export{a as runUnified};
|
|
@@ -57,7 +57,10 @@ export type ConfigOf = Config
|
|
|
57
57
|
`)}};var T8={meta:{docs:"Disallow with statements",recommended:!0},check:($,J)=>{let Z=[],X=$.split(/\r?\n/);for(let Y=0;Y<X.length;Y++){let z=X[Y],Q=/\bwith\s*\(/g,G;for(G=Q.exec(z);G!==null;G=Q.exec(z)){if(z.substring(0,G.index).includes("//"))continue;Z.push({filePath:J.filePath,line:Y+1,column:Math.max(1,G.index+1),ruleId:"eslint/no-with",message:"Unexpected use of 'with' statement",severity:"error"})}}return Z}};var E8={meta:{docs:"Require using arrow functions for callbacks",recommended:!1},check:($,J)=>{let Z=[],X=$.split(/\r?\n/);for(let Y=0;Y<X.length;Y++){let z=X[Y],Q=/\.(map|filter|reduce|forEach|some|every|find|findIndex)\s*\(\s*function\s*\(/g,G;for(G=Q.exec(z);G!==null;G=Q.exec(z)){if(z.substring(0,G.index).includes("//"))continue;Z.push({filePath:J.filePath,line:Y+1,column:Math.max(1,G.index+1),ruleId:"eslint/prefer-arrow-callback",message:"Unexpected function expression, use arrow function instead",severity:"warning"})}}return Z}};var D8={meta:{docs:"Disallow async functions which have no await expression",recommended:!0},check:($,J)=>{let Z=[],X=$.split(/\r?\n/);for(let Y=0;Y<X.length;Y++)if(X[Y].match(/\basync\s+(?:function\s+\w+|(?:\(|\w+)\s*(?:\(|=>))/)){let G=!1,q=0,U=!1,W=Y;while(W<X.length){let K=X[W];for(let H of K){if(H==="{")q++,U=!0;if(H==="}"){if(q--,q===0&&U)break}}if(K.match(/\bawait\s+/))G=!0;if(q===0&&U){if(!G)Z.push({filePath:J.filePath,line:Y+1,column:1,ruleId:"eslint/require-await",message:"Async function has no await expression",severity:"error"});break}W++}}return Z}};var EZ=/\.(?:ts|js|tsx|jsx|mts|mjs|cts|cjs)$/;function B($){return{meta:$.meta,check:(J,Z)=>{if(!EZ.test(Z.filePath))return[];return $.check(J,Z)},fix:$.fix?(J,Z)=>{if(!EZ.test(Z.filePath))return J;return $.fix(J,Z)}:void 0}}var DZ=/\.(?:sh|bash|zsh|ksh|dash)$/,RZ=/^#!\s*(?:\/usr\/bin\/env\s+)?(?:ba|z|k|da)?sh\b/;function A0($){return{meta:$.meta,check:(J,Z)=>{if(!DZ.test(Z.filePath)&&!RZ.test(J))return[];return $.check(J,Z)},fix:$.fix?(J,Z)=>{if(!DZ.test(Z.filePath)&&!RZ.test(J))return J;return $.fix(J,Z)}:void 0}}var OZ=/(?:^|[/\\])package\.json$/;function _0($){return{meta:$.meta,check:(J,Z)=>{if(!OZ.test(Z.filePath))return[];return $.check(J,Z)},fix:$.fix?(J,Z)=>{if(!OZ.test(Z.filePath))return J;return $.fix(J,Z)}:void 0}}var LZ={name:"eslint",rules:{"array-callback-return":B(B$),"constructor-super":B(M$),"for-direction":B(j$),"getter-return":B(N$),"no-async-promise-executor":B(T$),"no-compare-neg-zero":B(E$),"no-cond-assign":B(D$),"no-constant-condition":B(O$),"no-const-assign":B(R$),"no-dupe-class-members":B(L$),"no-dupe-keys":B(v1),"no-duplicate-case":B(P$),"no-empty-pattern":B(C$),"no-fallthrough":B(I$),"no-loss-of-precision":B(S$),"no-promise-executor-return":B(v$),"no-redeclare":B(y$),"no-self-assign":B(y1),"no-self-compare":B(b$),"no-sparse-arrays":B(k$),"no-undef":B(f$),"no-unsafe-negation":B(p$),"no-unreachable":B(g$),"no-useless-catch":B(x$),"use-isnan":B(h$),"valid-typeof":B(u$),"default-case":B(d$),eqeqeq:B(o$),"no-alert":B(l$),"no-await-in-loop":B(a$),"no-caller":B(s$),"no-case-declarations":B(n$),"no-else-return":B(i$),"no-empty":B(t$),"no-empty-function":B(e$),"no-eval":B($8),"no-extend-native":B(Z8),"no-global-assign":B(X8),"no-implied-eval":B(Y8),"no-iterator":B(z8),"no-new":B(Q8),"no-new-func":B(G8),"no-new-wrappers":B(q8),"no-octal":B(U8),"no-param-reassign":B(W8),"no-proto":B(K8),"no-return-assign":B(H8),"no-shadow":B(A8),"no-throw-literal":B(_8),"no-use-before-define":B(F8),"no-useless-call":B(w8),"no-with":B(T8),"require-await":B(D8),complexity:B(m$),"max-depth":B(c$),"max-lines-per-function":B(r$),"no-extra-boolean-cast":B(J8),"no-lonely-if":B(b1),"no-sequences":B(V8),"no-useless-concat":B(B8),"no-useless-escape":B(M8),"no-useless-rename":B(j8),"no-useless-return":B(k1),"no-var":B(N8),"prefer-arrow-callback":B(E8)}};var PZ={meta:{docs:"Disallow return statements in constructors - constructors automatically return the instance"},check:($,J)=>{let Z=[],X=$.split(/\r?\n/);for(let Y=0;Y<X.length;Y++){let z=X[Y],Q=z.indexOf("//");if(!(Q>=0?z.slice(0,Q):z).match(/\bconstructor\s*\(/))continue;let U=0,W=!1,K=-1;for(let H=Y;H<X.length;H++){let V=X[H],A=null,_=!1;for(let w=0;w<V.length;w++){let F=V[w];if(_){_=!1;continue}if(F==="\\"&&A){_=!0;continue}if(!A){if(F==="'")A="single";else if(F==='"')A="double";else if(F==="`")A="template";else if(F==="{")U++,W=!0;else if(F==="}"){if(U--,W&&U===0){K=H;break}}}else if(A==="single"&&F==="'"||A==="double"&&F==='"'||A==="template"&&F==="`")A=null}if(K!==-1)break}if(K===-1)continue;for(let H=Y;H<=K;H++){let V=X[H];if(H===Y)continue;if(/^\s*\/\//.test(V))continue;let A=V.indexOf("//"),_=A>=0?V.slice(0,A):V;if(_=_.replace(/(['"`])(?:(?!\1)[^\\]|\\.)*?\1/g,'""'),_.match(/\breturn\b/)){let F=_.indexOf("return"),M=F>0?_[F-1]:" ",T=F+6<_.length?_[F+6]:" ";if(/\w/.test(M)||/\w/.test(T))continue;let E=_.slice(F+6).trim();if(E.startsWith("this;")||E==="this")continue;if(E===";"||E==="")continue;let j=V.indexOf("return");Z.push({filePath:J.filePath,line:H+1,column:j+1||1,ruleId:"no-constructor-return",message:"Unexpected return statement in constructor. Constructors should not return values.",severity:"error",help:"Remove the return statement or move the logic outside of the constructor"})}}}return Z}};var CZ={meta:{docs:"Disallow irregular whitespace characters that may cause issues in code"},check:($,J)=>{let Z=[],X=/[\u00A0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/g,Y=$.split(/\r?\n/);for(let z=0;z<Y.length;z++){let Q=Y[z],G;X.lastIndex=0;while((G=X.exec(Q))!==null){let U=G[0].charCodeAt(0),W="irregular whitespace",K={160:"NO-BREAK SPACE",5760:"OGHAM SPACE MARK",6158:"MONGOLIAN VOWEL SEPARATOR",8192:"EN QUAD",8193:"EM QUAD",8194:"EN SPACE",8195:"EM SPACE",8196:"THREE-PER-EM SPACE",8197:"FOUR-PER-EM SPACE",8198:"SIX-PER-EM SPACE",8199:"FIGURE SPACE",8200:"PUNCTUATION SPACE",8201:"THIN SPACE",8202:"HAIR SPACE",8232:"LINE SEPARATOR",8233:"PARAGRAPH SEPARATOR",8239:"NARROW NO-BREAK SPACE",8287:"MEDIUM MATHEMATICAL SPACE",12288:"IDEOGRAPHIC SPACE",65279:"ZERO WIDTH NO-BREAK SPACE"};if(K[U])W=K[U];Z.push({filePath:J.filePath,line:z+1,column:G.index+1,ruleId:"no-irregular-whitespace",message:`Irregular whitespace detected: ${W} (U+${U.toString(16).toUpperCase().padStart(4,"0")})`,severity:"error",help:"Replace irregular whitespace with regular spaces or tabs"})}}return Z},fix:($)=>{return $.replace(/[\u00A0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/g," ")}};var IZ={meta:{docs:"Disallow new operators outside of assignments or comparisons",recommended:!0},check($,J){let Z=[],X=$.split(/\r?\n/);for(let Y=0;Y<X.length;Y++){let z=X[Y],Q=z.trim();if(Q.startsWith("//")||Q.startsWith("/*")||Q.startsWith("*"))continue;if(/^\s*new\s+\w+/.test(z)){let q=/^\s*(?:const|let|var|this\.\w+)\s*=\s*new\s+/,U=/^\s*return\s+new\s+/,W=new RegExp("^\\s*new\\s+\\w[^;]*,"),K=/[=:,(]\s*new\s+/;if(!q.test(z)&&!U.test(z)&&!W.test(z)&&!K.test(Q)){let H=z.search(/new\s+/)+1;Z.push({filePath:J.filePath,line:Y+1,column:H,ruleId:"no-new",message:"Do not use 'new' for side effects",severity:"error",help:"Either assign the result to a variable or remove the 'new' operator if the side effect is intentional."})}}}return Z}};var SZ={meta:{docs:"Disallow multiple spaces in regular expressions",recommended:!0},check($,J){let Z=[],X=$.split(/\r?\n/);for(let Y=0;Y<X.length;Y++){let z=X[Y];if(/^\s*\/\//.test(z))continue;let Q=/\/(?![*/])((?:\\.|[^/\\])+)\/[gimsuvy]*/g,G;for(G=Q.exec(z);G!==null;G=Q.exec(z)){let U=G[1];if(/ {2,}/.test(U)){let W=G.index+1;Z.push({filePath:J.filePath,line:Y+1,column:W,ruleId:"no-regex-spaces",message:"Multiple spaces in regular expression",severity:"error",help:"Use quantifiers like {2} instead of multiple spaces for clarity."})}}let q=/new\s+RegExp\s*\(\s*['"`]([^'"`]+)['"`]/g;for(G=q.exec(z);G!==null;G=q.exec(z)){let U=G[1];if(/ {2,}/.test(U)){let W=G.index+1;Z.push({filePath:J.filePath,line:Y+1,column:W,ruleId:"no-regex-spaces",message:"Multiple spaces in regular expression",severity:"error",help:"Use quantifiers like {2} instead of multiple spaces for clarity."})}}}return Z}};var vZ=new Set(["|","&",":",",","<"]);function lQ($){let J=$.split(""),Z=0,X=null,Y=!1,z=(Q,G)=>{for(let q=Q;q<G&&q<J.length;q+=1)if(J[q]!==`
|
|
58
58
|
`&&J[q]!=="\r")J[q]=" "};while(Z<$.length){let Q=$[Z];if(X){if(Y)Y=!1;else if(Q==="\\")Y=!0;else if(Q===X)X=null;else if(Q===`
|
|
59
59
|
`&&X!=="`")X=null;Z+=1;continue}if(Q==="'"||Q==='"'||Q==="`"){X=Q,Z+=1;continue}if(Q==="/"&&$[Z+1]==="/"){let G=$.indexOf(`
|
|
60
|
-
`,Z);z(Z+2,G<0?$.length:G),Z=G<0?$.length:G;continue}if(Q==="/"&&$[Z+1]==="*"){let G=$.indexOf("*/",Z+2);z(Z+2,G<0?$.length:G),Z=G<0?$.length:G+2;continue}Z+=1}return J.join("")}var t0={meta:{docs:"Report variables and parameters that are declared/assigned but never used"},check:($,J)=>{if(J.filePath.endsWith("/no-unused-vars.ts"))return[];if(J.filePath.endsWith(".d.ts"))return[];let Z=[],X=J.options||{},Y=typeof X.varsIgnorePattern==="string"?X.varsIgnorePattern:"^_",z=typeof X.argsIgnorePattern==="string"?X.argsIgnorePattern:"^_",Q=new RegExp(Y,"u"),G=new RegExp(z,"u"),q=lQ($),U=q.split(/\r?\n/),W=q,K=Array(U.length).fill(!1);(()=>{let j=[],O=!1,v=!1,k=!1,L=!1,h=!1,b="",P=()=>{if(b==="")return!0;if("=([{,;!&|?:+-*/%^~<>".includes(b))return!0;return!1};for(let I=0;I<U.length;I++){K[I]=j.length>0&&j[j.length-1]===-1;let S=U[I];for(let C=0;C<S.length;C++){let N=S[C];if(L){if(N==="*"&&C+1<S.length&&S[C+1]==="/")L=!1,C++;continue}if(h){h=!1;continue}let R=j.length>0&&j[j.length-1]===-1,D=j.length>0&&j[j.length-1]>=0;if(N==="\\"&&(O||v||k||R)){h=!0;continue}if(O){if(N==="'")O=!1;continue}if(v){if(N==='"')v=!1;continue}if(k){if(N==="["){let f=1,p=C+1;while(p<S.length){let d=S[p];if(d==="\\"){p+=2;continue}if(d==="]"){if(f--,f===0)break}p++}C=p;continue}if(N==="/"){k=!1;while(C+1<S.length&&/[gimsuvy]/.test(S[C+1]))C++}continue}if(R){if(N==="`")j.pop();else if(N==="$"&&C+1<S.length&&S[C+1]==="{")j.push(0),C++;continue}if(N==="/"&&C+1<S.length&&S[C+1]==="/")break;if(N==="/"&&C+1<S.length&&S[C+1]==="*"){L=!0,C++;continue}if(D){if(N==="`")j.push(-1),b="";else if(N==="'")O=!0,b="'";else if(N==='"')v=!0,b='"';else if(N==="{")j[j.length-1]++,b="{";else if(N==="}"){let f=j[j.length-1];if(f>0)j[j.length-1]=f-1;else j.pop();b="}"}else if(N==="/"&&P())k=!0;else if(!/\s/.test(N))b=N;continue}if(N==="`")j.push(-1),b="";else if(N==="'")O=!0,b="'";else if(N==='"')v=!0,b='"';else if(N==="/"&&P())k=!0;else if(!/\s/.test(N))b=N}}})();let V=new RegExp("^\\s*(?:const|let|var)\\s+(.+?);?\\s*$");for(let j=0;j<U.length;j++){if(K[j])continue;let O=U[j],v=O.match(V);if(!v)continue;let k=v[1],L=[],h="",b=0,P=0,I=null,S=!1;for(let C=0;C<k.length;C++){let N=k[C];if(S){S=!1,h+=N;continue}if(N==="\\"&&I){S=!0,h+=N;continue}if(!I){if(N==="/"&&k[C+1]==="/")break;if(N==="/"&&k[C+1]==="*"){C+=2;while(C<k.length&&!(k[C]==="*"&&k[C+1]==="/"))C++;C++;continue}if(N==="'")I="single";else if(N==='"')I="double";else if(N==="`")I="template";else if(N==="<")P++;else if(N===">")P--;else if(N==="("||N==="["||N==="{")b++;else if(N===")"||N==="]"||N==="}")b--;else if(N===","&&b===0&&P===0){L.push(h),h="";continue}}else if(I==="single"&&N==="'"||I==="double"&&N==='"'||I==="template"&&N==="`")I=null;h+=N}if(h)L.push(h);for(let C of L){let N=C.trim();if(!N)continue;let R=N.match(/^([$A-Z_][\w$]*)/i),D=[];if(R)D.push(R[1]);else if(N.startsWith("{")||N.startsWith("[")){let f=N[0],p=f==="{"?"}":"]",d=0,u=-1,x=null,y=!1;for(let g=0;g<N.length;g++){let m=N[g];if(y){y=!1;continue}if(m==="\\"&&x){y=!0;continue}if(!x){if(m==="'"||m==='"'||m==="`")x=m==="'"?"single":m==='"'?"double":"template";else if(m===f)d++;else if(m===p){if(d--,d===0){u=g;break}}}else if(x==="single"&&m==="'"||x==="double"&&m==='"'||x==="template"&&m==="`")x=null}if(u>0){let g=N.slice(1,u),m=[],$0="",K0=0,c=null,s=!1;for(let l=0;l<g.length;l++){let r=g[l];if(s){s=!1,$0+=r;continue}if(r==="\\"&&c){s=!0,$0+=r;continue}if(!c){if(r==="'"||r==='"'||r==="`"){c=r==="'"?"single":r==='"'?"double":"template",$0+=r;continue}if(r==="("||r==="{"||r==="[")K0++;if(r===")"||r==="}"||r==="]")K0--;if(r===","&&K0===0){m.push($0.trim()),$0="";continue}}else if(c==="single"&&r==="'"||c==="double"&&r==='"'||c==="template"&&r==="`")c=null;$0+=r}if($0.trim())m.push($0.trim());for(let l of m){if(l.startsWith("...")){let H0=l.slice(3).match(/^([$A-Z_][\w$]*)/i);if(H0)D.push(H0[1]);continue}let r=l.indexOf(":");if(r!==-1){let H0=l.slice(r+1).trim(),F0=0;for(let b0=0;b0<H0.length;b0++){let R0=H0[b0];if(R0==="("||R0==="{"||R0==="[")F0++;else if(R0===")"||R0==="}"||R0==="]")F0--;else if(R0==="="&&F0===0){H0=H0.slice(0,b0).trim();break}}let m0=H0.match(/^([$A-Z_][\w$]*)/i);if(m0)D.push(m0[1])}else{let H0=l,F0=0;for(let b0=0;b0<H0.length;b0++){let R0=H0[b0];if(R0==="("||R0==="{"||R0==="[")F0++;else if(R0===")"||R0==="}"||R0==="]")F0--;else if(R0==="="&&F0===0){H0=H0.slice(0,b0).trim();break}}let m0=H0.match(/^([$A-Z_][\w$]*)/i);if(m0)D.push(m0[1])}}}}for(let f of D){if(Q.test(f))continue;let p
|
|
60
|
+
`,Z);z(Z+2,G<0?$.length:G),Z=G<0?$.length:G;continue}if(Q==="/"&&$[Z+1]==="*"){let G=$.indexOf("*/",Z+2);z(Z+2,G<0?$.length:G),Z=G<0?$.length:G+2;continue}Z+=1}return J.join("")}var t0={meta:{docs:"Report variables and parameters that are declared/assigned but never used"},check:($,J)=>{if(J.filePath.endsWith("/no-unused-vars.ts"))return[];if(J.filePath.endsWith(".d.ts"))return[];let Z=[],X=J.options||{},Y=typeof X.varsIgnorePattern==="string"?X.varsIgnorePattern:"^_",z=typeof X.argsIgnorePattern==="string"?X.argsIgnorePattern:"^_",Q=new RegExp(Y,"u"),G=new RegExp(z,"u"),q=lQ($),U=q.split(/\r?\n/),W=q,K=Array(U.length).fill(!1);(()=>{let j=[],O=!1,v=!1,k=!1,L=!1,h=!1,b="",P=()=>{if(b==="")return!0;if("=([{,;!&|?:+-*/%^~<>".includes(b))return!0;return!1};for(let I=0;I<U.length;I++){K[I]=j.length>0&&j[j.length-1]===-1;let S=U[I];for(let C=0;C<S.length;C++){let N=S[C];if(L){if(N==="*"&&C+1<S.length&&S[C+1]==="/")L=!1,C++;continue}if(h){h=!1;continue}let R=j.length>0&&j[j.length-1]===-1,D=j.length>0&&j[j.length-1]>=0;if(N==="\\"&&(O||v||k||R)){h=!0;continue}if(O){if(N==="'")O=!1;continue}if(v){if(N==='"')v=!1;continue}if(k){if(N==="["){let f=1,p=C+1;while(p<S.length){let d=S[p];if(d==="\\"){p+=2;continue}if(d==="]"){if(f--,f===0)break}p++}C=p;continue}if(N==="/"){k=!1;while(C+1<S.length&&/[gimsuvy]/.test(S[C+1]))C++}continue}if(R){if(N==="`")j.pop();else if(N==="$"&&C+1<S.length&&S[C+1]==="{")j.push(0),C++;continue}if(N==="/"&&C+1<S.length&&S[C+1]==="/")break;if(N==="/"&&C+1<S.length&&S[C+1]==="*"){L=!0,C++;continue}if(D){if(N==="`")j.push(-1),b="";else if(N==="'")O=!0,b="'";else if(N==='"')v=!0,b='"';else if(N==="{")j[j.length-1]++,b="{";else if(N==="}"){let f=j[j.length-1];if(f>0)j[j.length-1]=f-1;else j.pop();b="}"}else if(N==="/"&&P())k=!0;else if(!/\s/.test(N))b=N;continue}if(N==="`")j.push(-1),b="";else if(N==="'")O=!0,b="'";else if(N==='"')v=!0,b='"';else if(N==="/"&&P())k=!0;else if(!/\s/.test(N))b=N}}})();let V=new RegExp("^\\s*(?:const|let|var)\\s+(.+?);?\\s*$");for(let j=0;j<U.length;j++){if(K[j])continue;let O=U[j],v=O.match(V);if(!v)continue;let k=v[1],L=[],h="",b=0,P=0,I=null,S=!1;for(let C=0;C<k.length;C++){let N=k[C];if(S){S=!1,h+=N;continue}if(N==="\\"&&I){S=!0,h+=N;continue}if(!I){if(N==="/"&&k[C+1]==="/")break;if(N==="/"&&k[C+1]==="*"){C+=2;while(C<k.length&&!(k[C]==="*"&&k[C+1]==="/"))C++;C++;continue}if(N==="'")I="single";else if(N==='"')I="double";else if(N==="`")I="template";else if(N==="<")P++;else if(N===">")P--;else if(N==="("||N==="["||N==="{")b++;else if(N===")"||N==="]"||N==="}")b--;else if(N===","&&b===0&&P===0){L.push(h),h="";continue}}else if(I==="single"&&N==="'"||I==="double"&&N==='"'||I==="template"&&N==="`")I=null;h+=N}if(h)L.push(h);for(let C of L){let N=C.trim();if(!N)continue;let R=N.match(/^([$A-Z_][\w$]*)/i),D=[];if(R)D.push(R[1]);else if(N.startsWith("{")||N.startsWith("[")){let f=N[0],p=f==="{"?"}":"]",d=0,u=-1,x=null,y=!1;for(let g=0;g<N.length;g++){let m=N[g];if(y){y=!1;continue}if(m==="\\"&&x){y=!0;continue}if(!x){if(m==="'"||m==='"'||m==="`")x=m==="'"?"single":m==='"'?"double":"template";else if(m===f)d++;else if(m===p){if(d--,d===0){u=g;break}}}else if(x==="single"&&m==="'"||x==="double"&&m==='"'||x==="template"&&m==="`")x=null}if(u>0){let g=N.slice(1,u),m=[],$0="",K0=0,c=null,s=!1;for(let l=0;l<g.length;l++){let r=g[l];if(s){s=!1,$0+=r;continue}if(r==="\\"&&c){s=!0,$0+=r;continue}if(!c){if(r==="'"||r==='"'||r==="`"){c=r==="'"?"single":r==='"'?"double":"template",$0+=r;continue}if(r==="("||r==="{"||r==="[")K0++;if(r===")"||r==="}"||r==="]")K0--;if(r===","&&K0===0){m.push($0.trim()),$0="";continue}}else if(c==="single"&&r==="'"||c==="double"&&r==='"'||c==="template"&&r==="`")c=null;$0+=r}if($0.trim())m.push($0.trim());for(let l of m){if(l.startsWith("...")){let H0=l.slice(3).match(/^([$A-Z_][\w$]*)/i);if(H0)D.push(H0[1]);continue}let r=l.indexOf(":");if(r!==-1){let H0=l.slice(r+1).trim(),F0=0;for(let b0=0;b0<H0.length;b0++){let R0=H0[b0];if(R0==="("||R0==="{"||R0==="[")F0++;else if(R0===")"||R0==="}"||R0==="]")F0--;else if(R0==="="&&F0===0){H0=H0.slice(0,b0).trim();break}}let m0=H0.match(/^([$A-Z_][\w$]*)/i);if(m0)D.push(m0[1])}else{let H0=l,F0=0;for(let b0=0;b0<H0.length;b0++){let R0=H0[b0];if(R0==="("||R0==="{"||R0==="[")F0++;else if(R0===")"||R0==="}"||R0==="]")F0--;else if(R0==="="&&F0===0){H0=H0.slice(0,b0).trim();break}}let m0=H0.match(/^([$A-Z_][\w$]*)/i);if(m0)D.push(m0[1])}}}}for(let f of D){if(Q.test(f))continue;let p=`${U.slice(0,j).join(`
|
|
61
|
+
`)}
|
|
62
|
+
${U.slice(j+1).join(`
|
|
63
|
+
`)}`;if(!new RegExp(`\\b${f}\\b`,"g").test(p))Z.push({filePath:J.filePath,line:j+1,column:Math.max(1,O.indexOf(f)+1),ruleId:"pickier/no-unused-vars",message:`'${f}' is assigned a value but never used. Allowed unused vars must match pattern: ${Y}`,severity:"error",help:`Either use this variable in your code, remove it, or prefix it with an underscore (_${f}) to mark it as intentionally unused`})}}}let A=(j)=>{let v=((h)=>{let b="",P=null,I=!1,S=0;for(let C=0;C<h.length;C++){let N=h[C];if(I){I=!1;continue}if(N==="\\"&&P){I=!0;continue}if(!P){if(N==="'")P="single";else if(N==='"')P="double";else if(N==="`")P="template";else if(N==="("||N==="{"||N==="[")S++;else if(N===")"||N==="}"||N==="]")S--;else if(N==="="&&S===0)return b}else if(P==="single"&&N==="'"||P==="double"&&N==='"'||P==="template"&&N==="`")P=null;b+=N}return b})(j);return((h)=>{let b="",P=0;while(P<h.length){let I=h[P];if(I===":"){P++;while(P<h.length&&/\s/.test(h[P]))P++;let S=0,C=0,N=null,R=!1;while(P<h.length){let D=h[P];if(R){R=!1,P++;continue}if(D==="\\"&&N){R=!0,P++;continue}if(!N){if(D==="'")N="single";else if(D==='"')N="double";else if(D==="`")N="template";else if(D==="<")C++;else if(D===">")C--;else if(D==="("||D==="{"||D==="[")S++;else if(D===")"||D==="}"||D==="]")if(S>0)S--;else break;else if(D===","&&S===0&&C===0)break}else if(N==="single"&&D==="'"||N==="double"&&D==='"'||N==="template"&&D==="`")N=null;P++}continue}b+=I,P++}return b})(v).split(/[^$\w]+/).filter((h)=>h&&h!=="undefined")},_=(j,O)=>{let v=!1,k=0,L=0,h=!1,b=0,P=null,I=!1,S=!0,C="",N=!1,R=!1,D=[],f=!1;for(let p=j;p<U.length;p++){let d=U[p],u=d,x=D.length>0&&D[D.length-1]===-1,y=-1,g=null,m=!1;if(!x)for(let c=0;c<d.length-1;c++){let s=d[c],l=d[c+1];if(m){m=!1;continue}if(s==="\\"&&g){m=!0;continue}if(!g){if(s==="'")g="single";else if(s==='"')g="double";else if(s==="`")g="template";else if(s==="/"&&l==="/"){y=c;break}}else if(g==="single"&&s==="'"||g==="double"&&s==='"'||g==="template"&&s==="`")g=null}if(y>=0)u=d.slice(0,y);let $0=(c)=>{let s="",l=0,r=null,H0=!1;while(l<c.length){let F0=c[l];if(H0){H0=!1,s+=F0,l++;continue}if(F0==="\\"&&r){H0=!0,s+=F0,l++;continue}if(!r){if(F0==="'")r="single";else if(F0==='"')r="double";else if(F0==="`")r="template";else if(F0==="/"){let m0=l>0?c.slice(0,l).trimEnd():"",b0=new RegExp("[=([{,:;!&|?]$");if(!m0||b0.test(m0)||m0.endsWith("return")){l++;while(l<c.length){if(c[l]==="\\"){l+=2;continue}if(c[l]==="/"){l++;while(l<c.length&&/[gimsuvy]/.test(c[l]))l++;break}l++}continue}}}else if(r==="single"&&F0==="'"||r==="double"&&F0==='"'||r==="template"&&F0==="`")r=null;s+=F0,l++}return s};if(!x)u=$0(u);let K0=0;if(!v){let c=-1,s=S?typeof O==="number"?O:0:0;if(S=!1,s>=u.length){let l=u.indexOf("=>");s=l>=0?l+2:0}for(let l=s;l<u.length;l++){let r=u[l];if(I){I=!1;continue}if(r==="\\"&&P){I=!0;continue}if(!P){if(r!==" "&&r!=="\t"&&r!==`
|
|
61
64
|
`&&r!=="\r"&&r!=="{"&&r!=="}"&&L===0)C=r;if(r==="'")P="single";else if(r==='"')P="double";else if(r==="`")P="template";else if(r==="<")b++;else if(r===">")b=Math.max(0,b-1);else if(r==="{"){if(L===0){if(h&&b===0&&!vZ.has(C)){c=l;break}}L++}else if(r==="}"){if(L>0){if(L--,L===0)h=!0,C="}"}}}else if(P==="single"&&r==="'"||P==="double"&&r==='"'||P==="template"&&r==="`")P=null}if(c===-1){if(L>0&&vZ.has(C))continue;for(let l=s;l<u.length;l++)if(u[l]==="{"&&!P){c=l;break}}if(c===-1)continue;v=!0,k=1,K0=c+1,j=p}for(let c=K0;c<u.length;c++){let s=u[c];if(f){f=!1;continue}let l=D.length>0&&D[D.length-1]===-1,r=D.length>0&&D[D.length-1]>=0;if(s==="\\"&&(N||R||l)){f=!0;continue}if(N){if(s==="'")N=!1;continue}if(R){if(s==='"')R=!1;continue}if(l){if(s==="`")D.pop();else if(s==="$"&&c+1<u.length&&u[c+1]==="{")D[D.length-1]=0,c++;continue}if(r){if(s==="/"){let H0=u.slice(0,c).trimEnd();if(!H0||/[=([{,:;!&|?]$/.test(H0)||H0.endsWith("return")){c++;while(c<u.length){if(u[c]==="\\"){c+=2;continue}if(u[c]==="/"){while(c+1<u.length&&/[gimsuvy]/.test(u[c+1]))c++;break}c++}continue}}if(s==="`"){D.push(-1);continue}if(s==="'"){N=!0;continue}if(s==='"'){R=!0;continue}if(s==="{"){D[D.length-1]++;continue}if(s==="}")if(D[D.length-1]>0)D[D.length-1]--;else D[D.length-1]=-1;continue}if(s==="'")N=!0;else if(s==='"')R=!0;else if(s==="`")D.push(-1);else if(s==="{")k++;else if(s==="}"){if(k--,k===0)return{from:j,to:p}}}}return null},w=(j,O)=>{let v={parenDepth:0,braceDepth:0,bracketDepth:0,inTemplate:!1},k=(S)=>{for(let C=0;C<S.length;C++){let N=S[C];if(N==="`")v.inTemplate=!v.inTemplate;else if(N==="(")v.parenDepth++;else if(N===")")v.parenDepth--;else if(N==="{")v.braceDepth++;else if(N==="}")v.braceDepth--;else if(N==="[")v.bracketDepth++;else if(N==="]")v.bracketDepth--}},L=()=>v.parenDepth>0||v.braceDepth>0||v.bracketDepth>0||v.inTemplate,h=(S)=>/(?:\?|:|\.|,|&&|\|\||\?\?|\+|-|\*|\/|%|\*\*)$/.test(S.trimEnd()),b=(S)=>/^(?:\?|:|\.|,|&&|\|\||\?\?|\+|-|\*|\/|%|\*\*)/.test(S.trimStart()),P=U[j].slice(O+2);k(P);let I=j+1;while(I<U.length){let S=I===j+1?P:U[I-1];if(!(!P.trim()||L()||h(S)||b(U[I])))break;P+=`
|
|
62
65
|
${U[I]}`,k(U[I]),I++}return P},F=[],M=!1,T=!1,E=!1;for(let j=0;j<U.length;j++){let O=U[j];if(/^\s*\/\//.test(O))continue;if(K[j])continue;let v=O,k=null,L=!1,h=!1;for(let N=0;N<O.length-1;N++){let R=O[N],D=O[N+1];if(h){h=!1;continue}if(R==="\\"&&(k||L)){h=!0;continue}if(!k&&!L){if(R==="'")k="single";else if(R==='"')k="double";else if(R==="`")k="template";else if(R==="/"){let f=O[N-1]||"",p=N>=2?O.slice(N-2,N):"";if(new RegExp("[=([{,:;!?]").test(f)||p==="&&"||p==="||"||/^\s*$/.test(O.slice(0,N)))L=!0;else if(D==="/"){v=O.slice(0,N);break}}}else if(k){if(k==="single"&&R==="'"||k==="double"&&R==='"'||k==="template"&&R==="`")k=null}else if(L&&R==="/")L=!1}let I=((N)=>{let R="",D=0;while(D<N.length){if(N[D]==="/"){let f=D>0?N.slice(0,D).trimEnd():"",p=new RegExp("[=([{,:;!&|?]$");if(!f||p.test(f)||f.endsWith("return")){D++;while(D<N.length){if(N[D]==="\\"){D+=2;continue}if(N[D]==="/"){D++;while(D<N.length&&/[gimsuvy]/.test(N[D]))D++;break}D++}continue}}R+=N[D],D++}return R})(v).replace(/'(?:[^'\\]|\\.)*'/g,"''").replace(/"(?:[^"\\]|\\.)*"/g,'""');{let N="";for(let R=0;R<I.length;R++){let D=I[R];if(E){E=!1;let d=F.length>0&&F[F.length-1]===-1;N+=d?" ":D;continue}let f=F.length>0&&F[F.length-1]===-1,p=F.length>0&&F[F.length-1]>=0;if(D==="\\"&&(M||T||f)){E=!0,N+=f?" ":D;continue}if(M){if(D==="'")M=!1;N+=D;continue}if(T){if(D==='"')T=!1;N+=D;continue}if(f){if(D==="`")F.pop();else if(D==="$"&&R+1<I.length&&I[R+1]==="{")F[F.length-1]=0,N+=" ",R++;else N+=" ";continue}if(p){if(D==="`")F.push(-1),N+=" ";else if(D==="'")M=!0,N+=D;else if(D==='"')T=!0,N+=D;else if(D==="{")F[F.length-1]++,N+=D;else if(D==="}")if(F[F.length-1]>0)F[F.length-1]--,N+=D;else F[F.length-1]=-1,N+=" ";else N+=D;continue}if(D==="`")F.push(-1),N+=" ";else if(D==="'")M=!0,N+=D;else if(D==='"')T=!0,N+=D;else N+=D}I=N}let S=I.match(/\bfunction\b/);if(S){if(O.includes("function scanContent")||O.includes("function findMatching"))continue;if(I.slice(S.index+8).trimStart().startsWith(":"))continue;let R=I.slice(0,S.index).trimEnd();if(R.endsWith(".")||R.endsWith("?."))continue;let D=S.index,f=O.indexOf("(",D);if(f===-1)continue;let p=0,d=-1,u=j,x="";for(let $0=j;$0<U.length;$0++){let K0=$0===j?U[$0]:U[$0],c=$0===j?f:0;for(let s=c;s<K0.length;s++)if(K0[s]==="(")p++;else if(K0[s]===")"){if(p--,p===0){if(d=s,u=$0,j===$0)x=O.slice(f+1,d);else{x=O.slice(f+1);for(let l=j+1;l<$0;l++)x+=` ${U[l]}`;x+=` ${K0.slice(0,d)}`}break}}if(d!==-1)break}if(d===-1)continue;let y=A(x),g=_(u,d),m="";if(g)if(g.from===u){let $0=U[g.from],K0=$0.lastIndexOf("{"),c=K0>=0?$0.slice(K0+1):"";if(g.to>g.from)m=`${c}
|
|
63
66
|
${U.slice(g.from+1,g.to+1).join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-h6ac3d60.js";var e="pickier",u="module",t="0.1.
|
|
2
|
+
import"./chunk-h6ac3d60.js";var e="pickier",u="module",t="0.1.47",r="Format, lint and more in a fraction of seconds.",s="Chris Breuer <chris@stacksjs.org>",l="MIT",p="https://github.com/pickier/pickier#readme",b={type:"git",url:"git+https://github.com/pickier/pickier.git"},m={url:"https://github.com/pickier/pickier/issues"},c=["pickier","linter","formatter","bun","fast"],o={".":{types:"./dist/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},a="./dist/src/index.js",x="./dist/index.d.ts",d={pickier:"./dist/bin/cli.js"},w=["README.md","dist"],k={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile",compile:"bun build ./bin/cli.ts --compile --minify --outfile bin/pickier","compile:all":"bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64","compile:linux-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64","compile:linux-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64","compile:linux-x64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl","compile:linux-arm64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl","compile:windows-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe","compile:windows-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe","compile:darwin-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64","compile:darwin-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",zip:"bun run zip:all","zip:all":"bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64","zip:linux-x64":"zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64","zip:linux-arm64":"zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64","zip:linux-x64-musl":"zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl","zip:linux-arm64-musl":"zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl","zip:windows-x64":"zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe","zip:windows-arm64":"zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe","zip:darwin-x64":"zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64","zip:darwin-arm64":"zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",prepublishOnly:"bun --bun run build && bun run compile:all && bun run zip",test:"PICKIER_NO_AUTO_CONFIG=1 bun test --coverage","test:core":"PICKIER_NO_AUTO_CONFIG=1 bun test test/core","test:format":"PICKIER_NO_AUTO_CONFIG=1 bun test test/format","test:lint":"PICKIER_NO_AUTO_CONFIG=1 bun test test/lint","test:rules":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules","test:rules:sort":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/sort","test:rules:style":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/style","test:rules:quality":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/quality","test:rules:imports":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/imports","test:rules:typescript":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/typescript","test:rules:regexp":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/regexp","test:plugin":"PICKIER_NO_AUTO_CONFIG=1 bun test test/plugin","test:watch":"PICKIER_NO_AUTO_CONFIG=1 bun test --watch"},I={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},O={"@stacksjs/ts-spell-check":"^0.1.0"},_={bunfig:"^0.15.13"},z={name:e,type:u,version:t,description:r,author:s,license:l,homepage:p,repository:b,bugs:m,keywords:c,exports:o,module:a,types:x,bin:d,files:w,scripts:k,dependencies:I,optionalDependencies:O,devDependencies:_};export{t as version,x as types,u as type,k as scripts,b as repository,O as optionalDependencies,e as name,a as module,l as license,c as keywords,p as homepage,w as files,o as exports,_ as devDependencies,r as description,I as dependencies,z as default,m as bugs,d as bin,s as author};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f}from"./chunk-
|
|
2
|
+
import{b as a,c as b,d as c,e as d,f as e,g as f}from"./chunk-4emmmy24.js";import"./chunk-1r3qehn7.js";import"./chunk-bf2bz66g.js";import"./chunk-h6ac3d60.js";export{d as scanContentOptimized,e as scanContent,b as runLintProgrammatic,f as runLint,a as lintText,c as applyPlugins};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{D as H,k as G}from"./chunk-1r3qehn7.js";import{L as K}from"./chunk-h6ac3d60.js";import{readFileSync as M,statSync as N,writeFileSync as Q}from"fs";import{isAbsolute as R,resolve as T}from"path";import U from"process";async function w(k,j){let B=j.mode||"auto";if(B==="format"&&k.length===1&&!/[*?[\]{}()!]/.test(k[0]))try{let q=k[0],z=R(q)?q:T(U.cwd(),q);if(N(z).isFile()){let J=await H(j.config),D=M(z,"utf8"),E=G(D,J,z);if(j.check&&E!==D)return 1;if(j.write&&E!==D)Q(z,E,"utf8");return 0}}catch{}let{runLint:x}=await import("./chunk-
|
|
2
|
+
import{D as H,k as G}from"./chunk-1r3qehn7.js";import{L as K}from"./chunk-h6ac3d60.js";import{readFileSync as M,statSync as N,writeFileSync as Q}from"fs";import{isAbsolute as R,resolve as T}from"path";import U from"process";async function w(k,j){let B=j.mode||"auto";if(B==="format"&&k.length===1&&!/[*?[\]{}()!]/.test(k[0]))try{let q=k[0],z=R(q)?q:T(U.cwd(),q);if(N(z).isFile()){let J=await H(j.config),D=M(z,"utf8"),E=G(D,J,z);if(j.check&&E!==D)return 1;if(j.write&&E!==D)Q(z,E,"utf8");return 0}}catch{}let{runLint:x}=await import("./chunk-cynz1zp8.js");if(B==="lint")return x(k,j);if(B==="format"){let q={...j,fix:!0,dryRun:!!j.check,ext:j.ext,_formatOnly:!0};return x(k,q)}if(!(j.fix===!0||j.write===!0||j.check===!0))return x(k,j);let I={...j,fix:!0,dryRun:!!j.check,ext:j.ext};return x(k,I)}
|
|
3
3
|
export{w as h};
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as t,b as f,c as m,g as e}from"../chunk-
|
|
2
|
+
import{a as t,b as f,c as m,g as e}from"../chunk-4emmmy24.js";import{h as x}from"../chunk-tz5268rh.js";import{A as F,B as G,C as H,D as I,E as J,F as K,G as M,H as N,k as O,l as P,m as R,n as T,o as U,p as a,q as b,r as j,s as q,t as v,u as w,v as z,w as A,x as B,y as D,z as E}from"../chunk-1r3qehn7.js";import{I as r,K as o}from"../chunk-bf2bz66g.js";import"../chunk-h6ac3d60.js";export{B as yellow,N as shouldIgnorePath,m as runLintProgrammatic,e as runLint,t as runFormat,x as run,A as red,H as mergeConfig,I as loadConfigFromPath,f as lintText,K as isCodeFile,R as hasIndentIssue,z as green,E as gray,a as glob,v as getRuleSetting,T as formatImports,O as formatCode,J as expandPatterns,P as detectQuoteIssues,r as defaultConfig,b as createLimiter,M as createIgnoreMatcher,o as config,G as colors,w as colorize,F as bold,D as blue,q as UNIVERSAL_IGNORES,U as MAX_FIXER_PASSES,j as ENV};
|