pickier 0.1.76 → 0.1.77
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-t5wtga4g.js → chunk-1bknx6m2.js} +1 -1
- package/dist/{chunk-10et4075.js → chunk-292kxjda.js} +1 -1
- package/dist/{chunk-w9jfz4rm.js → chunk-4j76mmf8.js} +1 -1
- package/dist/chunk-c0hw4t4x.js +2 -0
- package/dist/{chunk-jdd9zkjc.js → chunk-esbyn87s.js} +1 -1
- package/dist/chunk-jq4ej1qc.js +2 -0
- package/dist/chunk-wfb6evqs.js +2 -0
- package/dist/{chunk-mq0hh9yt.js → chunk-y545551h.js} +2 -2
- package/dist/src/index.js +1 -1
- package/dist/src/lint-worker.js +1 -1
- package/dist/src/utils.d.ts +4 -4
- package/package.json +1 -1
- package/dist/chunk-3ezjct24.js +0 -2
- package/dist/chunk-rt9y8epr.js +0 -2
- package/dist/chunk-w8g51z9j.js +0 -2
package/dist/bin/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
async function P(){let i=process.argv.slice(2),a=i[0]??"",x=a==="run",C=x||a==="lint"||a==="format"?1:0,c=x?"auto":a==="format"?"format":"lint",f=!1,m=!1,w=!1,k=!1,b,y,u=!1,d,h,l=[],v=!i.some((e)=>e==="version"||e==="help"||e==="--version"||e==="-v"||e==="--help"||e==="-h");for(let e=C;e<i.length;e++){let t=i[e];if(t==="--mode")c=i[++e]||"auto";else if(t==="--format")w=!0,c="format";else if(t==="--check")f=!0;else if(t==="--write")m=!0;else if(t==="--config")b=i[++e];else if(t==="--verbose")k=!0;else if(t==="--ext")y=i[++e];else if(t==="--ignore-path")e++;else if(t==="--cache")u=!0;else if(t==="--cache-location")d=i[++e];else if(t==="--reporter"){let o=i[++e];h=o==="json"||o==="compact"?o:"stylish"}else if(t==="--fix"||t==="--dry-run"||t==="--max-warnings"){v=!1,l.length=0;break}else if(t.startsWith("--"));else l.push(t)}if(w&&!f)m=!0;if(v&&(c==="format"||c==="auto"||c==="lint")&&l.length>0){let{runUnified:e}=await import("../chunk-
|
|
3
|
+
async function P(){let i=process.argv.slice(2),a=i[0]??"",x=a==="run",C=x||a==="lint"||a==="format"?1:0,c=x?"auto":a==="format"?"format":"lint",f=!1,m=!1,w=!1,k=!1,b,y,u=!1,d,h,l=[],v=!i.some((e)=>e==="version"||e==="help"||e==="--version"||e==="-v"||e==="--help"||e==="-h");for(let e=C;e<i.length;e++){let t=i[e];if(t==="--mode")c=i[++e]||"auto";else if(t==="--format")w=!0,c="format";else if(t==="--check")f=!0;else if(t==="--write")m=!0;else if(t==="--config")b=i[++e];else if(t==="--verbose")k=!0;else if(t==="--ext")y=i[++e];else if(t==="--ignore-path")e++;else if(t==="--cache")u=!0;else if(t==="--cache-location")d=i[++e];else if(t==="--reporter"){let o=i[++e];h=o==="json"||o==="compact"?o:"stylish"}else if(t==="--fix"||t==="--dry-run"||t==="--max-warnings"){v=!1,l.length=0;break}else if(t.startsWith("--"));else l.push(t)}if(w&&!f)m=!0;if(v&&(c==="format"||c==="auto"||c==="lint")&&l.length>0){let{runUnified:e}=await import("../chunk-c0hw4t4x.js"),t=await e(l,{mode:c,check:f,write:m,verbose:k,config:b,ext:y,...u&&{cache:u},...d&&{cacheLocation:d},...h&&{reporter:h}});process.exit(t)}let{CLI:U}=await import("../chunk-p0j2ra3t.js"),{version:I}=await import("../chunk-esbyn87s.js"),r=new U("pickier"),p=(e)=>{let[t,o]=e;return[Array.isArray(t)?t.filter((g)=>typeof g==="string"):[],o&&typeof o==="object"?o:{}]};r.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("--cache-location <path>","Where the cache lives (default .pickiercache)").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...e)=>{let[t,o]=p(e);if(t.length===0){r.outputHelp();return}let{runUnified:s}=await import("../chunk-c0hw4t4x.js"),n;if(o.format){if(n="format",!o.check)o.write=!0}else n="lint";let g=await s(t,{...o,mode:n});process.exit(g)}),r.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("--cache-location <path>","Where the cache lives (default .pickiercache)").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...e)=>{let[t,o]=p(e),{runUnified:s}=await import("../chunk-c0hw4t4x.js"),n=await s(t,{...o,mode:"lint"});process.exit(n)}),r.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(...e)=>{let[t,o]=p(e),{runUnified:s}=await import("../chunk-c0hw4t4x.js"),n=await s(t,{...o,mode:"format"});process.exit(n)}),r.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("--cache-location <path>","Where the cache lives (default .pickiercache)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...e)=>{let[t,o]=p(e),{runUnified:s}=await import("../chunk-c0hw4t4x.js"),n=await s(t,o);process.exit(n)}),r.command("version","Show the version of the CLI").action(async()=>{let{version:e}=await import("../chunk-esbyn87s.js");process.stdout.write(`${e}
|
|
4
4
|
`)}),r.version(I),r.help(),r.parse()}P().catch((i)=>{let a=i instanceof Error?i.message:String(i);process.stderr.write(`pickier: ${a}
|
|
5
5
|
`),process.exit(1)});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{p,u}from"./chunk-
|
|
2
|
+
import{p,u}from"./chunk-y545551h.js";import{readFileSync as O,statSync as y,writeFileSync as x}from"fs";import{isAbsolute as d,resolve as l}from"path";function o(r){return r.write===!0||r.fix===!0}async function B(r,t){let a=t.mode||"auto";if(a==="format"&&r.length===1&&!/[*?[\]{}()!]/.test(r[0]))try{let n=r[0],i=d(n)?n:l(process.cwd(),n);if(y(i).isFile()){let m=await u(t.config),f=O(i,"utf8"),c=p(f,m,i);if(c===f)return 0;if(o(t))return x(i,c,"utf8"),0}}catch{}let{runLint:e}=await import("./chunk-wfb6evqs.js");if(a==="lint")return e(r,t);if(a==="format"){let n={...t,fix:!0,dryRun:!o(t),ext:t.ext,_formatOnly:!0};return e(r,n)}if(!(t.fix===!0||t.write===!0||t.check===!0))return e(r,t);let s={...t,fix:!0,dryRun:!!t.check,ext:t.ext};return e(r,s)}
|
|
3
3
|
export{B};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var oe="pickier",ae="module",F="0.1.
|
|
2
|
+
var oe="pickier",ae="module",F="0.1.77",le="Format, lint and more in a fraction of seconds.",ce="Chris Breuer <chris@stacksjs.org>",ue="MIT",fe="https://github.com/pickier/pickier#readme",me={type:"git",url:"git+https://github.com/pickier/pickier.git"},he={url:"https://github.com/pickier/pickier/issues"},de=["pickier","linter","formatter","bun","fast"],pe={".":{types:"./dist/src/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},ge="./dist/src/index.js",ye="./dist/src/index.d.ts",be={pickier:"./dist/bin/cli.js"},we=["README.md","dist"],xe={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile","build:native":"bun scripts/build-native.ts",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 scripts/build-native.ts --required && 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"},ke={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},Re={"@stacksjs/ts-spell-check":"^0.1.0"},$e={bunfig:"^0.15.13"},ve={name:oe,type:ae,version:F,description:le,author:ce,license:ue,homepage:fe,repository:me,bugs:he,keywords:de,exports:pe,module:ge,types:ye,bin:be,files:we,scripts:xe,dependencies:ke,optionalDependencies:Re,devDependencies:$e};
|
|
3
3
|
export{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{g,C,q,G,c,S,p,O,M,E,L,f,r,m,N,o,t,u,x,T,h,d}from"./chunk-
|
|
2
|
+
import{g,C,q,G,c,S,p,O,M,E,L,f,r,m,N,o,t,u,x,T,h,d}from"./chunk-y545551h.js";import{F}from"./chunk-292kxjda.js";import{e,k}from"./chunk-qq03kpe0.js";import{readdirSync as Vo,readFileSync as Yn,statSync as Cn,writeFileSync as Hn}from"fs";import{isAbsolute as Xe,join as Ko,relative as Ln,resolve as Je,sep as Ho}from"path";import{readFileSync as po,writeFileSync as mc}from"fs";import{isAbsolute as pc,relative as fo,resolve as dc}from"path";var _n=Promise.resolve();function ct(b){let y=null,s=null,l=()=>(s??=import("./chunk-dxrcbgyc.js").then((i)=>(y=new i.Logger(b,{showTags:!1}),y)),s),n=(i,w)=>{if(y){y[i](...w);return}_n=_n.then(l).then((a)=>{a[i](...w)}).catch(()=>{})};return{debug:(...i)=>n("debug",i),info:(...i)=>n("info",i),warn:(...i)=>n("warn",i),error:(...i)=>n("error",i),ready:async()=>{await l()}}}function R(){return _n}var at={meta:{docs:"Enforce return statements in callbacks of array methods",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),i=new RegExp(`\\.(${["map","filter","find","findIndex","findLast","findLastIndex","every","some","reduce","reduceRight","sort","flatMap"].join("|")})\\s*\\(`,"g");for(let w=0;w<l.length;w++){let a=l[w],I;for(I=i.exec(a);I!==null;I=i.exec(a)){let P=I[1],_=I.index+I[0].length,D=a.slice(_),j=D.match(/^\s*(?:\(([^)]*)\)|([a-z_$][\w$]*))\s*=>/i),B=D.match(/^\s*function\s*(?:[a-zA-Z_$][\w$]*\s*)?\(/);if(j){let Z=D.slice(j[0].length).trim();if(Z.startsWith("{")){let z=!1,Y=0,X=Z,J=w;while(J<l.length){let te=J===w?X:l[J];for(let Q=0;Q<te.length;Q++){let ee=te[Q];if(ee==="{")Y++;if(ee==="}"){if(Y--,Y===0){if(!z)s.push({filePath:y.filePath,line:w+1,column:I.index+1,ruleId:"eslint/array-callback-return",message:`Array method '${P}' callback should return a value`,severity:"error"});break}}}if(te.match(new RegExp("\\breturn\\s+[^;]")))z=!0;if(Y===0)break;J++,X=l[J]||""}}}else if(B){let Z=!1,z=0,Y=w,X=!1;while(Y<l.length){let J=l[Y];for(let te=0;te<J.length;te++){let Q=J[te];if(Q==="{")z++,X=!0;else if(Q==="}"){if(z--,z===0&&X){if(!Z)s.push({filePath:y.filePath,line:w+1,column:I.index+1,ruleId:"eslint/array-callback-return",message:`Array method '${P}' callback should return a value`,severity:"error"});break}}}if(X&&J.match(new RegExp("\\breturn\\s+[^;]")))Z=!0;if(z===0&&X)break;Y++}}}}return s}};var ut={meta:{docs:"Require super() calls in constructors of derived classes",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),n=!1,i=!1,w=0,a=0,I=!1;for(let P=0;P<l.length;P++){let _=l[P];if(_.match(/\bclass\s+\w+\s+extends\s+\w+/))n=!0;if(n&&_.match(/\bconstructor\s*\(/))i=!0,w=P+1,a=0,I=!1;if(i){for(let D of _){if(D==="{")a++;if(D==="}")a--}if(_.match(/\bsuper\s*\(/))I=!0;if(a===0&&_.includes("}")){if(!I)s.push({filePath:y.filePath,line:w,column:1,ruleId:"eslint/constructor-super",message:"Constructors of derived classes must call super()",severity:"error"});i=!1,n=!1}}}return s}};var ft={meta:{docs:'Enforce "for" loop update clause moving counter in the right direction',recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=new RegExp("\\bfor\\s*\\(\\s*(?:(?:let|var|const)\\s*)?(\\w+)\\s*=[^;]+;\\s*(\\w+)\\s*([<>]=?)[^;]+;\\s*(\\w+)(\\+\\+|--|[\\s+-]=)"),a=i.match(w);if(a){let I=a[1],P=a[2],_=a[3],D=a[4],j=a[5];if(I===P&&P===D){let B=j.includes("+"),Z=_.includes("<");if(Z&&!B||!Z&&B)s.push({filePath:y.filePath,line:n+1,column:1,ruleId:"eslint/for-direction",message:"The update clause in this loop moves the variable in the wrong direction",severity:"error"})}}}return s}};var mt={meta:{docs:"Enforce return statements in getters",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let w=l[n].match(/\bget\s+(\w+)\s*\(/);if(w){let a=w[1],I=!1,P=0,_=n;while(_<l.length){let D=l[_];for(let B of D){if(B==="{")P++;if(B==="}"){if(P--,P===0){if(!I)s.push({filePath:y.filePath,line:n+1,column:1,ruleId:"eslint/getter-return",message:`Getter '${a}' must return a value`,severity:"error"});break}}}let j=new RegExp("\\breturn\\s+[^;]");if(D.match(j))I=!0;if(P===0)break;_++}}}return s}};var pt={meta:{docs:"Disallow async functions as Promise executor",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/new\s+Promise\s*\(\s*async\s*(?:\(|function)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i))s.push({filePath:y.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-async-promise-executor",message:"Promise executor functions should not be async",severity:"error"})}return s}};var dt={meta:{docs:"Disallow comparing against -0",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/([!=]==?)\s*-0\b|\b-0\s*([!=]==?)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i))s.push({filePath:y.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-compare-neg-zero",message:"Do not use the '-0' literal in comparisons",severity:"error"})}return s}};var ht={meta:{docs:"Disallow assignment operators in conditional expressions",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\b(if|while)\s*\([^)]*\b(\w+)\s*=\s*(?!=)[^)]*\)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let I=a[0];if(/===|==/.test(I))continue;if(i.substring(0,a.index).includes("//"))continue;s.push({filePath:y.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/no-cond-assign",message:"Expected a conditional expression and instead saw an assignment",severity:"error"})}}return s}};var gt={meta:{docs:"Disallow reassigning const variables",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),n=new Map;for(let i=0;i<l.length;i++){let w=l[i],a=w.match(/\bconst\s+(\w+)/);if(a)n.set(a[1],i);let I=/\b(\w+)\s*=(?!=)/g,P;for(P=I.exec(w);P!==null;P=I.exec(w)){let _=P[1],D=w.substring(0,P.index);if(!/\b(?:const|let|var)\s*$/.test(D)&&n.has(_))s.push({filePath:y.filePath,line:i+1,column:Math.max(1,P.index+1),ruleId:"eslint/no-const-assign",message:`'${_}' is constant`,severity:"error"})}}return s}};var bt={meta:{docs:"Disallow constant expressions in conditions",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=[{pattern:/\b(if|while)\s*\(\s*(true|false)\s*\)/g,type:"boolean"},{pattern:/\b(if|while)\s*\(\s*(\d+)\s*\)/g,type:"number"},{pattern:/\b(if|while)\s*\(\s*(['"`][^'"`]*['"`])\s*\)/g,type:"string"}];for(let{pattern:a,type:I}of w){let P;while((P=a.exec(i))!==null){let _=P[1];if(i.substring(0,P.index).includes("//"))continue;s.push({filePath:y.filePath,line:n+1,column:Math.max(1,P.index+_.length+2),ruleId:"eslint/no-constant-condition",message:"Unexpected constant condition",severity:"error"})}}}return s}};var yt={meta:{docs:"Disallow duplicate class members",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),n=!1,i=new Set,w=0;for(let a=0;a<l.length;a++){let I=l[a];if(I.match(/\bclass\s+\w+/))n=!0,i=new Set,w=0;if(n){for(let _ of I){if(_==="{")w++;if(_==="}"){if(w--,w===0)n=!1}}let P=[...I.matchAll(/^\s*(?:(?:public|private|protected|static|readonly|async)\s*)?(?:get|set)?\s*(\w+)\s*\(/g),...I.matchAll(/^\s*(?:(?:public|private|protected|static|readonly)\s*)?(\w+)\s*[:=]/g)];for(let _ of P){let D=_[1];if(i.has(D))s.push({filePath:y.filePath,line:a+1,column:1,ruleId:"eslint/no-dupe-class-members",message:`Duplicate class member '${D}'`,severity:"error"});else i.add(D)}}}return s}};var Qe={meta:{docs:"Disallow duplicate keys in object literals",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),n=/\{\s*$/,i=/^\s*(?:(['"`])(.+?)\1|(\w+))\s*:/;for(let w=0;w<l.length;w++){let a=l[w];if(!n.test(a)&&!a.includes("{"))continue;let I=new Map,P=(a.match(/\{/g)||[]).length-(a.match(/\}/g)||[]).length,_=w;for(let D=w+1;D<l.length&&P>0;D++){let j=l[D];P+=(j.match(/\{/g)||[]).length,P-=(j.match(/\}/g)||[]).length;let B=j.match(i);if(B){let Z=B[2]||B[3];if(Z)if(I.get(Z)!==void 0)s.push({filePath:y.filePath,line:D+1,column:Math.max(1,j.search(/\S/)+1),ruleId:"eslint/no-dupe-keys",message:`Duplicate key '${Z}'`,severity:"error"});else I.set(Z,D)}if(P===0)break}}return s},fix:(b,y)=>{let s=Qe.check(b,y);if(s.length===0)return b;let l=b.split(/\r?\n/),n=new Set(s.map((w)=>w.line-1));return l.filter((w,a)=>!n.has(a)).join(`
|
|
3
3
|
`)}};var xt={meta:{docs:"Disallow duplicate case labels in switch statements",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),n=!1,i=new Set,w=-1;for(let a=0;a<l.length;a++){let I=l[a],P=I.trim();if(/\bswitch\s*\(/.test(P)){n=!0,i=new Set,w=a;continue}if(n&&P==="}"&&a>w){let _=l[w].match(/^\s*/)?.[0].length||0;if((I.match(/^\s*/)?.[0].length||0)<=_+2)n=!1,i=new Set}if(n){let _=P.match(/^case\s+(.+?)\s*:/);if(_){let D=_[1].trim();if(i.has(D))s.push({filePath:y.filePath,line:a+1,column:Math.max(1,I.indexOf("case")+1),ruleId:"eslint/no-duplicate-case",message:`Duplicate case label '${D}'`,severity:"error"});else i.add(D)}}}return s}};var Rt={meta:{docs:"Disallow empty destructuring patterns",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\{\s*\}\s*=/g,a=/\[\s*\]\s*=/g,I;for(I=w.exec(i);I!==null;I=w.exec(i)){if(i.substring(0,I.index).includes("//"))continue;s.push({filePath:y.filePath,line:n+1,column:Math.max(1,I.index+1),ruleId:"eslint/no-empty-pattern",message:"Unexpected empty object pattern",severity:"error"})}for(I=a.exec(i);I!==null;I=a.exec(i)){if(i.substring(0,I.index).includes("//"))continue;s.push({filePath:y.filePath,line:n+1,column:Math.max(1,I.index+1),ruleId:"eslint/no-empty-pattern",message:"Unexpected empty array pattern",severity:"error"})}}return s}};var wt={meta:{docs:"Disallow fallthrough of case statements",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),n=!1,i=-1,w=!1;for(let a=0;a<l.length;a++){let P=l[a].trim();if(/\bswitch\s*\(/.test(P)){n=!0;continue}if(n){if(/^case\s+/.test(P)||/^default\s*:/.test(P)){if(i>=0&&w){if(!(/\/\/.*falls?\s*through|\/\*.*falls?\s*through/i.test(l[i])||a>0&&/\/\/.*falls?\s*through|\/\*.*falls?\s*through/i.test(l[a-1])))s.push({filePath:y.filePath,line:i+1,column:Math.max(1,l[i].indexOf("case")+1),ruleId:"eslint/no-fallthrough",message:"Expected a 'break' statement before 'case'",severity:"error"})}i=a,w=!0}if(/\b(?:break|return|throw|continue)\b/.test(P))w=!1;if(P==="}")n=!1,i=-1,w=!1}}return s}};var kt={meta:{docs:"Disallow number literals that lose precision",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\b(\d{17,}(?:\.\d+)?|\d+\.\d{17,})\b/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let I=a[1];if(Number(I).toString()!==I)s.push({filePath:y.filePath,line:n+1,column:a.index+1,ruleId:"eslint/no-loss-of-precision",message:"This number literal will lose precision at runtime",severity:"error"})}}return s}};var It={meta:{docs:"Disallow returning values from Promise executor functions",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++)if(l[n].match(/new\s+Promise\s*\(/)){let a=0,I=!1,P=n;while(P<l.length){let _=l[P];for(let j of _){if(j==="{")a++,I=!0;if(j==="}"){if(a--,a===0&&I)break}}let D=new RegExp("\\breturn\\s+[^;]");if(I&&_.match(D))s.push({filePath:y.filePath,line:P+1,column:1,ruleId:"eslint/no-promise-executor-return",message:"Return values from promise executor functions cannot be read",severity:"error"});if(a===0&&I)break;P++}}return s}};var Pt={meta:{docs:"Disallow variable redeclaration",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/),n=new Map;for(let i=0;i<l.length;i++){let w=l[i],a=/\b(var|let|const)\s+(\w+)/g,I;for(I=a.exec(w);I!==null;I=a.exec(w)){let _=I[2];if(n.get(_)!==void 0)s.push({filePath:y.filePath,line:i+1,column:Math.max(1,I.index+1),ruleId:"eslint/no-redeclare",message:`'${_}' is already defined`,severity:"error"});else n.set(_,i)}let P=/\bfunction\s+(\w+)/g;for(I=P.exec(w);I!==null;I=P.exec(w)){let _=I[1];if(n.get(_)!==void 0)s.push({filePath:y.filePath,line:i+1,column:Math.max(1,I.index+1),ruleId:"eslint/no-redeclare",message:`'${_}' is already defined`,severity:"error"});else n.set(_,i)}}return s}};var et={meta:{docs:"Disallow assignments where both sides are identical",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=new RegExp("\\b(\\w+)\\s*=\\s*(\\w+)\\s*(?:;\\s*)?(?:\\/\\/.*)?$"),a=i.match(w);if(a&&a[1]===a[2]){s.push({filePath:y.filePath,line:n+1,column:Math.max(1,i.indexOf(a[1])+1),ruleId:"eslint/no-self-assign",message:`'${a[1]}' is assigned to itself`,severity:"error"});continue}let I=i.match(/([\w.]+)\s*=\s*([\w.]+)/);if(I&&I[1]===I[2]){s.push({filePath:y.filePath,line:n+1,column:Math.max(1,i.indexOf(I[1])+1),ruleId:"eslint/no-self-assign",message:`'${I[1]}' is assigned to itself`,severity:"error"});continue}let P=i.match(/(\w+\[[^\]]+\])\s*=\s*(\w+\[[^\]]+\])/);if(P){let _=P[1].replace(/\s/g,""),D=P[2].replace(/\s/g,"");if(_===D)s.push({filePath:y.filePath,line:n+1,column:Math.max(1,i.indexOf(P[1])+1),ruleId:"eslint/no-self-assign",message:`'${P[1]}' is assigned to itself`,severity:"error"})}}return s},fix:(b,y)=>{let s=et.check(b,y);if(s.length===0)return b;let l=b.split(/\r?\n/),n=new Set(s.map((w)=>w.line-1));return l.map((w,a)=>{if(n.has(a)){let I=w.trim();if(new RegExp("^\\w+(?:\\.\\w+|\\[[^\\]]+\\])?\\s*=\\s*\\w+(?:\\.\\w+|\\[[^\\]]+\\])?;?\\s*$").test(I))return""}return w}).filter((w,a,I)=>{if(w===""&&n.has(a)){let P=a>0&&I[a-1].trim()!=="",_=a<I.length-1&&I[a+1]&&I[a+1].trim()!=="";if(!P||!_)return!1}return!0}).join(`
|
|
4
4
|
`)}};var Mt={meta:{docs:"Disallow comparisons where both sides are identical",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/([\w.\[\]]+)\s*(===|!==|==|!=|<|>|<=|>=)\s*([\w.\[\]]+)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let I=a[1].replace(/\s/g,""),P=a[2],_=a[3].replace(/\s/g,"");if(I===_)s.push({filePath:y.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/no-self-compare",message:`Comparing '${a[1]}' to itself is potentially pointless`,severity:"error"})}}return s}};var vt={meta:{docs:"Disallow sparse arrays (arrays with empty slots)",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\[([^\]]*)\]/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let I=a[1];if(/,\s*,/.test(I))s.push({filePath:y.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/no-sparse-arrays",message:"Unexpected sparse array",severity:"error"})}}return s},fix:(b,y)=>{let s=b.split(/\r?\n/),l=!1,n=s.map((i)=>{let w=i;return w=w.replace(/\[([^\]]*)\]/g,(a,I)=>{if(/,\s*,/.test(I))return l=!0,`[${I.replace(/,(\s*),/g,", undefined,")}]`;return a}),w});return l?n.join(`
|
|
5
5
|
`):b}};var $t={meta:{docs:"Disallow undeclared variables",recommended:!0,wip:!0},check:(b,y)=>[]};var Ct={meta:{docs:"Disallow unreachable code after return, throw, continue, or break",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=i.trim();if(/^\s*(?:return|throw|break|continue)\b/.test(i))for(let a=n+1;a<l.length;a++){let I=l[a],P=I.trim();if(P===""||P.startsWith("//")||P.startsWith("/*"))continue;if(P==="}"||P.startsWith("}"))break;if(/^(?:case\b|default\s*:)/.test(P))break;s.push({filePath:y.filePath,line:a+1,column:Math.max(1,I.search(/\S/)+1),ruleId:"eslint/no-unreachable",message:"Unreachable code",severity:"error"});break}}return s}};var Lt={meta:{docs:"Disallow negation of the left operand of relational operators",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/!\s*\w+\s+in\s+/g,a=/!\s*\w+\s+instanceof\s+/g,I;for(I=w.exec(i);I!==null;I=w.exec(i))s.push({filePath:y.filePath,line:n+1,column:I.index+1,ruleId:"eslint/no-unsafe-negation",message:"Unexpected negation of 'in' operand",severity:"error"});for(I=a.exec(i);I!==null;I=a.exec(i))s.push({filePath:y.filePath,line:n+1,column:I.index+1,ruleId:"eslint/no-unsafe-negation",message:"Unexpected negation of 'instanceof' operand",severity:"error"})}return s},fix:(b)=>{let y=b;return y=y.replace(/!\s*(\w+)\s+in\s+/g,"!($1 in "),y=y.replace(/!\s*(\w+)\s+instanceof\s+/g,"!($1 instanceof "),y}};var St={meta:{docs:"Disallow unnecessary catch clauses",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=i.match(/catch\s*\(\s*(\w+)\s*\)/);if(!w)continue;let a=w[1];for(let I=n+1;I<Math.min(n+5,l.length);I++){let P=l[I].trim();if(P===`throw ${a}`||P===`throw ${a};`){let _=!1;for(let D=n+1;D<I;D++){let j=l[D].trim();if(j!==""&&j!=="{"&&!j.startsWith("//")){_=!0;break}}if(!_)s.push({filePath:y.filePath,line:n+1,column:Math.max(1,i.indexOf("catch")+1),ruleId:"eslint/no-useless-catch",message:"Unnecessary catch clause",severity:"error"});break}if(P==="}")break}}return s}};var Et={meta:{docs:"Require isNaN() when checking for NaN",recommended:!0},check:(b,y)=>{let s=[],l=b.split(/\r?\n/);for(let n=0;n<l.length;n++){let i=l[n],w=/\b([\w.\[\]]+)\s*(===|!==|==|!=)\s*NaN\b|\bNaN\s*(===|!==|==|!=)\s*([\w.\[\]]+)/g,a;for(a=w.exec(i);a!==null;a=w.exec(i)){let I=a[1]||a[4];s.push({filePath:y.filePath,line:n+1,column:Math.max(1,a.index+1),ruleId:"eslint/use-isnan",message:"Use isNaN() to compare with NaN",severity:"error"})}}return s},fix:(b,y)=>{let s=b.split(/\r?\n/),l=!1,n=s.map((i)=>{let w=i;return w=w.replace(/\b([\w.\[\]]+)\s*===\s*NaN\b/g,(a,I)=>(l=!0,`isNaN(${I})`)),w=w.replace(/\bNaN\s*===\s*([\w.\[\]]+)\b/g,(a,I)=>(l=!0,`isNaN(${I})`)),w=w.replace(/\b([\w.\[\]]+)\s*!==\s*NaN\b/g,(a,I)=>(l=!0,`!isNaN(${I})`)),w=w.replace(/\bNaN\s*!==\s*([\w.\[\]]+)\b/g,(a,I)=>(l=!0,`!isNaN(${I})`)),w=w.replace(/\b([\w.\[\]]+)\s*==\s*NaN\b/g,(a,I)=>(l=!0,`isNaN(${I})`)),w=w.replace(/\bNaN\s*==\s*([\w.\[\]]+)\b/g,(a,I)=>(l=!0,`isNaN(${I})`)),w=w.replace(/\b([\w.\[\]]+)\s*!=\s*NaN\b/g,(a,I)=>(l=!0,`!isNaN(${I})`)),w=w.replace(/\bNaN\s*!=\s*([\w.\[\]]+)\b/g,(a,I)=>(l=!0,`!isNaN(${I})`)),w});return l?n.join(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve}from"./chunk-
|
|
2
|
+
import{oe,ae,F,le,ce,ue,fe,me,he,de,pe,ge,ye,be,we,xe,ke,Re,$e,ve}from"./chunk-292kxjda.js";export{ce as author,be as bin,he as bugs,ve as default,ke as dependencies,le as description,$e as devDependencies,pe as exports,we as files,fe as homepage,de as keywords,ue as license,ge as module,oe as name,Re as optionalDependencies,me as repository,xe as scripts,ae as type,ye as types,F as version};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{i,b}from"./chunk-0rxvmb2a.js";import{readdirSync as fn,readFileSync as un}from"fs";import{homedir as dn}from"os";import{join as we}from"path";var je=["code-style","lint"],l={ignores:["**/node_modules/**","**/.pnpm/**","**/.yarn/**","**/dist/**","**/build/**","**/out/**","**/.output/**","**/.next/**","**/.nuxt/**","**/.vite/**","**/.turbo/**","**/.cache/**","**/coverage/**","**/vendor/**","**/pantry/**","**/tmp/**","**/.git/**","**/.idea/**","**/.vscode/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/*.test.ts","**/*.spec.ts","**/.bunpress/**","**/.vitepress/cache/**","**/storage/framework/stx/**","**/storage/framework/runtime/**","**/storage/cloud/**","**/*.lock","**/package-lock.json","**/pnpm-lock.yaml"],lint:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],reporter:"stylish",cache:!1,maxWarnings:-1},format:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],trimTrailingWhitespace:!0,maxConsecutiveBlankLines:1,finalNewline:"one",indent:2,indentStyle:"spaces",preserveCodeIndentation:!1,quotes:"single",semi:!1},rules:{noDebugger:"error",noConsole:"warn"},pluginRules:{"style/brace-style":"warn","style/curly":"off","style/if-newline":"off","style/max-statements-per-line":"warn","pickier/import-dedupe":"warn","pickier/no-import-node-modules-by-path":"error","pickier/no-import-dist":"error","pickier/prefer-const":"error","pickier/prefer-template":"warn","pickier/no-unused-vars":"error","pickier/no-unused-imports":"error","pickier/sort-tailwind-classes":"warn","regexp/no-unused-capturing-group":"error","regexp/no-super-linear-backtracking":"error","regexp/no-useless-lazy":"error","ts/no-top-level-await":"error","ts/member-delimiter-style":"off","ts/type-annotation-spacing":"off","style/comma-dangle":"off","style/keyword-spacing":"off","style/arrow-spacing":"off","style/space-infix-ops":"off","style/object-curly-spacing":"off","style/spaced-comment":"off","style/block-spacing":"off","style/space-before-blocks":"off","style/comma-spacing":"off","style/semi-spacing":"off","style/rest-spread-spacing":"off","style/key-spacing":"off","style/computed-property-spacing":"off","style/array-bracket-spacing":"off","style/space-in-parens":"off","style/template-curly-spacing":"off","style/space-unary-ops":"off","style/switch-colon-spacing":"off","style/arrow-parens":"off","style/space-before-function-paren":"off","style/quote-props":"off","style/no-floating-decimal":"off","style/new-parens":"off","style/no-extra-parens":"off","style/wrap-iife":"off","style/comma-style":"off","style/dot-location":"off","style/operator-linebreak":"off","style/multiline-ternary":"off","style/padded-blocks":"off","style/lines-between-class-members":"off","style/no-tabs":"off","style/no-mixed-spaces-and-tabs":"off","style/generator-star-spacing":"off","style/yield-star-spacing":"off","style/function-call-spacing":"off","style/template-tag-spacing":"off","style/no-whitespace-before-property":"off","style/no-mixed-operators":"off","style/indent-binary-ops":"off","ts/type-generic-spacing":"off","ts/type-named-tuple-spacing":"off","markdown/heading-increment":"warn","markdown/heading-style":"warn","markdown/no-missing-space-atx":"error","markdown/no-multiple-space-atx":"error","markdown/no-missing-space-closed-atx":"error","markdown/no-multiple-space-closed-atx":"error","markdown/blanks-around-headings":"warn","markdown/heading-start-left":"warn","markdown/no-duplicate-heading":"warn","markdown/single-title":"warn","markdown/no-trailing-punctuation":"warn","markdown/ul-style":"warn","markdown/list-indent":"error","markdown/ul-indent":"warn","markdown/ol-prefix":"warn","markdown/list-marker-space":"error","markdown/blanks-around-lists":"warn","markdown/no-trailing-spaces":"error","markdown/no-hard-tabs":"error","markdown/no-multiple-blanks":"warn","markdown/no-multiple-space-blockquote":"error","markdown/no-blanks-blockquote":"warn","markdown/blanks-around-fences":"warn","markdown/single-trailing-newline":"error","markdown/blanks-around-tables":"warn","markdown/no-reversed-links":"error","markdown/no-bare-urls":"warn","markdown/no-space-in-links":"error","markdown/no-empty-links":"error","markdown/link-fragments":"warn","markdown/reference-links-images":"warn","markdown/link-image-reference-definitions":"warn","markdown/link-image-style":"warn","markdown/descriptive-link-text":"warn","markdown/line-length":"off","markdown/commands-show-output":"warn","markdown/fenced-code-language":"warn","markdown/code-block-style":"off","markdown/code-fence-style":"warn","markdown/no-emphasis-as-heading":"warn","markdown/no-space-in-emphasis":"warn","markdown/no-space-in-code":"warn","markdown/emphasis-style":"warn","markdown/strong-style":"warn","markdown/no-inline-html":"off","markdown/hr-style":"warn","markdown/first-line-heading":"off","markdown/required-headings":"off","markdown/proper-names":"off","markdown/no-alt-text":"warn","markdown/table-pipe-style":"warn","markdown/table-column-count":"warn","markdown/table-column-style":"warn","lockfile/validate-host":["warn",{allowedHosts:["npm","yarn"]}],"lockfile/validate-https":"error","lockfile/validate-integrity":["warn",{requiredAlgorithm:"sha512"}],"lockfile/validate-package-names":"error","lockfile/validate-scheme":["error",{allowedSchemes:["https:","git+https:","git+ssh:"]}],"publint/exports-types-should-be-first":"error","publint/exports-default-should-be-last":"error","publint/exports-module-should-precede-require":"error","publint/exports-value-invalid":"error","publint/imports-key-invalid":"error","publint/imports-value-invalid":"error","publint/imports-default-should-be-last":"error","publint/imports-module-should-precede-require":"error","publint/use-type":"warn","publint/deprecated-field-jsnext":"warn","publint/field-invalid-value-type":"error","publint/local-dependency":"error","publint/has-module-but-no-exports":"warn","publint/exports-missing-root-entrypoint":"warn","publint/exports-fallback-array-use":"warn","publint/file-does-not-exist":"warn","publint/file-invalid-format":"warn","publint/module-should-be-esm":"error","publint/bin-file-not-executable":"error","publint/exports-module-should-be-esm":"error","shell/command-substitution":"error","shell/quote-variables":"warn","shell/no-cd-without-check":"warn","shell/no-eval":"error","shell/no-useless-cat":"warn","shell/shebang":"warn","shell/indent":"warn","shell/function-style":"warn","shell/operator-spacing":"warn","shell/keyword-spacing":"warn","shell/no-trailing-semicolons":"warn","shell/no-trailing-whitespace":"error","shell/prefer-double-brackets":"warn","shell/set-options":"off","shell/prefer-printf":"warn","shell/consistent-case-terminators":"warn","shell/no-broken-redirect":"error","shell/heredoc-indent":"warn","shell/no-ls-parsing":"warn","shell/no-variable-in-single-quotes":"warn","shell/no-exit-in-subshell":"warn","spell/check":"off","spell/check-comments":"off","spell/check-markdown":"off"},verbose:!0},pn=new Set(["PICKIER_CONCURRENCY","PICKIER_DIAGNOSTICS","PICKIER_FAIL_ON_WARNINGS","PICKIER_NO_AUTO_CONFIG","PICKIER_RULE_TIMEOUT_MS","PICKIER_TIMEOUT_MS","PICKIER_TRACE","PICKIER_WORKERS"]),mn=/^\.?(?:pickier|code-style|lint|config)(?:\.(?:pickier|code-style|lint|config))*\.(?:ts|js|mjs|cjs|mts|cts|json|jsonc)$/i,gn=new Set(["pickier",...je]);function hn(e){for(let k of Object.keys(process.env))if(k.startsWith("PICKIER_")&&!pn.has(k))return!0;let a=dn(),n=[e,we(e,"config"),we(e,".config"),we(a,".config","pickier"),we(a,".config"),a];for(let k of n){let R;try{R=fn(k,{withFileTypes:!0})}catch{continue}for(let I of R){if(I.isDirectory())continue;if(mn.test(I.name))return!0}}let s;try{s=un(we(e,"package.json"),"utf8")}catch{return!1}try{let k=JSON.parse(s);return k!==null&&typeof k==="object"&&Object.keys(k).some((R)=>gn.has(R))}catch{return!0}}var Ee=null;async function ne(){if(!Ee)if(!hn(process.cwd()))Ee=l;else{let{loadConfig:e}=await import("./chunk-xk86b5d3.js");Ee=await e({name:"pickier",alias:[...je],defaultConfig:l})}return Ee}var z=l;var yn=new Set(["return","typeof","instanceof","in","of","new","delete","void","case","do","else","yield","await","throw"]);function ve(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36||e>=160}function ke(e){return e===`
|
|
2
|
+
import{i,b}from"./chunk-0rxvmb2a.js";import{readdirSync as fn,readFileSync as un}from"fs";import{homedir as dn}from"os";import{join as we}from"path";var je=["code-style","lint"],l={ignores:["**/node_modules/**","**/.pnpm/**","**/.yarn/**","**/dist/**","**/build/**","**/out/**","**/.output/**","**/.next/**","**/.nuxt/**","**/.vite/**","**/.turbo/**","**/.cache/**","**/coverage/**","**/vendor/**","**/pantry/**","**/zig-pkg/**","**/tmp/**","**/.git/**","**/.idea/**","**/.vscode/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/*.test.ts","**/*.spec.ts","**/.bunpress/**","**/.vitepress/cache/**","**/storage/framework/stx/**","**/storage/framework/runtime/**","**/storage/cloud/**","**/*.lock","**/package-lock.json","**/pnpm-lock.yaml"],lint:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],reporter:"stylish",cache:!1,maxWarnings:-1},format:{extensions:["ts","js","html","css","json","jsonc","md","yaml","yml","stx","sh","bash","zsh"],trimTrailingWhitespace:!0,maxConsecutiveBlankLines:1,finalNewline:"one",indent:2,indentStyle:"spaces",preserveCodeIndentation:!1,quotes:"single",semi:!1},rules:{noDebugger:"error",noConsole:"warn"},pluginRules:{"style/brace-style":"warn","style/curly":"off","style/if-newline":"off","style/max-statements-per-line":"warn","pickier/import-dedupe":"warn","pickier/no-import-node-modules-by-path":"error","pickier/no-import-dist":"error","pickier/prefer-const":"error","pickier/prefer-template":"warn","pickier/no-unused-vars":"error","pickier/no-unused-imports":"error","pickier/sort-tailwind-classes":"warn","regexp/no-unused-capturing-group":"error","regexp/no-super-linear-backtracking":"error","regexp/no-useless-lazy":"error","ts/no-top-level-await":"error","ts/member-delimiter-style":"off","ts/type-annotation-spacing":"off","style/comma-dangle":"off","style/keyword-spacing":"off","style/arrow-spacing":"off","style/space-infix-ops":"off","style/object-curly-spacing":"off","style/spaced-comment":"off","style/block-spacing":"off","style/space-before-blocks":"off","style/comma-spacing":"off","style/semi-spacing":"off","style/rest-spread-spacing":"off","style/key-spacing":"off","style/computed-property-spacing":"off","style/array-bracket-spacing":"off","style/space-in-parens":"off","style/template-curly-spacing":"off","style/space-unary-ops":"off","style/switch-colon-spacing":"off","style/arrow-parens":"off","style/space-before-function-paren":"off","style/quote-props":"off","style/no-floating-decimal":"off","style/new-parens":"off","style/no-extra-parens":"off","style/wrap-iife":"off","style/comma-style":"off","style/dot-location":"off","style/operator-linebreak":"off","style/multiline-ternary":"off","style/padded-blocks":"off","style/lines-between-class-members":"off","style/no-tabs":"off","style/no-mixed-spaces-and-tabs":"off","style/generator-star-spacing":"off","style/yield-star-spacing":"off","style/function-call-spacing":"off","style/template-tag-spacing":"off","style/no-whitespace-before-property":"off","style/no-mixed-operators":"off","style/indent-binary-ops":"off","ts/type-generic-spacing":"off","ts/type-named-tuple-spacing":"off","markdown/heading-increment":"warn","markdown/heading-style":"warn","markdown/no-missing-space-atx":"error","markdown/no-multiple-space-atx":"error","markdown/no-missing-space-closed-atx":"error","markdown/no-multiple-space-closed-atx":"error","markdown/blanks-around-headings":"warn","markdown/heading-start-left":"warn","markdown/no-duplicate-heading":"warn","markdown/single-title":"warn","markdown/no-trailing-punctuation":"warn","markdown/ul-style":"warn","markdown/list-indent":"error","markdown/ul-indent":"warn","markdown/ol-prefix":"warn","markdown/list-marker-space":"error","markdown/blanks-around-lists":"warn","markdown/no-trailing-spaces":"error","markdown/no-hard-tabs":"error","markdown/no-multiple-blanks":"warn","markdown/no-multiple-space-blockquote":"error","markdown/no-blanks-blockquote":"warn","markdown/blanks-around-fences":"warn","markdown/single-trailing-newline":"error","markdown/blanks-around-tables":"warn","markdown/no-reversed-links":"error","markdown/no-bare-urls":"warn","markdown/no-space-in-links":"error","markdown/no-empty-links":"error","markdown/link-fragments":"warn","markdown/reference-links-images":"warn","markdown/link-image-reference-definitions":"warn","markdown/link-image-style":"warn","markdown/descriptive-link-text":"warn","markdown/line-length":"off","markdown/commands-show-output":"warn","markdown/fenced-code-language":"warn","markdown/code-block-style":"off","markdown/code-fence-style":"warn","markdown/no-emphasis-as-heading":"warn","markdown/no-space-in-emphasis":"warn","markdown/no-space-in-code":"warn","markdown/emphasis-style":"warn","markdown/strong-style":"warn","markdown/no-inline-html":"off","markdown/hr-style":"warn","markdown/first-line-heading":"off","markdown/required-headings":"off","markdown/proper-names":"off","markdown/no-alt-text":"warn","markdown/table-pipe-style":"warn","markdown/table-column-count":"warn","markdown/table-column-style":"warn","lockfile/validate-host":["warn",{allowedHosts:["npm","yarn"]}],"lockfile/validate-https":"error","lockfile/validate-integrity":["warn",{requiredAlgorithm:"sha512"}],"lockfile/validate-package-names":"error","lockfile/validate-scheme":["error",{allowedSchemes:["https:","git+https:","git+ssh:"]}],"publint/exports-types-should-be-first":"error","publint/exports-default-should-be-last":"error","publint/exports-module-should-precede-require":"error","publint/exports-value-invalid":"error","publint/imports-key-invalid":"error","publint/imports-value-invalid":"error","publint/imports-default-should-be-last":"error","publint/imports-module-should-precede-require":"error","publint/use-type":"warn","publint/deprecated-field-jsnext":"warn","publint/field-invalid-value-type":"error","publint/local-dependency":"error","publint/has-module-but-no-exports":"warn","publint/exports-missing-root-entrypoint":"warn","publint/exports-fallback-array-use":"warn","publint/file-does-not-exist":"warn","publint/file-invalid-format":"warn","publint/module-should-be-esm":"error","publint/bin-file-not-executable":"error","publint/exports-module-should-be-esm":"error","shell/command-substitution":"error","shell/quote-variables":"warn","shell/no-cd-without-check":"warn","shell/no-eval":"error","shell/no-useless-cat":"warn","shell/shebang":"warn","shell/indent":"warn","shell/function-style":"warn","shell/operator-spacing":"warn","shell/keyword-spacing":"warn","shell/no-trailing-semicolons":"warn","shell/no-trailing-whitespace":"error","shell/prefer-double-brackets":"warn","shell/set-options":"off","shell/prefer-printf":"warn","shell/consistent-case-terminators":"warn","shell/no-broken-redirect":"error","shell/heredoc-indent":"warn","shell/no-ls-parsing":"warn","shell/no-variable-in-single-quotes":"warn","shell/no-exit-in-subshell":"warn","spell/check":"off","spell/check-comments":"off","spell/check-markdown":"off"},verbose:!0},pn=new Set(["PICKIER_CONCURRENCY","PICKIER_DIAGNOSTICS","PICKIER_FAIL_ON_WARNINGS","PICKIER_NO_AUTO_CONFIG","PICKIER_RULE_TIMEOUT_MS","PICKIER_TIMEOUT_MS","PICKIER_TRACE","PICKIER_WORKERS"]),mn=/^\.?(?:pickier|code-style|lint|config)(?:\.(?:pickier|code-style|lint|config))*\.(?:ts|js|mjs|cjs|mts|cts|json|jsonc)$/i,gn=new Set(["pickier",...je]);function hn(e){for(let k of Object.keys(process.env))if(k.startsWith("PICKIER_")&&!pn.has(k))return!0;let a=dn(),n=[e,we(e,"config"),we(e,".config"),we(a,".config","pickier"),we(a,".config"),a];for(let k of n){let R;try{R=fn(k,{withFileTypes:!0})}catch{continue}for(let I of R){if(I.isDirectory())continue;if(mn.test(I.name))return!0}}let s;try{s=un(we(e,"package.json"),"utf8")}catch{return!1}try{let k=JSON.parse(s);return k!==null&&typeof k==="object"&&Object.keys(k).some((R)=>gn.has(R))}catch{return!0}}var Ee=null;async function ne(){if(!Ee)if(!hn(process.cwd()))Ee=l;else{let{loadConfig:e}=await import("./chunk-xk86b5d3.js");Ee=await e({name:"pickier",alias:[...je],defaultConfig:l})}return Ee}var z=l;var yn=new Set(["return","typeof","instanceof","in","of","new","delete","void","case","do","else","yield","await","throw"]);function ve(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36||e>=160}function ke(e){return e===`
|
|
3
3
|
`||e==="\r"||e==="\u2028"||e==="\u2029"}function wn(e,a){let n=a+1,s=!1;while(n<e.length){let k=e[n];if(ke(k))return-1;if(k==="\\"){if(ke(e[n+1]))return-1;n+=2;continue}if(s){if(k==="]")s=!1}else if(k==="[")s=!0;else if(k==="/"){n+=1;while(n<e.length&&ve(e.charCodeAt(n)))n+=1;return n}n+=1}return-1}var be=null;function g(e){if(be!==null&&be.text===e)return be.result;let a=bn(e);return be={text:e,result:a},a}function bn(e){let a=[],n=[],s=e.length,k=[],R=-1,I="operator",v=0;if(e.startsWith("#!")){let F=2;while(F<s&&!ke(e[F]))F+=1;a.push({kind:"comment",start:2,end:F}),v=F}let W=(F)=>{if(k.length===0)R=F;k.push(-1)},K=()=>{let F=v;while(v<s){let B=e[v];if(B==="\\"){v+=2;continue}if(B==="`"){if(a.push({kind:"template",start:F,end:v}),k.pop(),k.length===0)n.push([R,v]);v+=1,I="value";return}if(B==="$"&&e[v+1]==="{"){a.push({kind:"template",start:F,end:v}),k.push(0),v+=2,I="operator";return}v+=1}v=Math.min(v,s),a.push({kind:"template",start:F,end:v}),k.length=0,n.push([R,s])};while(v<s){if(k.length>0&&k[k.length-1]===-1){K();continue}let F=e[v],B=e[v+1];if(F==="/"&&B==="/"){let U=v+2;while(U<s&&!ke(e[U]))U+=1;a.push({kind:"comment",start:v+2,end:U}),v=U;continue}if(F==="/"&&B==="*"){let U=e.indexOf("*/",v+2),A=U<0?s:U;a.push({kind:"comment",start:v+2,end:A}),v=U<0?s:U+2;continue}if(F==="'"||F==='"'){let U=v+1,A=U;while(A<s){let V=e[A];if(V==="\\"){A+=e[A+1]==="\r"&&e[A+2]===`
|
|
4
4
|
`?3:2;continue}if(V===F||ke(V))break;A+=1}A=Math.min(A,s),a.push({kind:"string",start:U,end:A}),v=e[A]===F?A+1:A,I="value";continue}if(F==="`"){W(v),v+=1;continue}if(F==="/"){let U=I==="operator"?wn(e,v):-1;if(U>0){let A=U;while(A>v&&e[A-1]!=="/")A-=1;a.push({kind:"regex",start:v+1,end:A-1}),v=U,I="value";continue}v+=1,I="operator";continue}if(k.length>0){if(F==="{"){k[k.length-1]+=1,v+=1,I="operator";continue}if(F==="}"){let U=k[k.length-1];if(U>0)k[k.length-1]=U-1,I="operator";else k.pop();v+=1;continue}}if(ve(e.charCodeAt(v))){let U=v+1;while(U<s&&ve(e.charCodeAt(U)))U+=1;let A=e.slice(v,U);I=yn.has(A)?"operator":"value",v=U;continue}if(F===")"||F==="]")I="value";else if(!(F===" "||F>="\t"&&F<="\r"))I="operator";v+=1}return{regions:a,templates:n}}function C(e,a={comments:!0},n=g(e)){let s=new Set;if(a.comments)s.add("comment");if(a.strings)s.add("string");if(a.templates)s.add("template");if(a.regex)s.add("regex");if(s.size===0)return e;let k=(a.comments?1:0)|(a.strings?2:0)|(a.templates?4:0)|(a.regex?8:0),R=Ae.get(k);if(R!==void 0&&R.text===e)return R.masked;let I=kn(e,s,n);return Ae.set(k,{text:e,masked:I}),I}var Ae=new Map;function q(){be=null,Ae.clear()}function kn(e,a,n){let s="",k=0;for(let R of n.regions){if(!a.has(R.kind))continue;let I=Math.max(R.start,k),v=Math.min(R.end,e.length);if(I>=v)continue;s+=e.slice(k,I)+xn(e.slice(I,v)),k=v}return k===0?e:s+e.slice(k)}var Cn=/[^\n\r\u2028\u2029]/g;function xn(e){return e.replace(Cn," ")}function G(e){return C(e,{comments:!0})}function c(e){return C(e,{comments:!0,strings:!0,templates:!0,regex:!0})}function S(e,a=g(e)){let n=[0];for(let I=e.indexOf(`
|
|
5
5
|
`);I!==-1;I=e.indexOf(`
|
|
@@ -25,5 +25,5 @@ import{i,b}from"./chunk-0rxvmb2a.js";import{readdirSync as fn,readFileSync as un
|
|
|
25
25
|
`:void 0;if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
|
|
26
26
|
`)return null;let n=[],s=[],k=[],R=0,I=0,v=-1,W=!1;while(R<e.length){let D=e[R];if(Fe.test(D)){R++;continue}if(Yn.test(D)||We.test(D)){let ue=R;if(We.test(D)){while(R<e.length&&!e[R].includes("*/"))R++;R++}else R++;if(!W){for(let pe=ue;pe<R&&pe<e.length;pe++)s.push(e[pe]);I=R}else if(v<0)v=ue;continue}if(!Xn.test(D))break;let j=D.trim(),ae=R+1;while(!Ue.test(j)&&ae<e.length&&ae-R<50)j+=` ${e[ae].trim()}`,ae++;if(!Ue.test(j))return null;let te=It(j);if(!te)return null;if(v>=0){let ue=[];for(let pe=v;pe<R;pe++)if(!Fe.test(e[pe]))ue.push(e[pe]);if(ue.length>0)te.comments=ue;v=-1}n.push(te),R=ae,I=R,W=!0}if(n.length===0)return null;let K=v>=0?v:I,F=e.slice(K),B=0;while(B<F.length&&F[B]==="")B++;let U=B===0?F:F.slice(B),A=new Map,V=(D)=>{let j=A.get(D);if(j===void 0){j=!1;for(let ae of F)if(Rt(ae,D)){j=!0;break}A.set(D,j)}return j};for(let D of n){if(D.kind!=="value")continue;D.named=D.named.filter((j)=>{if(j.alias)return!0;return V(j.name)})}let oe=n.filter((D)=>{if(D.kind==="side-effect")return!0;if(D.kind==="type")return D.namedTypes.length>0;return Boolean(D.defaultName||D.namespaceName||D.named.length>0)}),le=new Set(oe),H=[];for(let D of n){let j=H.length>0?[...H,...D.comments??[]]:D.comments;if(!le.has(D)){H=j??[];continue}if(j&&j.length>0)D.comments=j;H=[]}if(H.length>0)k.push(...H);let fe=new Map,me=(D,j)=>{if(!j.comments)return;D.comments=D.comments?[...D.comments,...j.comments]:[...j.comments]};for(let D of oe){let j=fe.get(D.source)||{};if(D.kind==="side-effect")j.side=j.side||[],j.side.push(D);else if(D.kind==="type"){if(!j.type)j.type={kind:"type",source:D.source,named:[],namedTypes:[],original:""};me(j.type,D),j.type.namedTypes=(j.type.namedTypes||[]).concat(D.namedTypes)}else{if(!j.value)j.value={kind:"value",source:D.source,named:[],namedTypes:[],original:""};if(me(j.value,D),D.defaultName)j.value.defaultName=D.defaultName;if(D.namespaceName)j.value.namespaceName=D.namespaceName;if(j.value.named=(j.value.named||[]).concat(D.named),D.namedTypes.length>0){if(!j.type)j.type={kind:"type",source:D.source,named:[],namedTypes:[],original:""};j.type.namedTypes=j.type.namedTypes.concat(D.namedTypes)}}fe.set(D.source,j)}let ce=[];for(let[D,j]of fe){if(j.side)ce.push(...j.side);if(j.value)j.value.named.sort((ae,te)=>ae.name.localeCompare(te.name)),ce.push(j.value);if(j.type&&j.type.namedTypes.length>0){let ae=new Set;j.type.namedTypes=j.type.namedTypes.filter((te)=>{let ue=`${te.name}|${te.alias||""}`;if(ae.has(ue))return!1;return ae.add(ue),!0}),j.type.namedTypes.sort((te,ue)=>te.name.localeCompare(ue.name)),ce.push(j.type)}}let ge=(D)=>D.startsWith(".")?2:D.startsWith("node:")?0:1,he=(D)=>{if(D.kind!=="value")return 99;if(D.defaultName)return 0;if(D.namespaceName)return 1;return 2};if(ce.sort((D,j)=>{if(D.kind!==j.kind){if(D.kind==="type")return-1;if(j.kind==="type")return 1;if(D.kind==="side-effect")return-1;if(j.kind==="side-effect")return 1}if(D.kind==="type"&&j.kind==="type"){let ae=ge(D.source),te=ge(j.source);if(ae!==te)return ae-te;return D.source.localeCompare(j.source)}if(D.kind==="value"&&j.kind==="value"){let ae=ge(D.source),te=ge(j.source);if(ae!==te)return ae-te;let ue=he(D),pe=he(j);if(ue!==pe)return ue-pe;return D.source.localeCompare(j.source)}return D.source.localeCompare(j.source)}),ce.length===0){if(s.length>0||k.length>0)return[...s,...k,...U.length>0?U:[""]];return U}let de=[...s];for(let D of ce){if(D.comments)de.push(...D.comments);let j=_t(D);if(j.includes(`
|
|
27
27
|
`))de.push(...j.split(`
|
|
28
|
-
`));else de.push(j)}if(k.length>0)de.push(""),de.push(...k);return de.push(""),de.push(...U),de}function _t(e){if(e.kind==="side-effect")return`import '${e.source}'`;if(e.kind==="type")return`import type { ${e.namedTypes.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ")} } from '${e.source}'`;let a=[];if(e.defaultName)a.push(e.defaultName);if(e.namespaceName)a.push(`* as ${e.namespaceName}`);if(e.named.length>0){let s=e.named.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ");a.push(`{ ${s} }`)}return`import ${a.join(", ")} from '${e.source}'`}function It(e){let a=e.match(/^\s*import\s+['"]([^'"]+)['"]/);if(a)return{kind:"side-effect",source:a[1],named:[],namedTypes:[],original:e};if(a=e.match(/^\s*import\s+type\s+\{([^}]*)\}\s+from\s+['"]([^'"]+)['"]/),a){let U=a[1],A=a[2],V=U.split(",").map((oe)=>oe.trim()).filter(Boolean).map((oe)=>{let le=oe.match(/^(\w+)(?:\s+as\s+(\w+))?$/);return{name:le?.[1]||oe,alias:le?.[2]}});return{kind:"type",source:A,named:[],namedTypes:V,original:e}}let n=e.match(/^\s*import\s+/),s=new RegExp(`\\sfrom\\s+['"]([^'"]+)['"]\\s*;?$`),k=e.match(s);if(!n||!k)return;let R=k[1],I=e.slice(n[0].length,k.index).trim(),v,W,K=[],F=[],B=I.match(/\{([^}]*)\}/);if(B){let A=B[1].split(",").map((V)=>V.trim()).filter(Boolean);for(let V of A){let oe=/^type\s+/.test(V),H=V.replace(/^type\s+/,"").match(/^(\w+)(?:\s+as\s+(\w+))?$/);if(!H)continue;let fe={name:H[1],alias:H[2]};if(oe)F.push(fe);else K.push(fe)}I=I.replace(/\{[\s\S]*?\}/,"").trim()}if(I.length>0){let U=I.split(",").map((A)=>A.trim()).filter(Boolean);for(let A of U)if(A.startsWith("* as "))W=A.slice(5).trim();else if(/^\w+$/.test(A))v=A}return{kind:"value",source:R,defaultName:v,namespaceName:W,named:K,namedTypes:F,original:e}}function Ot(e,a){if(Qn.test(a))return vt(e);if(Vn.test(a))return At(e);return null}function ln(e){try{return JSON.parse(e)}catch{return null}}function Ce(e,a,n=[]){let s={};for(let R of a)if(Object.prototype.hasOwnProperty.call(e,R))s[R]=e[R];for(let R of n){let I=Object.keys(e).filter((v)=>R.test(v)&&!(v in s)).sort();for(let v of I)s[v]=e[v]}let k=Object.keys(e).filter((R)=>!(R in s)).sort();for(let R of k)s[R]=e[R];return s}function Ye(e){let a={};for(let n of Object.keys(e).sort())a[n]=e[n];return a}function vt(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["publisher","name","displayName","type","version","private","packageManager","description","author","contributors","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","imports","exports","main","module","unpkg","jsdelivr","types","typesVersions","bin","icon","files","engines","activationEvents","contributes","scripts","peerDependencies","peerDependenciesMeta","dependencies","optionalDependencies","devDependencies","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"]);if(Array.isArray(s.files)){if(s.files.every((I)=>typeof I==="string"))s.files=[...s.files].sort()}for(let R of Object.keys(s))if(/^(?:dev|peer|optional|bundled)?[Dd]ependencies(?:Meta)?$/.test(R)||/^(?:resolutions|overrides|pnpm\.overrides)$/.test(R)){if(s[R]&&typeof s[R]==="object")s[R]=Ye(s[R])}if(s.pnpm&&typeof s.pnpm==="object"&&s.pnpm.overrides&&typeof s.pnpm.overrides==="object")s.pnpm.overrides=Ye(s.pnpm.overrides);if(s.exports&&typeof s.exports==="object"){let R=s.exports,I=["types","import","require","default"];if(!Array.isArray(R)){let v={};for(let W of Object.keys(R)){let K=R[W];if(K&&typeof K==="object"&&!Array.isArray(K))v[W]=Ce(K,I);else v[W]=K}s.exports=v}}let k=["pre-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-rewrite","post-checkout","post-merge","pre-push","pre-auto-gc"];for(let R of["gitHooks","husky","simple-git-hooks"])if(s[R]&&typeof s[R]==="object")s[R]=Ce(s[R],k);return JSON.stringify(s,null,2)}function At(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["extends","compilerOptions","references","files","include","exclude"]);if(s.compilerOptions&&typeof s.compilerOptions==="object"){let k=["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"];s.compilerOptions=Ce(s.compilerOptions,k)}return JSON.stringify(s,null,2)}import{readdirSync as Tt,readFileSync as Nt,statSync as _e}from"fs";import{extname as Pt,isAbsolute as Ie,join as Oe,resolve as $t}from"path";var L=5;function Mt(e){let a="",n=0;while(n<e.length){let s=e[n];if(s==="*")if(e[n+1]==="*"){if(a+=".*",n+=2,e[n]==="/")n++}else a+="[^/]*",n++;else if(s==="?")a+="[^/]",n++;else if(s==="["){let k=e.indexOf("]",n);if(k===-1)a+="\\[",n++;else a+=e.slice(n,k+1),n=k+1}else if(".+^${}()|\\".includes(s))a+=`\\${s}`,n++;else a+=s,n++}return new RegExp(`^${a}$`)}function*cn(e,a,n){let s;try{s=Tt(e)}catch{return}for(let k of s){if(!n&&k.startsWith("."))continue;let R=Oe(e,k);if(a(R))continue;let I;try{I=_e(R)}catch{continue}if(I.isDirectory())yield*cn(R,a,n);else yield R}}function*an(e,a,n,s){yield*cn(e,d(a,s),n)}async function f(e,a={}){let n=a.cwd??process.cwd(),s=a.ignore??[],k=a.dot??!1,R=a.absolute??!0,I=d(s,n);if(typeof globalThis.Bun?.Glob<"u"){let W=globalThis.Bun.Glob,K=[];for(let F of e){let B=Ie(F)?F:Oe(n,F),U=_e(B,{throwIfNoEntry:!1});if(U?.isFile()){if(!I(B))K.push(R?B:B.startsWith(`${n}/`)?B.slice(n.length+1):B);continue}let A=U?.isDirectory()?B:n,V=new W(U?.isDirectory()?"**/*":F);for await(let oe of V.scan({cwd:A,dot:k,onlyFiles:a.onlyFiles??!0,followSymlinks:!1})){let le=Ie(oe)?oe:Oe(A,oe),H=le.startsWith(`${n}/`)?le.slice(n.length+1):le;if(I(le))continue;K.push(R?le:H)}}return K}let v=[];for(let W of e){let K=Ie(W)?W:Oe(n,W);if(_e(K,{throwIfNoEntry:!1})||!/[*?[{]/.test(W)){try{if(!_e(K).isDirectory()){let A=K.startsWith(`${n}/`)?K.slice(n.length+1):K;if(!I(K))v.push(R?K:A)}else for(let A of an(K,s,k,n))v.push(R?A:A.startsWith(`${n}/`)?A.slice(n.length+1):A)}catch{}continue}let B=Mt(W);for(let U of an(n,s,k,n)){let A=U.startsWith(`${n}/`)?U.slice(n.length+1):U;if(B.test(A)||B.test(A.replace(/\\/g,"/")))v.push(R?U:A)}}return v}function se(e){let a=0,n=[],s=()=>{if(n.length>0&&a<e)a++,n.shift()()};return(k)=>new Promise((R,I)=>{let v=()=>{k().then((W)=>{a--,R(W),s()},(W)=>{a--,I(W),s()})};if(a<e)a++,v();else n.push(v)})}var r={get TRACE(){return process.env.PICKIER_TRACE==="1"},get TIMEOUT_MS(){return Number(process.env.PICKIER_TIMEOUT_MS||"8000")},get RULE_TIMEOUT_MS(){return Number(process.env.PICKIER_RULE_TIMEOUT_MS||"5000")},get CONCURRENCY(){return Number(process.env.PICKIER_CONCURRENCY)||8},get DIAGNOSTICS(){return process.env.PICKIER_DIAGNOSTICS==="1"},get FAIL_ON_WARNINGS(){return process.env.PICKIER_FAIL_ON_WARNINGS==="1"},get NO_AUTO_CONFIG(){return process.env.PICKIER_NO_AUTO_CONFIG==="1"},get WORKERS(){let e=process.env.PICKIER_WORKERS;if(e===void 0||e==="")return null;let a=Number(e);return Number.isFinite(a)?Math.max(0,Math.floor(a)):null}},_=["**/node_modules/**","**/.git/**"],m=["**/node_modules/**","**/dist/**","**/build/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.vercel/**","**/.netlify/**","**/.cache/**","**/.turbo/**","**/.vscode/**","**/.idea/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/coverage/**","**/.nyc_output/**","**/.tmp/**","**/.temp/**","**/vendor/**","**/pantry/**","**/target/**","**/zig-cache/**","**/zig-out/**","**/.zig-cache/**","**/__pycache__/**","**/.pytest_cache/**","**/venv/**","**/.venv/**","**/out/**","**/.DS_Store","**/Thumbs.db"];function N(e,a){let n=e[a];if(n===void 0){let R=a.indexOf("/");if(R>0){let I=a.slice(0,R),v=a.slice(R+1),W=I==="general"?"pickier":I==="pickier"?"general":null;if(W)n=e[`${W}/${v}`];if(n===void 0)n=e[v]}}let s,k;if(typeof n==="string"){if(n==="error")s="error";else if(n==="warn"||n==="warning")s="warning"}else if(Array.isArray(n)&&typeof n[0]==="string"){let R=n[0];if(R==="error")s="error";else if(R==="warn"||R==="warning")s="warning";k=n[1]}return{enabled:!!s,severity:s,options:k}}function P(e){let a=Array.isArray(e)?e[0]:e;if(typeof a!=="string")return;if(a==="off")return"off";if(a==="error")return"error";if(a==="warn"||a==="warning")return"warning";return}function o(e,a,n=[],s){for(let R of[a,...n]){let I=P(e.rules?.[R])??P(e.pluginRules?.[R]);if(I)return I==="off"?void 0:I}let k=P(s);return k==="off"?void 0:k}function re(e,a){return P(e.rules?.[a])==="off"||P(e.pluginRules?.[a])==="off"}function w(e,a){return`\x1B[${e}m${a}\x1B[0m`}function J(e){return w("32",e)}function Y(e){return w("31",e)}function Z(e){return w("33",e)}function X(e){return w("34",e)}function Q(e){return w("90",e)}function ee(e){return w("1",e)}var t={green:J,red:Y,yellow:Z,blue:X,gray:Q,bold:ee};function y(e,a){let n=a.ignores?[...new Set([...e.ignores||[],...a.ignores])]:e.ignores,s={...e.pluginRules||{},...a.pluginRules||{}};if((a.tailwind??e.tailwind)?.enabled&&!Object.prototype.hasOwnProperty.call(s,"pickier/sort-tailwind-classes"))s["pickier/sort-tailwind-classes"]="warn";return{...e,...a,verbose:a.verbose??e.verbose,ignores:n,lint:{...e.lint,...a.lint||{}},format:{...e.format,...a.format||{}},rules:{...e.rules,...a.rules||{}},pluginRules:s}}var Me=null;async function u(e){if(!e){if(r.NO_AUTO_CONFIG){if(!Me)Me=y(l,{});return Me}try{let{getConfig:s}=await import("./chunk-rt9y8epr.js"),k=await s();return y(l,k)}catch{}return y(l,{})}let a=Ie(e)?e:$t(process.cwd(),e);if(Pt(a).toLowerCase()===".json")try{let s=Nt(a,"utf8");return y(l,JSON.parse(s))}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}try{let s=await import(a);return y(l,s.default||s)}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}}function x(e){return e.map((a)=>{if(/[*?[\]{}()!]/.test(a))return a;if(/\.[A-Z0-9]+$/i.test(a))return a;return`${a.replace(/\/$/,"")}/**/*`})}function T(e,a){let n=e.lastIndexOf(".");if(n<0)return!1;let s=e.slice(n);return a.has(s)}function Le(e){if(!e.includes("\\")&&!e.includes("//"))return e;return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function Lt(e){let a=[];for(let n of e){let s=Le(n.trim());if(!s)continue;let k=s.match(/\*\*\/\*\.(.+)$/);if(k){a.push({raw:s,kind:"extension",value:k[1]});continue}let R=s.match(/\*\*\/(.+?)\/\*\*$/);if(R){a.push({raw:s,kind:"segment",value:R[1]});continue}let I=s.match(/\*\*\/(.+)$/);if(I)a.push({raw:s,kind:"suffix",value:I[1].replace(/\/$/,"")})}return a}function h(e){return[...new Set([..._,...e])]}function d(e,a=process.cwd()){let n=Lt([..._,...e]);if(n.length===0)return()=>!1;let s=new Set([...m,..._]),k=Le(a).replace(/\/$/,""),R=`${k}/`,I=n.map((v)=>({pattern:v,universal:s.has(v.raw),suffix:v.kind==="extension"?`.${v.value}`:`/${v.value}`,inner:`/${v.value}/`}));return(v)=>{let W=Le(v),K=W!==k&&!W.startsWith(R),F=K?W:W.slice(k.length);for(let{pattern:B,universal:U,suffix:A,inner:V}of I){if(K&&!U)continue;if(B.kind==="extension"){if(F.endsWith(A))return!0;continue}if(B.kind==="segment"||B.kind==="suffix"){if(F.includes(V)||F.endsWith(A))return!0}}return!1}}function ie(e,a){return d(a)(e)}
|
|
28
|
+
`));else de.push(j)}if(k.length>0)de.push(""),de.push(...k);return de.push(""),de.push(...U),de}function _t(e){if(e.kind==="side-effect")return`import '${e.source}'`;if(e.kind==="type")return`import type { ${e.namedTypes.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ")} } from '${e.source}'`;let a=[];if(e.defaultName)a.push(e.defaultName);if(e.namespaceName)a.push(`* as ${e.namespaceName}`);if(e.named.length>0){let s=e.named.map((k)=>k.alias?`${k.name} as ${k.alias}`:k.name).join(", ");a.push(`{ ${s} }`)}return`import ${a.join(", ")} from '${e.source}'`}function It(e){let a=e.match(/^\s*import\s+['"]([^'"]+)['"]/);if(a)return{kind:"side-effect",source:a[1],named:[],namedTypes:[],original:e};if(a=e.match(/^\s*import\s+type\s+\{([^}]*)\}\s+from\s+['"]([^'"]+)['"]/),a){let U=a[1],A=a[2],V=U.split(",").map((oe)=>oe.trim()).filter(Boolean).map((oe)=>{let le=oe.match(/^(\w+)(?:\s+as\s+(\w+))?$/);return{name:le?.[1]||oe,alias:le?.[2]}});return{kind:"type",source:A,named:[],namedTypes:V,original:e}}let n=e.match(/^\s*import\s+/),s=new RegExp(`\\sfrom\\s+['"]([^'"]+)['"]\\s*;?$`),k=e.match(s);if(!n||!k)return;let R=k[1],I=e.slice(n[0].length,k.index).trim(),v,W,K=[],F=[],B=I.match(/\{([^}]*)\}/);if(B){let A=B[1].split(",").map((V)=>V.trim()).filter(Boolean);for(let V of A){let oe=/^type\s+/.test(V),H=V.replace(/^type\s+/,"").match(/^(\w+)(?:\s+as\s+(\w+))?$/);if(!H)continue;let fe={name:H[1],alias:H[2]};if(oe)F.push(fe);else K.push(fe)}I=I.replace(/\{[\s\S]*?\}/,"").trim()}if(I.length>0){let U=I.split(",").map((A)=>A.trim()).filter(Boolean);for(let A of U)if(A.startsWith("* as "))W=A.slice(5).trim();else if(/^\w+$/.test(A))v=A}return{kind:"value",source:R,defaultName:v,namespaceName:W,named:K,namedTypes:F,original:e}}function Ot(e,a){if(Qn.test(a))return vt(e);if(Vn.test(a))return At(e);return null}function ln(e){try{return JSON.parse(e)}catch{return null}}function Ce(e,a,n=[]){let s={};for(let R of a)if(Object.prototype.hasOwnProperty.call(e,R))s[R]=e[R];for(let R of n){let I=Object.keys(e).filter((v)=>R.test(v)&&!(v in s)).sort();for(let v of I)s[v]=e[v]}let k=Object.keys(e).filter((R)=>!(R in s)).sort();for(let R of k)s[R]=e[R];return s}function Ye(e){let a={};for(let n of Object.keys(e).sort())a[n]=e[n];return a}function vt(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["publisher","name","displayName","type","version","private","packageManager","description","author","contributors","license","funding","homepage","repository","bugs","keywords","categories","sideEffects","imports","exports","main","module","unpkg","jsdelivr","types","typesVersions","bin","icon","files","engines","activationEvents","contributes","scripts","peerDependencies","peerDependenciesMeta","dependencies","optionalDependencies","devDependencies","pnpm","overrides","resolutions","husky","simple-git-hooks","lint-staged","eslintConfig"]);if(Array.isArray(s.files)){if(s.files.every((I)=>typeof I==="string"))s.files=[...s.files].sort()}for(let R of Object.keys(s))if(/^(?:dev|peer|optional|bundled)?[Dd]ependencies(?:Meta)?$/.test(R)||/^(?:resolutions|overrides|pnpm\.overrides)$/.test(R)){if(s[R]&&typeof s[R]==="object")s[R]=Ye(s[R])}if(s.pnpm&&typeof s.pnpm==="object"&&s.pnpm.overrides&&typeof s.pnpm.overrides==="object")s.pnpm.overrides=Ye(s.pnpm.overrides);if(s.exports&&typeof s.exports==="object"){let R=s.exports,I=["types","import","require","default"];if(!Array.isArray(R)){let v={};for(let W of Object.keys(R)){let K=R[W];if(K&&typeof K==="object"&&!Array.isArray(K))v[W]=Ce(K,I);else v[W]=K}s.exports=v}}let k=["pre-commit","prepare-commit-msg","commit-msg","post-commit","pre-rebase","post-rewrite","post-checkout","post-merge","pre-push","pre-auto-gc"];for(let R of["gitHooks","husky","simple-git-hooks"])if(s[R]&&typeof s[R]==="object")s[R]=Ce(s[R],k);return JSON.stringify(s,null,2)}function At(e){let a=ln(e);if(!a||typeof a!=="object")return e;let s=Ce(a,["extends","compilerOptions","references","files","include","exclude"]);if(s.compilerOptions&&typeof s.compilerOptions==="object"){let k=["incremental","composite","tsBuildInfoFile","disableSourceOfProjectReferenceRedirect","disableSolutionSearching","disableReferencedProjectLoad","target","jsx","jsxFactory","jsxFragmentFactory","jsxImportSource","lib","moduleDetection","noLib","reactNamespace","useDefineForClassFields","emitDecoratorMetadata","experimentalDecorators","libReplacement","baseUrl","rootDir","rootDirs","customConditions","module","moduleResolution","moduleSuffixes","noResolve","paths","resolveJsonModule","resolvePackageJsonExports","resolvePackageJsonImports","typeRoots","types","allowArbitraryExtensions","allowImportingTsExtensions","allowUmdGlobalAccess","allowJs","checkJs","maxNodeModuleJsDepth","strict","strictBindCallApply","strictFunctionTypes","strictNullChecks","strictPropertyInitialization","allowUnreachableCode","allowUnusedLabels","alwaysStrict","exactOptionalPropertyTypes","noFallthroughCasesInSwitch","noImplicitAny","noImplicitOverride","noImplicitReturns","noImplicitThis","noPropertyAccessFromIndexSignature","noUncheckedIndexedAccess","noUnusedLocals","noUnusedParameters","useUnknownInCatchVariables","declaration","declarationDir","declarationMap","downlevelIteration","emitBOM","emitDeclarationOnly","importHelpers","importsNotUsedAsValues","inlineSourceMap","inlineSources","mapRoot","newLine","noEmit","noEmitHelpers","noEmitOnError","outDir","outFile","preserveConstEnums","preserveValueImports","removeComments","sourceMap","sourceRoot","stripInternal","allowSyntheticDefaultImports","esModuleInterop","forceConsistentCasingInFileNames","isolatedDeclarations","isolatedModules","preserveSymlinks","verbatimModuleSyntax","erasableSyntaxOnly","skipDefaultLibCheck","skipLibCheck"];s.compilerOptions=Ce(s.compilerOptions,k)}return JSON.stringify(s,null,2)}import{readdirSync as Tt,readFileSync as Nt,statSync as _e}from"fs";import{extname as Pt,isAbsolute as Ie,join as Oe,resolve as $t}from"path";var L=5;function Mt(e){let a="",n=0;while(n<e.length){let s=e[n];if(s==="*")if(e[n+1]==="*"){if(a+=".*",n+=2,e[n]==="/")n++}else a+="[^/]*",n++;else if(s==="?")a+="[^/]",n++;else if(s==="["){let k=e.indexOf("]",n);if(k===-1)a+="\\[",n++;else a+=e.slice(n,k+1),n=k+1}else if(".+^${}()|\\".includes(s))a+=`\\${s}`,n++;else a+=s,n++}return new RegExp(`^${a}$`)}function*cn(e,a,n){let s;try{s=Tt(e)}catch{return}for(let k of s){if(!n&&k.startsWith("."))continue;let R=Oe(e,k);if(a(R))continue;let I;try{I=_e(R)}catch{continue}if(I.isDirectory())yield*cn(R,a,n);else yield R}}function*an(e,a,n,s){yield*cn(e,d(a,s),n)}async function f(e,a={}){let n=a.cwd??process.cwd(),s=a.ignore??[],k=a.dot??!1,R=a.absolute??!0,I=d(s,n);if(typeof globalThis.Bun?.Glob<"u"){let W=globalThis.Bun.Glob,K=[];for(let F of e){let B=Ie(F)?F:Oe(n,F),U=_e(B,{throwIfNoEntry:!1});if(U?.isFile()){if(!I(B))K.push(R?B:B.startsWith(`${n}/`)?B.slice(n.length+1):B);continue}let A=U?.isDirectory()?B:n,V=new W(U?.isDirectory()?"**/*":F);for await(let oe of V.scan({cwd:A,dot:k,onlyFiles:a.onlyFiles??!0,followSymlinks:!1})){let le=Ie(oe)?oe:Oe(A,oe),H=le.startsWith(`${n}/`)?le.slice(n.length+1):le;if(I(le))continue;K.push(R?le:H)}}return K}let v=[];for(let W of e){let K=Ie(W)?W:Oe(n,W);if(_e(K,{throwIfNoEntry:!1})||!/[*?[{]/.test(W)){try{if(!_e(K).isDirectory()){let A=K.startsWith(`${n}/`)?K.slice(n.length+1):K;if(!I(K))v.push(R?K:A)}else for(let A of an(K,s,k,n))v.push(R?A:A.startsWith(`${n}/`)?A.slice(n.length+1):A)}catch{}continue}let B=Mt(W);for(let U of an(n,s,k,n)){let A=U.startsWith(`${n}/`)?U.slice(n.length+1):U;if(B.test(A)||B.test(A.replace(/\\/g,"/")))v.push(R?U:A)}}return v}function se(e){let a=0,n=[],s=()=>{if(n.length>0&&a<e)a++,n.shift()()};return(k)=>new Promise((R,I)=>{let v=()=>{k().then((W)=>{a--,R(W),s()},(W)=>{a--,I(W),s()})};if(a<e)a++,v();else n.push(v)})}var r={get TRACE(){return process.env.PICKIER_TRACE==="1"},get TIMEOUT_MS(){return Number(process.env.PICKIER_TIMEOUT_MS||"8000")},get RULE_TIMEOUT_MS(){return Number(process.env.PICKIER_RULE_TIMEOUT_MS||"5000")},get CONCURRENCY(){return Number(process.env.PICKIER_CONCURRENCY)||8},get DIAGNOSTICS(){return process.env.PICKIER_DIAGNOSTICS==="1"},get FAIL_ON_WARNINGS(){return process.env.PICKIER_FAIL_ON_WARNINGS==="1"},get NO_AUTO_CONFIG(){return process.env.PICKIER_NO_AUTO_CONFIG==="1"},get WORKERS(){let e=process.env.PICKIER_WORKERS;if(e===void 0||e==="")return null;let a=Number(e);return Number.isFinite(a)?Math.max(0,Math.floor(a)):null}},_=["**/node_modules/**","**/zig-pkg/**","**/.git/**"],m=["**/node_modules/**","**/dist/**","**/build/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/.vercel/**","**/.netlify/**","**/.cache/**","**/.turbo/**","**/.vscode/**","**/.idea/**","**/.zed/**","**/.cursor/**","**/.claude/**","**/.github/**","**/coverage/**","**/.nyc_output/**","**/.tmp/**","**/.temp/**","**/vendor/**","**/pantry/**","**/target/**","**/zig-pkg/**","**/zig-cache/**","**/zig-out/**","**/.zig-cache/**","**/__pycache__/**","**/.pytest_cache/**","**/venv/**","**/.venv/**","**/out/**","**/.DS_Store","**/Thumbs.db"];function N(e,a){let n=e[a];if(n===void 0){let R=a.indexOf("/");if(R>0){let I=a.slice(0,R),v=a.slice(R+1),W=I==="general"?"pickier":I==="pickier"?"general":null;if(W)n=e[`${W}/${v}`];if(n===void 0)n=e[v]}}let s,k;if(typeof n==="string"){if(n==="error")s="error";else if(n==="warn"||n==="warning")s="warning"}else if(Array.isArray(n)&&typeof n[0]==="string"){let R=n[0];if(R==="error")s="error";else if(R==="warn"||R==="warning")s="warning";k=n[1]}return{enabled:!!s,severity:s,options:k}}function P(e){let a=Array.isArray(e)?e[0]:e;if(typeof a!=="string")return;if(a==="off")return"off";if(a==="error")return"error";if(a==="warn"||a==="warning")return"warning";return}function o(e,a,n=[],s){for(let R of[a,...n]){let I=P(e.rules?.[R])??P(e.pluginRules?.[R]);if(I)return I==="off"?void 0:I}let k=P(s);return k==="off"?void 0:k}function re(e,a){return P(e.rules?.[a])==="off"||P(e.pluginRules?.[a])==="off"}function w(e,a){return`\x1B[${e}m${a}\x1B[0m`}function J(e){return w("32",e)}function Y(e){return w("31",e)}function Z(e){return w("33",e)}function X(e){return w("34",e)}function Q(e){return w("90",e)}function ee(e){return w("1",e)}var t={green:J,red:Y,yellow:Z,blue:X,gray:Q,bold:ee};function y(e,a){let n=a.ignores?[...new Set([...e.ignores||[],...a.ignores])]:e.ignores,s={...e.pluginRules||{},...a.pluginRules||{}};if((a.tailwind??e.tailwind)?.enabled&&!Object.prototype.hasOwnProperty.call(s,"pickier/sort-tailwind-classes"))s["pickier/sort-tailwind-classes"]="warn";return{...e,...a,verbose:a.verbose??e.verbose,ignores:n,lint:{...e.lint,...a.lint||{}},format:{...e.format,...a.format||{}},rules:{...e.rules,...a.rules||{}},pluginRules:s}}var Me=null;async function u(e){if(!e){if(r.NO_AUTO_CONFIG){if(!Me)Me=y(l,{});return Me}try{let{getConfig:s}=await import("./chunk-jq4ej1qc.js"),k=await s();return y(l,k)}catch{}return y(l,{})}let a=Ie(e)?e:$t(process.cwd(),e);if(Pt(a).toLowerCase()===".json")try{let s=Nt(a,"utf8");return y(l,JSON.parse(s))}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}try{let s=await import(a);return y(l,s.default||s)}catch{return console.warn(`[pickier:warn] Config file not found: ${a}. Using default config values.`),y(l,{})}}function x(e){return e.map((a)=>{if(/[*?[\]{}()!]/.test(a))return a;if(/\.[A-Z0-9]+$/i.test(a))return a;return`${a.replace(/\/$/,"")}/**/*`})}function T(e,a){let n=e.lastIndexOf(".");if(n<0)return!1;let s=e.slice(n);return a.has(s)}function Le(e){if(!e.includes("\\")&&!e.includes("//"))return e;return e.replace(/\\/g,"/").replace(/\/+/g,"/")}function Lt(e){let a=[];for(let n of e){let s=Le(n.trim());if(!s)continue;let k=s.match(/\*\*\/\*\.(.+)$/);if(k){a.push({raw:s,kind:"extension",value:k[1]});continue}let R=s.match(/\*\*\/(.+?)\/\*\*$/);if(R){a.push({raw:s,kind:"segment",value:R[1]});continue}let I=s.match(/\*\*\/(.+)$/);if(I)a.push({raw:s,kind:"suffix",value:I[1].replace(/\/$/,"")})}return a}function h(e){return[...new Set([..._,...e])]}function d(e,a=process.cwd()){let n=Lt([..._,...e]);if(n.length===0)return()=>!1;let s=new Set([...m,..._]),k=Le(a).replace(/\/$/,""),R=`${k}/`,I=n.map((v)=>({pattern:v,universal:s.has(v.raw),suffix:v.kind==="extension"?`.${v.value}`:`/${v.value}`,inner:`/${v.value}/`}));return(v)=>{let W=Le(v),K=W!==k&&!W.startsWith(R),F=K?W:W.slice(k.length);for(let{pattern:B,universal:U,suffix:A,inner:V}of I){if(K&&!U)continue;if(B.kind==="extension"){if(F.endsWith(A))return!0;continue}if(B.kind==="segment"||B.kind==="suffix"){if(F.includes(V)||F.endsWith(A))return!0}}return!1}}function ie(e,a){return d(a)(e)}
|
|
29
29
|
export{l,ne,z,g,C,q,G,c,S,p,O,M,E,L,f,se,r,_,m,N,P,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie};
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{l,z,p,O,M,E,L,f,se,r,_,m,N,P,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie}from"../chunk-
|
|
2
|
+
import{l,z,p,O,M,E,L,f,se,r,_,m,N,P,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie}from"../chunk-y545551h.js";import{H,W,A,U,K}from"../chunk-4j76mmf8.js";import"../chunk-292kxjda.js";import{B}from"../chunk-1bknx6m2.js";export{_ as ALWAYS_IGNORES,r as ENV,L as MAX_FIXER_PASSES,m as UNIVERSAL_IGNORES,X as blue,ee as bold,w as colorize,t as colors,z as config,d as createIgnoreMatcher,se as createLimiter,l as defaultConfig,O as detectQuoteIssues,x as expandPatterns,A as fixText,p as formatCode,E as formatImports,N as getRuleSetting,f as glob,Q as gray,J as green,M as hasIndentIssue,T as isCodeFile,re as isRuleOff,W as lintText,u as loadConfigFromPath,y as mergeConfig,P as normalizeRuleSeverity,Y as red,o as resolveRuleSeverity,B as run,H as runFormat,K as runLint,U as runLintProgrammatic,ie as shouldIgnorePath,h as withAlwaysIgnores,Z as yellow};
|
package/dist/src/lint-worker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{u}from"../chunk-
|
|
2
|
+
import{u}from"../chunk-y545551h.js";import{R,v}from"../chunk-4j76mmf8.js";import"../chunk-292kxjda.js";var s,i=null;self.onmessage=async(n)=>{let t=n.data;if(t.type==="init"){s=t.options,i=u(s.config);return}try{let e=await i,o=[];for(let[r,a]of t.batch)o.push([r,await v(a,e,s)]);await R(),postMessage({type:"done",results:o})}catch(e){await R(),postMessage({type:"error",message:e?.message||String(e)})}};
|
package/dist/src/utils.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare function isCodeFile(file: string, allowedExts: Set<string>): bool
|
|
|
69
69
|
/**
|
|
70
70
|
* A project's ignore list, with the never-lintable paths guaranteed to be in
|
|
71
71
|
* it. See {@link ALWAYS_IGNORES}: a project that sets `ignores` replaces the
|
|
72
|
-
* defaults, and the
|
|
72
|
+
* defaults, and the dependency caches nobody meant to opt out of went with them.
|
|
73
73
|
*/
|
|
74
74
|
export declare function withAlwaysIgnores(ignores: readonly string[]): string[];
|
|
75
75
|
/**
|
|
@@ -97,7 +97,7 @@ export declare const ENV: EnvConfig;
|
|
|
97
97
|
* what a project's config says.
|
|
98
98
|
*
|
|
99
99
|
* A project that sets `ignores` REPLACES the defaults — which is what you want
|
|
100
|
-
* for a list of the project's own directories, and a trap for the
|
|
100
|
+
* for a list of the project's own directories, and a trap for the essential entries
|
|
101
101
|
* nobody meant to opt out of. Every stacks app ships a `config/code-style.ts`
|
|
102
102
|
* with an `ignores` array, so every stacks app was linting its dependencies:
|
|
103
103
|
* `node_modules` was in the defaults, the project list did not repeat it, and
|
|
@@ -107,8 +107,8 @@ export declare const ENV: EnvConfig;
|
|
|
107
107
|
*
|
|
108
108
|
* Deliberately just these. `dist`, `coverage`, `.github` and the rest stay
|
|
109
109
|
* overridable, because linting your own build output or your workflows is a
|
|
110
|
-
* reasonable thing to want.
|
|
111
|
-
*
|
|
110
|
+
* reasonable thing to want. Dependency package caches in `node_modules` and `zig-pkg`, and the
|
|
111
|
+
* object database in `.git`, are not project source.
|
|
112
112
|
*/
|
|
113
113
|
export declare const ALWAYS_IGNORES: readonly string[];
|
|
114
114
|
/**
|
package/package.json
CHANGED
package/dist/chunk-3ezjct24.js
DELETED
package/dist/chunk-rt9y8epr.js
DELETED
package/dist/chunk-w8g51z9j.js
DELETED