pickier 0.1.72 → 0.1.74
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 +2 -2
- package/dist/{chunk-mfns8s7h.js → chunk-2n2819ks.js} +40 -40
- package/dist/chunk-fn87cp4c.js +2 -0
- package/dist/{chunk-bf41tx1b.js → chunk-gm98vb80.js} +1 -1
- package/dist/chunk-gx7gjw2a.js +2 -0
- package/dist/{chunk-mgry8xhx.js → chunk-nhan327m.js} +1 -1
- package/dist/{chunk-m9saxre0.js → chunk-rdpajf43.js} +1 -1
- package/dist/{chunk-hx0z7dzw.js → chunk-rx0b7k57.js} +11 -11
- package/dist/chunk-zdbvg427.js +2 -0
- package/dist/src/cache.d.ts +5 -0
- package/dist/src/index.js +1 -1
- package/dist/src/lint-worker.js +1 -1
- package/dist/src/types.d.ts +2 -0
- package/package.json +1 -1
- package/dist/chunk-1vnz0vyr.js +0 -2
- package/dist/chunk-50z6kpcq.js +0 -2
- package/dist/chunk-cscys77z.js +0 -2
|
@@ -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.74",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,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{p,u}from"./chunk-
|
|
2
|
+
import{p,u}from"./chunk-rx0b7k57.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-zdbvg427.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,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-gm98vb80.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,29 +1,29 @@
|
|
|
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 v of R){if(v.isDirectory())continue;if(mn.test(v.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-t0w79bj5.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
|
|
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&&
|
|
4
|
-
`?3:2;continue}if(
|
|
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 v of R){if(v.isDirectory())continue;if(mn.test(v.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-t0w79bj5.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
|
+
`||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,v="operator",A=0;if(e.startsWith("#!")){let F=2;while(F<s&&!ke(e[F]))F+=1;a.push({kind:"comment",start:2,end:F}),A=F}let W=(F)=>{if(k.length===0)R=F;k.push(-1)},K=()=>{let F=A;while(A<s){let B=e[A];if(B==="\\"){A+=2;continue}if(B==="`"){if(a.push({kind:"template",start:F,end:A}),k.pop(),k.length===0)n.push([R,A]);A+=1,v="value";return}if(B==="$"&&e[A+1]==="{"){a.push({kind:"template",start:F,end:A}),k.push(0),A+=2,v="operator";return}A+=1}A=Math.min(A,s),a.push({kind:"template",start:F,end:A}),k.length=0,n.push([R,s])};while(A<s){if(k.length>0&&k[k.length-1]===-1){K();continue}let F=e[A],B=e[A+1];if(F==="/"&&B==="/"){let U=A+2;while(U<s&&!ke(e[U]))U+=1;a.push({kind:"comment",start:A+2,end:U}),A=U;continue}if(F==="/"&&B==="*"){let U=e.indexOf("*/",A+2),P=U<0?s:U;a.push({kind:"comment",start:A+2,end:P}),A=U<0?s:U+2;continue}if(F==="'"||F==='"'){let U=A+1,P=U;while(P<s){let V=e[P];if(V==="\\"){P+=e[P+1]==="\r"&&e[P+2]===`
|
|
4
|
+
`?3:2;continue}if(V===F||ke(V))break;P+=1}P=Math.min(P,s),a.push({kind:"string",start:U,end:P}),A=e[P]===F?P+1:P,v="value";continue}if(F==="`"){W(A),A+=1;continue}if(F==="/"){let U=v==="operator"?wn(e,A):-1;if(U>0){let P=U;while(P>A&&e[P-1]!=="/")P-=1;a.push({kind:"regex",start:A+1,end:P-1}),A=U,v="value";continue}A+=1,v="operator";continue}if(k.length>0){if(F==="{"){k[k.length-1]+=1,A+=1,v="operator";continue}if(F==="}"){let U=k[k.length-1];if(U>0)k[k.length-1]=U-1,v="operator";else k.pop();A+=1;continue}}if(ve(e.charCodeAt(A))){let U=A+1;while(U<s&&ve(e.charCodeAt(U)))U+=1;let P=e.slice(A,U);v=yn.has(P)?"operator":"value",A=U;continue}if(F===")"||F==="]")v="value";else if(!(F===" "||F>="\t"&&F<="\r"))v="operator";A+=1}return{regions:a,templates:n}}function I(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 v=kn(e,s,n);return Ae.set(k,{text:e,masked:v}),v}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 v=Math.max(R.start,k),A=Math.min(R.end,e.length);if(v>=A)continue;s+=e.slice(k,v)+xn(e.slice(v,A)),k=A}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 I(e,{comments:!0})}function c(e){return I(e,{comments:!0,strings:!0,templates:!0,regex:!0})}function S(e,a=g(e)){let n=[0];for(let v=e.indexOf(`
|
|
5
5
|
`);v!==-1;v=e.indexOf(`
|
|
6
|
-
`,v+1))n.push(v+1);let s=Array.from({length:n.length}).fill(!1),k=a.regions.filter((v)=>v.kind==="template"),R=0;for(let v=0;v<n.length;v+=1){let A=n[v];while(R<k.length&&k[R].end<A)R+=1;let
|
|
7
|
-
`),s=n.length,k=Array(s),R=a.format.indent,v=a.format.indentStyle==="tabs",A=0,
|
|
6
|
+
`,v+1))n.push(v+1);let s=Array.from({length:n.length}).fill(!1),k=a.regions.filter((v)=>v.kind==="template"),R=0;for(let v=0;v<n.length;v+=1){let A=n[v];while(R<k.length&&k[R].end<A)R+=1;let W=k[R];s[v]=W!==void 0&&W.start<=A&&A<=W.end&&A>0}return s}var En=new Set([".ts",".js"]),Sn=new Set([".json",".jsonc"]),Rn=new Set([".yaml",".yml"]),_n=new Set([".sh",".bash",".zsh",".ksh",".dash"]),In=new Set([".md",".mdx",".markdown"]),On=/^#!\s*(?:\/usr\/bin\/env\s+)?(?:ba|z|k|da)?sh\b/;var vn=/^[}\])]/,An=/\s*\/\/.*$/,Tn=/^(?:if|else\s+if|for|while)\s*\(/,Nn=/^(?:if|else|for|while|do)\b/,Pn=/^(?:\.[\w$[]|\?[\s.:]|:\s|&&|\|\|)/;function $n(e){let a=e.charCodeAt(0);if(a!==105&&a!==101&&a!==102&&a!==119&&a!==100)return!1;let n=Tn.exec(e);if(!n)return/^(?:else|do)\s*$/.test(e);let s=0,k=null;for(let R=n[0].length-1;R<e.length;R++){let v=e[R];if(k){if(v==="\\"){R++;continue}if(v===k)k=null;continue}if(v==="'"||v==='"'||v==="`"){k=v;continue}if(v==="(")s++;else if(v===")"){if(s--,s===0)return e.slice(R+1).trim().length===0}}return!1}var Mn=/^\s*for\s*\(/,Ln=new RegExp("^\\s*;\\s*$"),jn=new RegExp(";{2,}\\s*$"),Dn=/([\w)])\{/g,Fn=/\{(return|if|for|while|switch|const|let|var|function)\b/g,Wn=/,(\S)/g,Un=/(?<![=!<>+\-*/%&|^?])=(?![=><])/g,Gn=/(\w)\+(\w)/g,Kn=/(\w)-(\w)/g,Bn=/(\w)\*(\w)/g,zn=/(\w)\/(\w)/g,Hn=new RegExp("(?<=\\S);([^\\s;])","g"),Jn=/([\w)\]])<(\d)/g,qn=/([\w)\]])>(\d)/g,De=/\s{2,}/g,Fe=/^\s*$/,Yn=/^\s*\/\//,We=/^\s*\/\*/,Xn=/^\s*import\b/,Ue=/\bfrom\s*['"][^'"]+['"]|^\s*import\s+['"][^'"]+['"]/,Qn=/package\.json$/i,Vn=/[jt]sconfig(?:\..+)?\.json$/i,ye=/[ \t]+$/,Zn=/^\n+/;function xe(e){let a=e.lastIndexOf(".");return a>=0?e.slice(a):""}function Se(e){return En.has(xe(e))}function et(e){return Sn.has(xe(e))}function nt(e){return Rn.has(xe(e))}function tt(e){return In.has(xe(e))}function rt(e){return _n.has(xe(e))}function st(e,a){return rt(e)||On.test(a)}function ot(e,a){let n=e.split(`
|
|
7
|
+
`),s=n.length,k=Array(s),R=a.format.indent,v=a.format.indentStyle==="tabs",A=0,W=new b,K=!1,F="",B=!1,U=0;for(let P=0;P<s;P++){let V=n[P];if(V.length===0||/^\s*$/.test(V)){k[P]="";continue}if(K){if(k[P]=V,V.trim()===F)K=!1,F="";continue}let oe=i(V);if(oe)K=!0,F=oe;let le=0;while(le<V.length&&(V.charCodeAt(le)===32||V.charCodeAt(le)===9))le++;let H=V.slice(le).trimEnd();if(H.startsWith("#")&&P>0){let D=v?"\t".repeat(A):" ".repeat(A*R);k[P]=D+H;continue}let fe=W.read(H);if(/^case\b/.test(H)&&/\bin\s*$/.test(H))U++,B=!0;if(/^esac\b/.test(H)){if(U=Math.max(0,U-1),U===0)B=!1}let me=B&&/\)\s*$/.test(H)&&!/\$\(/.test(H)&&!/^\s*\(/.test(H)&&!H.startsWith("#"),ce=/^;[;&]\s*$/.test(H),ge=/^(?:fi|done|esac|elif|else)\b/.test(H)||/^\}/.test(H);if(!fe.continuation&&ge)A=Math.max(0,A-1);if(!fe.continuation&&ce)A=Math.max(0,A-1);let he=A+Number(fe.continuation),de=v?"\t".repeat(he):" ".repeat(he*R);if(k[P]=de+H,fe.continuation){if(fe.closesHeader)A++;continue}if(/^then\b/.test(H)||/^do\b/.test(H)||/^else\b/.test(H))A++;else if(/^if\b/.test(H)&&/\bthen\s*$/.test(H))A++;else if(/^elif\b/.test(H)&&/\bthen\s*$/.test(H))A++;else if(/^(?:while|for|until)\b/.test(H)&&/\bdo\s*$/.test(H))A++;else if(/^case\b/.test(H)&&/\bin\s*$/.test(H))A++;else if(me)A++;else if(/\{\s*$/.test(H)&&!H.startsWith("#"))A++}return k.join(`
|
|
8
8
|
`)}var it=/(?:^|\s)#/;function lt(e,a){if(it.test(e))return e;try{let n=Bun.YAML.parse(e),s=a.format.indentStyle==="tabs"?"\t":a.format.indent;return Bun.YAML.stringify(n,null,s).split(`
|
|
9
9
|
`).map((R)=>R.replace(/[ \t]+$/,"")).join(`
|
|
10
10
|
`)}catch{return e}}var Ge=Array.from({length:129},(e,a)=>" ".repeat(a));function at(e){if(e<=0)return"";return e<Ge.length?Ge[e]:" ".repeat(e)}function ct(e,a){if((a.format.indentStyle||"spaces")==="tabs")return"\t".repeat(Math.max(0,e));return at(Math.max(0,e*a.format.indent))}function ft(e){return`'${e.slice(1,-1).replace(/\\"/g,'"')}'`}function ut(e){return`"${e.slice(1,-1).replace(/\\'/g,"'")}"`}function dt(e,a){for(let n=0;n<e.length;n++){if(e[n]==="\\"){n++;continue}if(e[n]===a)return!0}return!1}function pt(e,a,n){if(!Se(n))return e;let s=e.split(`
|
|
11
11
|
`);for(let k=0;k<s.length;k++)s[k]=Xe(s[k],a);return s.join(`
|
|
12
|
-
`)}function Xe(e,a){let n=a==="single";if(n?!e.includes('"'):!e.includes("'"))return e;let s=[],k=0,R=0,v=0,A=0;while(k<e.length){let
|
|
12
|
+
`)}function Xe(e,a){let n=a==="single";if(n?!e.includes('"'):!e.includes("'"))return e;let s=[],k=0,R=0,v=0,A=0;while(k<e.length){let W=e[k];if(v===0){if(W==="/"){let K=e[k+1];if(K==="/")break;if(K==="*"){let F=e.indexOf("*/",k+2);k=F===-1?e.length:F+2;continue}if(Pe(e,k)){let F=$e(e,k);if(F!==-1){k=F;continue}}k++;continue}if(W==='"'){v=2,A=k,k++;continue}if(W==="'"){v=1,A=k,k++;continue}if(W==="`"){v=3,k++;continue}k++}else if(v===3){if(W==="\\"){k+=2;continue}if(W==="`")v=0;k++}else{if(W==="\\"){k+=2;continue}if(W===(v===1?"'":'"')){let F=e.slice(A+1,k);if((v===2&&n||v===1&&!n)&&!dt(F,n?"'":'"')){if(A>R)s.push(e.slice(R,A));if(v===2)s.push(ft(`"${F}"`));else s.push(ut(`'${F}'`));R=k+1}v=0,k++;continue}k++}}if(s.length===0)return e;if(R<e.length)s.push(e.slice(R));return s.join("")}function mt(e){return e===123||e===44||e===61||e===43||e===45||e===42||e===47||e===59||e===60||e===62}var gt=/\s/;function ht(e,a){let n=!1;for(let s=a;s<e.length;s++){let k=e.charCodeAt(s),R=k===32||k>=9&&k<=13||k>=128&>.test(e[s]);if(R&&n)return!0;n=R}return!1}var Qe=1,Ve=2,Ze=4,en=8,nn=16,tn=32;function Te(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95}function yt(e){let a=0;for(let n=1;n<e.length-1;n++){let s=e.charCodeAt(n);if(s===43||s===45||s===42||s===47){if(Te(e.charCodeAt(n-1))&&Te(e.charCodeAt(n+1)))a|=s===43?Qe:s===45?Ve:s===42?Ze:en}else if(s===60||s===62){let k=e.charCodeAt(n+1),R=e.charCodeAt(n-1);if(k>=48&&k<=57&&(Te(R)||R===41||R===93))a|=s===60?nn:tn}}return a}function wt(e,a){if(a+e.length<4)return e;let n=0;while(n<e.length&&(e[n]===" "||e[n]==="\t"))n++;if(n<e.length){let W=e[n];if(W==="/"&&(e[n+1]==="/"||e[n+1]==="*"))return e;if(W==="*")return e}let s=!1;for(let W=n;W<e.length;W++)if(mt(e.charCodeAt(W))){s=!0;break}if(!s)return e;let{text:k,strings:R}=Et(e),v=k;if(v.includes("{"))v=v.replace(Dn,"$1 {"),v=v.replace(Fn,"{ $1");if(v.includes(","))v=v.replace(Wn,", $1");if(v.includes("="))v=v.replace(Un," = ");let A=yt(v);if(A&Qe)v=v.replace(Gn,"$1 + $2");if(A&Ve)v=v.replace(Kn,"$1 - $2");if(A&Ze)v=v.replace(Bn,"$1 * $2");if(A&en)v=v.replace(zn,"$1 / $2");if(v.includes(";"))v=v.replace(Hn,"; $1");if(A&nn)v=v.replace(Jn,"$1 < $2");if(A&tn)v=v.replace(qn,"$1 > $2");if(ht(v,n))if(n>0){let W=v.slice(n);v=v.slice(0,n)+W.replace(De," ")}else v=v.replace(De," ");return R.length>0?St(v,R):v}function Re(e){let a=e[e.length-1];return a!==void 0&&a.t==="tmpl"}function rn(e,a,n){a++;while(a<e.length){let s=e[a];if(s==="\\"){a+=2;continue}if(s===n)return a+1;a++}return a}function Ne(e,a){for(let s of a)if(s.t==="tmpl")s.start=-1;let n=0;while(n<e.length){let s=a[a.length-1],k=e[n];if(s===void 0||s.t==="interp"){if(k==="`"){a.push({t:"tmpl",start:n}),n++;continue}if(k==="'"||k==='"'){n=rn(e,n,k);continue}if(k==="/"){if(e[n+1]==="/")break;if(e[n+1]==="*"){let R=e.indexOf("*/",n+2);if(R===-1)break;n=R+2;continue}if(Pe(e,n)){let R=$e(e,n);if(R!==-1){n=R;continue}}n++;continue}if(s!==void 0){if(k==="{"){s.braces++,n++;continue}if(k==="}"){if(s.braces===0)a.pop();else s.braces--;n++;continue}}n++}else{if(k==="\\"){n+=2;continue}if(k==="`"){a.pop(),n++;continue}if(k==="$"&&e[n+1]==="{"){a.push({t:"interp",braces:0}),n+=2;continue}n++}}if(Re(a)){for(let s of a)if(s.t==="tmpl"&&s.start>=0)return s.start}return-1}function Ke(e,a){let n=a,s=null,k=0;while(k<e.length){let R=e[k];if(n){if(R==="*"&&e[k+1]==="/"){n=!1,k+=2;continue}k++;continue}if(s){if(R==="\\"){k+=2;continue}if(R===s)s=null;k++;continue}if(R==="'"||R==='"'||R==="`"){s=R,k++;continue}if(R==="/"){if(e[k+1]==="/")break;if(e[k+1]==="*"){n=!0,k+=2;continue}}k++}return n}function Be(e,a){let n=e.length,s=Array(n),k=a.format.quotes,R=a.format.semi===!0,v=0,A=0,W=!1,K=[],F=0,B=[];for(let U=0;U<n;U++){let P=e[U];if(W){W=Ke(P,!0),s[U]=P;continue}let V=Re(B),oe=-1;if(B.length>0||P.indexOf("`")!==-1)oe=Ne(P,B);if(V){s[U]=P;continue}if(oe<0&&B.length===0)W=P.includes("/*")&&Ke(P,!1);let le="",H=!1,fe="";if(oe>=0){le=P.slice(oe);let te=P.slice(0,oe);if(te.length===0){s[U]=le;continue}if(H=ye.test(te),te.trim().length===0)fe=te;P=te}if(P.length===0){s[U]="";continue}P=Xe(P,k);let me=0;while(me<P.length&&(P.charCodeAt(me)===32||P.charCodeAt(me)===9))me++;let ce=P.slice(me).trimEnd(),ge=0;if(vn.test(ce))v=Math.max(0,v-1),ge=K.pop()??0;let he=Pn.test(ce)?1:0,de=a.format.preserveCodeIndentation?P.slice(0,me):ct(v+F+A+he,a);F-=ge;let D=ce.charCodeAt(ce.length-1);if(D===123||D===91||D===40){v+=1;let te=he===1&&ce.charCodeAt(0)===46?1:0;K.push(te),F+=te,A=0}else if(!ce.startsWith("//")&&!ce.startsWith("*")&&!ce.startsWith("/*"))if(!Nn.test(ce))A=0;else{let te=c(ce),ue=te.includes("//")?te.replace(An,""):te;A=$n(ue)?A+1:0}let j=wt(ce,de.length),ae=!1;if(R){if(!Mn.test(j))if(Ln.test(j))ae=!0;else j=j.replace(jn,";")}if(ae)P="";else if(a.format.trimTrailingWhitespace)j=j.trimEnd(),P=j.length===0?"":de+j;else P=de+j;if(oe>=0){if(fe)P=fe;else if(H&&!ye.test(P))P+=" ";P+=le}s[U]=P}return s}var ze=/^[ \t]*(`{3,}|~{3,})(.*)$/,bt=/^ {0,3}#{1,6}(?:[ \t]|$)/;function kt(e,a){let n=a.format.trimTrailingWhitespace,s=Math.max(0,a.format.maxConsecutiveBlankLines),k=[],R=0,v="",A=0;for(let W=0;W<e.length;W++){let K=e[W];if(v!==""){let V=K.indexOf(v)!==-1?ze.exec(K):null;if(V&&V[1][0]===v&&V[1].length>=A&&V[2].trim()==="")v="",k.push(n?K.replace(ye,""):K);else k.push(K);continue}if(K.length===0||K.trim()===""){if(R++,R<=s)k.push("");continue}if(R=0,K.indexOf("```")!==-1||K.indexOf("~~~")!==-1){let V=ze.exec(K);if(V&&!(V[1][0]==="`"&&V[2].includes("`"))){v=V[1][0],A=V[1].length,k.push(n?K.replace(ye,""):K);continue}}let F=K.charCodeAt(K.length-1);if(!n||F!==32&&F!==9){k.push(K);continue}let B=K.replace(ye,""),U=e[W+1],P=K.endsWith(" ")&&U!==void 0&&U.trim()!==""&&!bt.test(K);k.push(P?`${B} `:B)}return k}function Ct(e,a){let n=[],s=0,k=[];for(let R of e){let v=Re(k);if(k.length>0||R.indexOf("`")!==-1)Ne(R,k);if(v){n.push(R),s=0;continue}if(R===""){if(s++,s<=a)n.push("")}else s=0,n.push(R)}return n}function p(e,a,n){if(e.length===0)return"";let k=(e.includes("\r")?e.replace(/\r\n/g,`
|
|
13
13
|
`):e).split(`
|
|
14
|
-
`),R;if(tt(n))R=kt(k,a);else if(a.format.trimTrailingWhitespace){R=[];let A=0,
|
|
14
|
+
`),R;if(tt(n))R=kt(k,a);else if(a.format.trimTrailingWhitespace){R=[];let A=0,W=Math.max(0,a.format.maxConsecutiveBlankLines),K=[];for(let F of k){let B=Re(K),U=!1;if(K.length>0||F.indexOf("`")!==-1)U=Ne(F,K)>=0;if(B||U){R.push(F),A=0;continue}let P=F[F.length-1],V=P===" "||P==="\t"?F.replace(ye,""):F;if(V===""){if(A++,A<=W)R.push("")}else A=0,R.push(V)}}else R=Ct(k,Math.max(0,a.format.maxConsecutiveBlankLines));let v;if(Se(n)&&!(R.length>0&&R[0].startsWith("#!"))){let A=0;while(A<R.length&&R[A]==="")A++;if(A>0)R=R.slice(A);return R=on(R)??R,v=Be(R,a).join(`
|
|
15
15
|
`),He(v,a)}if(v=R.join(`
|
|
16
16
|
`),v=v.replace(Zn,""),Se(n))v=C(v);if(nt(n)){let A=lt(v,a);if(A!==v)v=A}if(et(n)){let A=Ot(v,n);if(A!=null)v=A}if(st(n,v))v=ot(v,a);else if(Se(n))v=Be(v.split(`
|
|
17
17
|
`),a).join(`
|
|
18
18
|
`);else v=pt(v,a.format.quotes,n);return He(v,a)}function He(e,a){let n=e.length;while(n>0&&e.charCodeAt(n-1)===10)n--;if(a.format.finalNewline==="none")return n===e.length?e:e.slice(0,n);let s=a.format.finalNewline==="two"?`
|
|
19
19
|
|
|
20
20
|
`:`
|
|
21
|
-
`;if(e.length-n===s.length)return e;return e.slice(0,n)+s}function Je(e,a,n,s){for(let k=a+1;k<e.length;k++){let R=e[k];if(R==="\\"){k++;continue}if(R===n)return!0;if(R===s)return!1}return!0}function O(e,a){if(/^\s*\/\/\/\s*<reference/.test(e))return[];let n=[],s=null,k=!1;for(let R=0;R<e.length;R++){let v=e[R];if(k){k=!1;continue}if(v==="\\"){k=!0;continue}if(!s){if(v==="/"&&e[R+1]==="/")break;if(v==="'"){if(a==="double"&&Je(e,R,"'",'"'))n.push(R);s="single";continue}else if(v==='"'){if(a==="single"&&Je(e,R,'"',"'"))n.push(R);s="double";continue}else if(v==="`"){s="template";continue}}else if(s==="single"&&v==="'"||s==="double"&&v==='"'||s==="template"&&v==="`"){s=null;continue}}return n}function M(e,a,n="spaces",s){if(n==="tabs")return/[^\t]/.test(e);if(/\t/.test(e))return!0;let k=e.length;if(s&&k%a===1){let R=s.trimStart();if(R.startsWith("* ")||R.startsWith("*/")||R==="*")return!1}return k%a!==0}function sn(e,a){let n=a+1;while(n<e.length){let s=e[n];if(s==="\\"){n+=2;continue}if(s==="`")return n+1;if(s==="$"&&e[n+1]==="{"){n+=2;let k=1;while(n<e.length&&k>0){let R=e[n];if(R==="\\"){n+=2;continue}if(R==="`"){n=sn(e,n);continue}if(R==="'"||R==='"'){n=rn(e,n,R);continue}if(R==="{")k++;else if(R==="}")k--;n++}continue}n++}return n}var xt=new Set(["return","typeof","instanceof","in","of","new","delete","void","do","else","case","yield","await"]);function
|
|
21
|
+
`;if(e.length-n===s.length)return e;return e.slice(0,n)+s}function Je(e,a,n,s){for(let k=a+1;k<e.length;k++){let R=e[k];if(R==="\\"){k++;continue}if(R===n)return!0;if(R===s)return!1}return!0}function O(e,a){if(/^\s*\/\/\/\s*<reference/.test(e))return[];let n=[],s=null,k=!1;for(let R=0;R<e.length;R++){let v=e[R];if(k){k=!1;continue}if(v==="\\"){k=!0;continue}if(!s){if(v==="/"&&e[R+1]==="/")break;if(v==="'"){if(a==="double"&&Je(e,R,"'",'"'))n.push(R);s="single";continue}else if(v==='"'){if(a==="single"&&Je(e,R,'"',"'"))n.push(R);s="double";continue}else if(v==="`"){s="template";continue}}else if(s==="single"&&v==="'"||s==="double"&&v==='"'||s==="template"&&v==="`"){s=null;continue}}return n}function M(e,a,n="spaces",s){if(n==="tabs")return/[^\t]/.test(e);if(/\t/.test(e))return!0;let k=e.length;if(s&&k%a===1){let R=s.trimStart();if(R.startsWith("* ")||R.startsWith("*/")||R==="*")return!1}return k%a!==0}function sn(e,a){let n=a+1;while(n<e.length){let s=e[n];if(s==="\\"){n+=2;continue}if(s==="`")return n+1;if(s==="$"&&e[n+1]==="{"){n+=2;let k=1;while(n<e.length&&k>0){let R=e[n];if(R==="\\"){n+=2;continue}if(R==="`"){n=sn(e,n);continue}if(R==="'"||R==='"'){n=rn(e,n,R);continue}if(R==="{")k++;else if(R==="}")k--;n++}continue}n++}return n}var xt=new Set(["return","typeof","instanceof","in","of","new","delete","void","do","else","case","yield","await"]);function Pe(e,a){let n=a-1;while(n>=0&&(e[n]===" "||e[n]==="\t"))n--;if(n<0)return!0;let s=e[n];if("(,=:[!&|?;{}<>+-*%^~".includes(s))return!0;if(/[\w$]/.test(s)){let k=n;while(k>=0&&/[\w$]/.test(e[k]))k--;return xt.has(e.slice(k+1,n+1))}return!1}function $e(e,a){let n=a+1,s=!1,k=-1;while(n<e.length){let R=e[n];if(R==="\\"){n+=2;continue}if(R==="["&&!s)s=!0,k=n;else if(R==="]"&&s){let v=e[k+1]==="^"?k+2:k+1;if(n!==v)s=!1}else if(R==="/"&&!s){n++;while(n<e.length&&/[a-z]/i.test(e[n]))n++;return n}n++}return-1}function Et(e){if(!e.includes("'")&&!e.includes('"')&&!e.includes("`")&&!e.includes("/"))return{text:e,strings:[]};let a=[],n=[],s=0,k=0;while(s<e.length){let R=e[s];if(R==="/"){let v=e[s+1];if(v==="/"){if(s>k)n.push(e.slice(k,s));a.push(e.slice(s)),n.push(`@@S${a.length-1}@@`),k=e.length;break}if(v==="*"){let A=e.indexOf("*/",s+2),W=A===-1?e.length:A+2;if(s>k)n.push(e.slice(k,s));a.push(e.slice(s,W)),n.push(`@@S${a.length-1}@@`),s=W,k=s;continue}if(Pe(e,s)){let A=$e(e,s);if(A!==-1){if(s>k)n.push(e.slice(k,s));a.push(e.slice(s,A)),n.push(`@@S${a.length-1}@@`),s=A,k=s;continue}}s++;continue}if(R==="'"||R==='"'||R==="`"){if(s>k)n.push(e.slice(k,s));let v=s;if(R==="`")s=sn(e,s);else{let A=R;s++;while(s<e.length){if(e[s]==="\\"){s+=2;continue}if(e[s]===A){s++;break}s++}}a.push(e.slice(v,s)),n.push(`@@S${a.length-1}@@`),k=s;continue}s++}if(k<e.length)n.push(e.slice(k));return{text:n.join(""),strings:a}}function St(e,a){if(a.length===0)return e;let n="",s=0,k=e.indexOf("@@S");while(k!==-1){let R=k+3;while(R<e.length&&e.charCodeAt(R)>=48&&e.charCodeAt(R)<=57)R++;if(R>k+3&&e.charCodeAt(R)===64&&e.charCodeAt(R+1)===64)n+=e.slice(s,k)+(a[Number(e.slice(k+3,R))]??""),s=R+2,k=e.indexOf("@@S",s);else k=e.indexOf("@@S",k+1)}return s===0?e:n+e.slice(s)}function qe(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95||e===36}function Rt(e,a){let n=0;while(!0){let s=e.indexOf(a,n);if(s===-1)return!1;if(n=s+1,qe(e.charCodeAt(s+a.length)))continue;let k=s-1,R=!0;while(k>=0){let v=e.charCodeAt(k);if(!qe(v))break;if(v<48||v>57){R=!1;break}k--}if(R)return!0}}function C(e){let a=e[0];if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
|
|
22
22
|
`)return e;let n=on(e.split(`
|
|
23
23
|
`));return n===null?e:n.join(`
|
|
24
24
|
`)}function on(e){let a=e.length===0?void 0:e[0].length>0?e[0][0]:e.length>1?`
|
|
25
25
|
`:void 0;if(a!=="i"&&a!==" "&&a!=="\t"&&a!=="/"&&a!==`
|
|
26
|
-
`)return null;let n=[],s=[],k=[],R=0,v=0,A=-1,
|
|
27
|
-
`))de.push(...
|
|
28
|
-
`));else de.push(F)}if(k.length>0)de.push(""),de.push(...k);return de.push(""),de.push(...W),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 W=a[1],j=a[2],B=W.split(",").map((ae)=>ae.trim()).filter(Boolean).map((ae)=>{let ue=ae.match(/^(\w+)(?:\s+as\s+(\w+))?$/);return{name:ue?.[1]||ae,alias:ue?.[2]}});return{kind:"type",source:j,named:[],namedTypes:B,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],v=e.slice(n[0].length,k.index).trim(),A,U,K=[],P=[],H=v.match(/\{([^}]*)\}/);if(H){let j=H[1].split(",").map((B)=>B.trim()).filter(Boolean);for(let B of j){let ae=/^type\s+/.test(B),V=B.replace(/^type\s+/,"").match(/^(\w+)(?:\s+as\s+(\w+))?$/);if(!V)continue;let ce={name:V[1],alias:V[2]};if(ae)P.push(ce);else K.push(ce)}v=v.replace(/\{[\s\S]*?\}/,"").trim()}if(v.length>0){let W=v.split(",").map((j)=>j.trim()).filter(Boolean);for(let j of W)if(j.startsWith("* as "))U=j.slice(5).trim();else if(/^\w+$/.test(j))A=j}return{kind:"value",source:R,defaultName:A,namespaceName:U,named:K,namedTypes:P,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 v=Object.keys(e).filter((A)=>R.test(A)&&!(A in s)).sort();for(let A of v)s[A]=e[A]}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((v)=>typeof v==="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,v=["types","import","require","default"];if(!Array.isArray(R)){let A={};for(let U of Object.keys(R)){let K=R[U];if(K&&typeof K==="object"&&!Array.isArray(K))A[U]=Ce(K,v);else A[U]=K}s.exports=A}}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 Me}from"fs";import{extname as Pt,isAbsolute as _e,join as Ie,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=Ie(e,k);if(a(R))continue;let v;try{v=Me(R)}catch{continue}if(v.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,v=d(s,n);if(typeof globalThis.Bun?.Glob<"u"){let U=globalThis.Bun.Glob,K=[];for(let P of e){if(!/[*?[{]/.test(P)){let W=_e(P)?P:Ie(n,P);if(Me(W,{throwIfNoEntry:!1})?.isFile()){if(!v(W))K.push(R?W:W.startsWith(`${n}/`)?W.slice(n.length+1):W);continue}}let H=new U(P);for await(let W of H.scan({cwd:n,dot:k,onlyFiles:a.onlyFiles??!0,followSymlinks:!1})){let j=_e(W)?W:Ie(n,W),B=j.startsWith(`${n}/`)?j.slice(n.length+1):j;if(v(j))continue;K.push(R?j:B)}}return K}let A=[];for(let U of e){if(!/[*?[{]/.test(U)){let P=_e(U)?U:Ie(n,U);try{if(!Me(P).isDirectory()){let W=P.startsWith(`${n}/`)?P.slice(n.length+1):P;if(!v(P))A.push(R?P:W)}else for(let W of an(P,s,k,n))A.push(R?W:W.startsWith(`${n}/`)?W.slice(n.length+1):W)}catch{}continue}let K=Mt(U);for(let P of an(n,s,k,n)){let H=P.startsWith(`${n}/`)?P.slice(n.length+1):P;if(K.test(H)||K.test(H.replace(/\\/g,"/")))A.push(R?P:H)}}return A}function se(e){let a=0,n=[],s=()=>{if(n.length>0&&a<e)a++,n.shift()()};return(k)=>new Promise((R,v)=>{let A=()=>{k().then((U)=>{a--,R(U),s()},(U)=>{a--,v(U),s()})};if(a<e)a++,A();else n.push(A)})}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 v=a.slice(0,R),A=a.slice(R+1),U=v==="general"?"pickier":v==="pickier"?"general":null;if(U)n=e[`${U}/${A}`];if(n===void 0)n=e[A]}}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 E(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 v=E(e.rules?.[R])??E(e.pluginRules?.[R]);if(v)return v==="off"?void 0:v}let k=E(s);return k==="off"?void 0:k}function re(e,a){return E(e.rules?.[a])==="off"||E(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 $e=null;async function u(e){if(!e){if(r.NO_AUTO_CONFIG){if(!$e)$e=y(l,{});return $e}try{let{getConfig:s}=await import("./chunk-1vnz0vyr.js"),k=await s();return y(l,k)}catch{}return y(l,{})}let a=_e(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 v=s.match(/\*\*\/(.+)$/);if(v)a.push({raw:s,kind:"suffix",value:v[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}/`,v=n.map((A)=>({pattern:A,universal:s.has(A.raw),suffix:A.kind==="extension"?`.${A.value}`:`/${A.value}`,inner:`/${A.value}/`}));return(A)=>{let U=Le(A),K=U!==k&&!U.startsWith(R),P=K?U:U.slice(k.length);for(let{pattern:H,universal:W,suffix:j,inner:B}of v){if(K&&!W)continue;if(H.kind==="extension"){if(P.endsWith(j))return!0;continue}if(H.kind==="segment"||H.kind==="suffix"){if(P.includes(B)||P.endsWith(j))return!0}}return!1}}function ie(e,a){return d(a)(e)}
|
|
26
|
+
`)return null;let n=[],s=[],k=[],R=0,v=0,A=-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]);v=R}else if(A<0)A=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(A>=0){let ue=[];for(let pe=A;pe<R;pe++)if(!Fe.test(e[pe]))ue.push(e[pe]);if(ue.length>0)te.comments=ue;A=-1}n.push(te),R=ae,v=R,W=!0}if(n.length===0)return null;let K=A>=0?A:v,F=e.slice(K),B=0;while(B<F.length&&F[B]==="")B++;let U=B===0?F:F.slice(B),P=new Map,V=(D)=>{let j=P.get(D);if(j===void 0){j=!1;for(let ae of F)if(Rt(ae,D)){j=!0;break}P.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
|
+
`))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],P=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:P,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],v=e.slice(n[0].length,k.index).trim(),A,W,K=[],F=[],B=v.match(/\{([^}]*)\}/);if(B){let P=B[1].split(",").map((V)=>V.trim()).filter(Boolean);for(let V of P){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)}v=v.replace(/\{[\s\S]*?\}/,"").trim()}if(v.length>0){let U=v.split(",").map((P)=>P.trim()).filter(Boolean);for(let P of U)if(P.startsWith("* as "))W=P.slice(5).trim();else if(/^\w+$/.test(P))A=P}return{kind:"value",source:R,defaultName:A,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 v=Object.keys(e).filter((A)=>R.test(A)&&!(A in s)).sort();for(let A of v)s[A]=e[A]}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((v)=>typeof v==="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,v=["types","import","require","default"];if(!Array.isArray(R)){let A={};for(let W of Object.keys(R)){let K=R[W];if(K&&typeof K==="object"&&!Array.isArray(K))A[W]=Ce(K,v);else A[W]=K}s.exports=A}}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 v;try{v=_e(R)}catch{continue}if(v.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,v=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(!v(B))K.push(R?B:B.startsWith(`${n}/`)?B.slice(n.length+1):B);continue}let P=U?.isDirectory()?B:n,V=new W(U?.isDirectory()?"**/*":F);for await(let oe of V.scan({cwd:P,dot:k,onlyFiles:a.onlyFiles??!0,followSymlinks:!1})){let le=Ie(oe)?oe:Oe(P,oe),H=le.startsWith(`${n}/`)?le.slice(n.length+1):le;if(v(le))continue;K.push(R?le:H)}}return K}let A=[];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 P=K.startsWith(`${n}/`)?K.slice(n.length+1):K;if(!v(K))A.push(R?K:P)}else for(let P of an(K,s,k,n))A.push(R?P:P.startsWith(`${n}/`)?P.slice(n.length+1):P)}catch{}continue}let B=Mt(W);for(let U of an(n,s,k,n)){let P=U.startsWith(`${n}/`)?U.slice(n.length+1):U;if(B.test(P)||B.test(P.replace(/\\/g,"/")))A.push(R?U:P)}}return A}function se(e){let a=0,n=[],s=()=>{if(n.length>0&&a<e)a++,n.shift()()};return(k)=>new Promise((R,v)=>{let A=()=>{k().then((W)=>{a--,R(W),s()},(W)=>{a--,v(W),s()})};if(a<e)a++,A();else n.push(A)})}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 v=a.slice(0,R),A=a.slice(R+1),W=v==="general"?"pickier":v==="pickier"?"general":null;if(W)n=e[`${W}/${A}`];if(n===void 0)n=e[A]}}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 E(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 v=E(e.rules?.[R])??E(e.pluginRules?.[R]);if(v)return v==="off"?void 0:v}let k=E(s);return k==="off"?void 0:k}function re(e,a){return E(e.rules?.[a])==="off"||E(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-fn87cp4c.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 v=s.match(/\*\*\/(.+)$/);if(v)a.push({raw:s,kind:"suffix",value:v[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}/`,v=n.map((A)=>({pattern:A,universal:s.has(A.raw),suffix:A.kind==="extension"?`.${A.value}`:`/${A.value}`,inner:`/${A.value}/`}));return(A)=>{let W=Le(A),K=W!==k&&!W.startsWith(R),F=K?W:W.slice(k.length);for(let{pattern:B,universal:U,suffix:P,inner:V}of v){if(K&&!U)continue;if(B.kind==="extension"){if(F.endsWith(P))return!0;continue}if(B.kind==="segment"||B.kind==="suffix"){if(F.includes(V)||F.endsWith(P))return!0}}return!1}}function ie(e,a){return d(a)(e)}
|
|
29
29
|
export{l,ne,z,g,I,q,G,c,S,p,O,M,C,L,f,se,r,_,m,N,E,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie};
|
package/dist/src/cache.d.ts
CHANGED
|
@@ -12,6 +12,11 @@ export declare function openLintCache(cfg: PickierConfig, options: LintOptions,
|
|
|
12
12
|
* config - rule functions included, so a changed plugin invalidates it - and
|
|
13
13
|
* the same run options; anything else starts from empty. Runs that write
|
|
14
14
|
* files (`--fix`, `--write`) neither read nor write it.
|
|
15
|
+
*
|
|
16
|
+
* Entries are keyed by the path relative to the working directory, and an
|
|
17
|
+
* issue's own path is stored as a reference to its file, so the same project
|
|
18
|
+
* checked out somewhere else - every CI job gets a fresh directory - reuses the
|
|
19
|
+
* cache when it is kept outside the checkout (`--cache-location`).
|
|
15
20
|
*/
|
|
16
21
|
export declare const DEFAULT_CACHE_LOCATION: '.pickiercache';
|
|
17
22
|
export declare interface LintCache {
|
package/dist/src/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{l,z,p,O,M,C,L,f,se,r,_,m,N,E,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,C,L,f,se,r,_,m,N,E,o,re,w,J,Y,Z,X,Q,ee,t,y,u,x,T,h,d,ie}from"../chunk-rx0b7k57.js";import{H,W,A,U,K}from"../chunk-2n2819ks.js";import"../chunk-gm98vb80.js";import{B}from"../chunk-nhan327m.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,C 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,E 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-rx0b7k57.js";import{R,v}from"../chunk-2n2819ks.js";import"../chunk-gm98vb80.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/types.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare interface PickierLintConfig {
|
|
|
19
19
|
extensions: Extension[]
|
|
20
20
|
reporter: 'stylish' | 'json' | 'compact'
|
|
21
21
|
cache: boolean
|
|
22
|
+
cacheLocation?: string
|
|
22
23
|
maxWarnings: number
|
|
23
24
|
}
|
|
24
25
|
export declare interface PickierFormatConfig {
|
|
@@ -78,6 +79,7 @@ export declare interface LintOptions {
|
|
|
78
79
|
ignorePath?: string
|
|
79
80
|
ext?: string
|
|
80
81
|
cache?: boolean
|
|
82
|
+
cacheLocation?: string
|
|
81
83
|
verbose?: boolean
|
|
82
84
|
_formatOnly?: boolean
|
|
83
85
|
_nativeRules?: string[]
|
package/package.json
CHANGED
package/dist/chunk-1vnz0vyr.js
DELETED
package/dist/chunk-50z6kpcq.js
DELETED
package/dist/chunk-cscys77z.js
DELETED