pickier 0.1.75 → 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-xgqhgjnn.js → chunk-1bknx6m2.js} +1 -1
- package/dist/{chunk-hm7sfaz3.js → chunk-292kxjda.js} +1 -1
- package/dist/{chunk-shq21jvq.js → chunk-4j76mmf8.js} +30 -30
- package/dist/chunk-c0hw4t4x.js +2 -0
- package/dist/{chunk-q50pq5mc.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-9k028jfq.js +0 -2
- package/dist/chunk-n224szdq.js +0 -2
- package/dist/chunk-rt9y8epr.js +0 -2
|
@@ -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-9k028jfq.js
DELETED
package/dist/chunk-n224szdq.js
DELETED
package/dist/chunk-rt9y8epr.js
DELETED