pickier 0.1.64 → 0.1.65

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env bun
2
2
  // @bun
3
- import{Q as a}from"../chunk-awmb5sg5.js";async function v(){let n=process.argv.slice(2),p=n[0]==="run",k=p?1:0,c=p?"auto":"lint",u=!1,d=!1,g=!1,h=!1,x,l=[],w=!0;for(let t=k;t<n.length;t++){let e=n[t];if(e==="--mode")c=n[++t]||"auto";else if(e==="--format")g=!0,c="format";else if(e==="--check")u=!0;else if(e==="--write")d=!0;else if(e==="--config")x=n[++t];else if(e==="--verbose")h=!0;else if(e==="--ext"||e==="--ignore-path")t++;else if(e==="--fix"||e==="--dry-run"||e==="--reporter"||e==="--max-warnings"||e==="--cache"){w=!1,l.length=0;break}else if(e.startsWith("--"));else l.push(e)}if(w&&(c==="format"||c==="auto"||c==="lint")&&l.length>0){let{runUnified:t}=await import("../chunk-abs1kewd.js"),e=await t(l,{mode:c,check:u,write:d,verbose:h,config:x});process.exit(e)}let{CLI:b}=await import("../chunk-hwa8gmzb.js"),{version:y}=await import("../chunk-1x4nw0af.js"),r=new b("pickier"),f=(t)=>{let[e,o]=t;return[Array.isArray(e)?e.filter((m)=>typeof m==="string"):[],o&&typeof o==="object"?o:{}]};r.command("[...globs]","Lint files (default)").option("--fix","Auto-fix lint problems").option("--format","Format files instead of linting").option("--dry-run","Simulate fixes without writing").option("--check","Check formatting without writing (CI-friendly)").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...t)=>{let[e,o]=f(t);if(e.length===0){r.outputHelp();return}let{runUnified:s}=await import("../chunk-abs1kewd.js"),i;if(o.format){if(i="format",!o.check)o.write=!0}else i="lint";let m=await s(e,{...o,mode:i});process.exit(m)}),r.command("lint [...globs]","[DEPRECATION] Use `pickier [...globs]` instead. Lint files").option("--fix","Auto-fix problems").option("--dry-run","Simulate fixes without writing").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...t)=>{let[e,o]=f(t),{runUnified:s}=await import("../chunk-abs1kewd.js"),i=await s(e,{...o,mode:"lint"});process.exit(i)}),r.command("format [...globs]","[DEPRECATION] Use `pickier [...globs] --format` instead. Format files").option("--write","Write changes to files").option("--check","Check without writing (CI-friendly)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file").option("--ext <exts>","Comma-separated extensions").option("--verbose","Verbose output").example("pickier format . --write").example("pickier format . --check").action(async(...t)=>{let[e,o]=f(t),{runUnified:s}=await import("../chunk-abs1kewd.js"),i=await s(e,{...o,mode:"format"});process.exit(i)}),r.command("run [...globs]","Unified mode (auto, lint, or format)").option("--mode <mode>","auto|lint|format",{default:"auto"}).option("--fix","Auto-fix problems (lint mode)").option("--dry-run","Simulate fixes without writing (lint mode)").option("--max-warnings <n>","Max warnings before non-zero exit (lint mode)",{default:-1}).option("--reporter <name>","stylish|json|compact (lint mode)",{default:"stylish"}).option("--write","Write changes to files (format mode)").option("--check","Check without writing (format mode)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache (lint mode)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...t)=>{let[e,o]=f(t),{runUnified:s}=await import("../chunk-abs1kewd.js"),i=await s(e,o);process.exit(i)}),r.command("version","Show the version of the CLI").action(async()=>{let{version:t}=await import("../chunk-1x4nw0af.js");process.stdout.write(`${t}
3
+ import{Q as a}from"../chunk-awmb5sg5.js";async function v(){let n=process.argv.slice(2),p=n[0]==="run",k=p?1:0,c=p?"auto":"lint",u=!1,d=!1,g=!1,h=!1,x,l=[],w=!0;for(let t=k;t<n.length;t++){let e=n[t];if(e==="--mode")c=n[++t]||"auto";else if(e==="--format")g=!0,c="format";else if(e==="--check")u=!0;else if(e==="--write")d=!0;else if(e==="--config")x=n[++t];else if(e==="--verbose")h=!0;else if(e==="--ext"||e==="--ignore-path")t++;else if(e==="--fix"||e==="--dry-run"||e==="--reporter"||e==="--max-warnings"||e==="--cache"){w=!1,l.length=0;break}else if(e.startsWith("--"));else l.push(e)}if(w&&(c==="format"||c==="auto"||c==="lint")&&l.length>0){let{runUnified:t}=await import("../chunk-wh52kdr1.js"),e=await t(l,{mode:c,check:u,write:d,verbose:h,config:x});process.exit(e)}let{CLI:b}=await import("../chunk-hwa8gmzb.js"),{version:y}=await import("../chunk-qh9cawym.js"),r=new b("pickier"),f=(t)=>{let[e,o]=t;return[Array.isArray(e)?e.filter((m)=>typeof m==="string"):[],o&&typeof o==="object"?o:{}]};r.command("[...globs]","Lint files (default)").option("--fix","Auto-fix lint problems").option("--format","Format files instead of linting").option("--dry-run","Simulate fixes without writing").option("--check","Check formatting without writing (CI-friendly)").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier .").example("pickier . --fix").example("pickier . --format").example("pickier src --fix --verbose").action(async(...t)=>{let[e,o]=f(t);if(e.length===0){r.outputHelp();return}let{runUnified:s}=await import("../chunk-wh52kdr1.js"),i;if(o.format){if(i="format",!o.check)o.write=!0}else i="lint";let m=await s(e,{...o,mode:i});process.exit(m)}),r.command("lint [...globs]","[DEPRECATION] Use `pickier [...globs]` instead. Lint files").option("--fix","Auto-fix problems").option("--dry-run","Simulate fixes without writing").option("--max-warnings <n>","Max warnings before non-zero exit",{default:-1}).option("--reporter <name>","stylish|json|compact",{default:"stylish"}).option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache").option("--verbose","Verbose output").example("pickier lint .").example("pickier lint src --fix").example('pickier lint "src/**/*.{ts,tsx}" --reporter json').action(async(...t)=>{let[e,o]=f(t),{runUnified:s}=await import("../chunk-wh52kdr1.js"),i=await s(e,{...o,mode:"lint"});process.exit(i)}),r.command("format [...globs]","[DEPRECATION] Use `pickier [...globs] --format` instead. Format files").option("--write","Write changes to files").option("--check","Check without writing (CI-friendly)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file").option("--ext <exts>","Comma-separated extensions").option("--verbose","Verbose output").example("pickier format . --write").example("pickier format . --check").action(async(...t)=>{let[e,o]=f(t),{runUnified:s}=await import("../chunk-wh52kdr1.js"),i=await s(e,{...o,mode:"format"});process.exit(i)}),r.command("run [...globs]","Unified mode (auto, lint, or format)").option("--mode <mode>","auto|lint|format",{default:"auto"}).option("--fix","Auto-fix problems (lint mode)").option("--dry-run","Simulate fixes without writing (lint mode)").option("--max-warnings <n>","Max warnings before non-zero exit (lint mode)",{default:-1}).option("--reporter <name>","stylish|json|compact (lint mode)",{default:"stylish"}).option("--write","Write changes to files (format mode)").option("--check","Check without writing (format mode)").option("--config <path>","Path to pickier config").option("--ignore-path <file>","Ignore file (like .gitignore)").option("--ext <exts>","Comma-separated extensions").option("--cache","Enable cache (lint mode)").option("--verbose","Verbose output").example("pickier run . --mode lint --fix").example("pickier run . --mode format --write").action(async(...t)=>{let[e,o]=f(t),{runUnified:s}=await import("../chunk-wh52kdr1.js"),i=await s(e,o);process.exit(i)}),r.command("version","Show the version of the CLI").action(async()=>{let{version:t}=await import("../chunk-qh9cawym.js");process.stdout.write(`${t}
4
4
  `)}),r.version(y),r.help(),r.parse()}v().catch((n)=>{let p=n instanceof Error?n.message:String(n);process.stderr.write(`pickier: ${p}
5
5
  `),process.exit(1)});
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{b as a,c as b,d as c,e as d,f as e,g as f}from"./chunk-dsmbhdmt.js";import"./chunk-vdbbvx8x.js";import"./chunk-gy6wyx8t.js";import"./chunk-awmb5sg5.js";export{c as applyPlugins,a as lintText,f as runLint,b as runLintProgrammatic,e as scanContent,d as scanContentOptimized};
2
+ import{b as a,c as b,d as c,e as d,f as e,g as f}from"./chunk-tskywgx9.js";import"./chunk-vdbbvx8x.js";import"./chunk-gy6wyx8t.js";import"./chunk-awmb5sg5.js";export{c as applyPlugins,a as lintText,f as runLint,b as runLintProgrammatic,e as scanContent,d as scanContentOptimized};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import"./chunk-awmb5sg5.js";var e="pickier",u="module",t="0.1.64",r="Format, lint and more in a fraction of seconds.",s="Chris Breuer <chris@stacksjs.org>",l="MIT",p="https://github.com/pickier/pickier#readme",b={type:"git",url:"git+https://github.com/pickier/pickier.git"},c={url:"https://github.com/pickier/pickier/issues"},m=["pickier","linter","formatter","bun","fast"],o={".":{types:"./dist/src/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},a="./dist/src/index.js",x="./dist/src/index.d.ts",d={pickier:"./dist/bin/cli.js"},w=["README.md","dist"],k={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile",compile:"bun build ./bin/cli.ts --compile --minify --outfile bin/pickier","compile:all":"bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64","compile:linux-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64","compile:linux-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64","compile:linux-x64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl","compile:linux-arm64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl","compile:windows-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe","compile:windows-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe","compile:darwin-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64","compile:darwin-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",zip:"bun run zip:all","zip:all":"bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64","zip:linux-x64":"zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64","zip:linux-arm64":"zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64","zip:linux-x64-musl":"zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl","zip:linux-arm64-musl":"zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl","zip:windows-x64":"zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe","zip:windows-arm64":"zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe","zip:darwin-x64":"zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64","zip:darwin-arm64":"zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",prepublishOnly:"bun --bun run build && bun run compile:all && bun run zip",test:"PICKIER_NO_AUTO_CONFIG=1 bun test --coverage","test:core":"PICKIER_NO_AUTO_CONFIG=1 bun test test/core","test:format":"PICKIER_NO_AUTO_CONFIG=1 bun test test/format","test:lint":"PICKIER_NO_AUTO_CONFIG=1 bun test test/lint","test:rules":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules","test:rules:sort":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/sort","test:rules:style":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/style","test:rules:quality":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/quality","test:rules:imports":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/imports","test:rules:typescript":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/typescript","test:rules:regexp":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/regexp","test:plugin":"PICKIER_NO_AUTO_CONFIG=1 bun test test/plugin","test:watch":"PICKIER_NO_AUTO_CONFIG=1 bun test --watch"},I={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},O={"@stacksjs/ts-spell-check":"^0.1.0"},_={bunfig:"^0.15.13"},z={name:e,type:u,version:t,description:r,author:s,license:l,homepage:p,repository:b,bugs:c,keywords:m,exports:o,module:a,types:x,bin:d,files:w,scripts:k,dependencies:I,optionalDependencies:O,devDependencies:_};export{s as author,d as bin,c as bugs,z as default,I as dependencies,r as description,_ as devDependencies,o as exports,w as files,p as homepage,m as keywords,l as license,a as module,e as name,O as optionalDependencies,b as repository,k as scripts,u as type,x as types,t as version};
2
+ import"./chunk-awmb5sg5.js";var e="pickier",u="module",t="0.1.65",r="Format, lint and more in a fraction of seconds.",s="Chris Breuer <chris@stacksjs.org>",l="MIT",p="https://github.com/pickier/pickier#readme",b={type:"git",url:"git+https://github.com/pickier/pickier.git"},c={url:"https://github.com/pickier/pickier/issues"},m=["pickier","linter","formatter","bun","fast"],o={".":{types:"./dist/src/index.d.ts",import:"./dist/src/index.js"},"./*":{import:"./dist/*"}},a="./dist/src/index.js",x="./dist/src/index.d.ts",d={pickier:"./dist/bin/cli.js"},w=["README.md","dist"],k={build:"bun --bun build.ts","build:bin":"bun --bun build.ts && bun run compile",compile:"bun build ./bin/cli.ts --compile --minify --outfile bin/pickier","compile:all":"bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:linux-x64-musl && bun run compile:linux-arm64-musl && bun run compile:windows-x64 && bun run compile:windows-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64","compile:linux-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/pickier-linux-x64","compile:linux-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/pickier-linux-arm64","compile:linux-x64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64-musl --outfile bin/pickier-linux-x64-musl","compile:linux-arm64-musl":"bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64-musl --outfile bin/pickier-linux-arm64-musl","compile:windows-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/pickier-windows-x64.exe","compile:windows-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-windows-arm64 --outfile bin/pickier-windows-arm64.exe","compile:darwin-x64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/pickier-darwin-x64","compile:darwin-arm64":"bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/pickier-darwin-arm64",zip:"bun run zip:all","zip:all":"bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:linux-x64-musl && bun run zip:linux-arm64-musl && bun run zip:windows-x64 && bun run zip:windows-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64","zip:linux-x64":"zip -j bin/pickier-linux-x64.zip bin/pickier-linux-x64","zip:linux-arm64":"zip -j bin/pickier-linux-arm64.zip bin/pickier-linux-arm64","zip:linux-x64-musl":"zip -j bin/pickier-linux-x64-musl.zip bin/pickier-linux-x64-musl","zip:linux-arm64-musl":"zip -j bin/pickier-linux-arm64-musl.zip bin/pickier-linux-arm64-musl","zip:windows-x64":"zip -j bin/pickier-windows-x64.zip bin/pickier-windows-x64.exe","zip:windows-arm64":"zip -j bin/pickier-windows-arm64.zip bin/pickier-windows-arm64.exe","zip:darwin-x64":"zip -j bin/pickier-darwin-x64.zip bin/pickier-darwin-x64","zip:darwin-arm64":"zip -j bin/pickier-darwin-arm64.zip bin/pickier-darwin-arm64",prepublishOnly:"bun --bun run build && bun run compile:all && bun run zip",test:"PICKIER_NO_AUTO_CONFIG=1 bun test --coverage","test:core":"PICKIER_NO_AUTO_CONFIG=1 bun test test/core","test:format":"PICKIER_NO_AUTO_CONFIG=1 bun test test/format","test:lint":"PICKIER_NO_AUTO_CONFIG=1 bun test test/lint","test:rules":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules","test:rules:sort":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/sort","test:rules:style":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/style","test:rules:quality":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/quality","test:rules:imports":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/imports","test:rules:typescript":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/typescript","test:rules:regexp":"PICKIER_NO_AUTO_CONFIG=1 bun test test/rules/regexp","test:plugin":"PICKIER_NO_AUTO_CONFIG=1 bun test test/plugin","test:watch":"PICKIER_NO_AUTO_CONFIG=1 bun test --watch"},I={"@stacksjs/clarity":"^0.3.24","@stacksjs/clapp":"^0.2.3"},O={"@stacksjs/ts-spell-check":"^0.1.0"},_={bunfig:"^0.15.13"},z={name:e,type:u,version:t,description:r,author:s,license:l,homepage:p,repository:b,bugs:c,keywords:m,exports:o,module:a,types:x,bin:d,files:w,scripts:k,dependencies:I,optionalDependencies:O,devDependencies:_};export{s as author,d as bin,c as bugs,z as default,I as dependencies,r as description,_ as devDependencies,o as exports,w as files,p as homepage,m as keywords,l as license,a as module,e as name,O as optionalDependencies,b as repository,k as scripts,u as type,x as types,t as version};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{H as u,k as m}from"./chunk-vdbbvx8x.js";import{Q as y}from"./chunk-awmb5sg5.js";import{readFileSync as O,statSync as p,writeFileSync as x}from"fs";import{isAbsolute as d,resolve as l}from"path";async function R(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(p(i).isFile()){let o=await u(t.config),c=O(i,"utf8"),f=m(c,o,i);if(t.check&&f!==c)return 1;if(t.write&&f!==c)x(i,f,"utf8");return 0}}catch{}let{runLint:e}=await import("./chunk-yx80g50v.js");if(a==="lint")return e(r,t);if(a==="format"){let n={...t,fix:!0,dryRun:!!t.check,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)}
2
+ import{H as u,k as m}from"./chunk-vdbbvx8x.js";import{Q as y}from"./chunk-awmb5sg5.js";import{readFileSync as O,statSync as p,writeFileSync as x}from"fs";import{isAbsolute as d,resolve as l}from"path";async function R(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(p(i).isFile()){let o=await u(t.config),c=O(i,"utf8"),f=m(c,o,i);if(t.check&&f!==c)return 1;if(t.write&&f!==c)x(i,f,"utf8");return 0}}catch{}let{runLint:e}=await import("./chunk-bnbsk67m.js");if(a==="lint")return e(r,t);if(a==="format"){let n={...t,fix:!0,dryRun:!!t.check,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{R as h};
@@ -126,7 +126,7 @@ ${r}`}:void 0}}var aa={name:"markdown",rules:{"heading-increment":q(xl),"heading
126
126
  `),l=t.slice(s).join(`
127
127
  `),a=`${o}
128
128
  ${l}`;if(_i(a)!==a)return[{filePath:n.filePath,line:i+1,column:1,ruleId:"sort-imports",message:"Imports are not sorted/grouped consistently",severity:"warning"}];return[]},fix:(e)=>_i(e)};var ma={name:"perfectionist",rules:{"sort-imports":b(Os)}};import{dirname as Dd,resolve as Fd}from"path";function Q(e){try{let n=JSON.parse(e);if(typeof n!=="object"||n===null||Array.isArray(n))return null;return n}catch{return null}}function Nd(e,n){let t=e.split(`
129
- `),s=1,i=0;for(let r of n){let o=new RegExp(`"${Ud(r)}"\\s*:`);for(let l=i;l<t.length;l++)if(o.test(t[l])){s=l+1,i=l+1;break}}return s}function je(e){return Dd(e)}function Te(e,n){return Fd(e,n)}function ne(e){let n="pkg";for(let t of e)if(/^\d+$/.test(t))n+=`[${t}]`;else if(!/^[a-z_$][a-z0-9_$]*$/i.test(t))n+=`["${t}"]`;else n+=`.${t}`;return n}function X(e,n){if(e.publishConfig?.[n]!==void 0)return[e.publishConfig[n],["publishConfig",n]];return[e[n],[n]]}var Wd=new RegExp(`(?:[\\s;]|^)(?:import[\\w,{}\\s*]*from|import\\s*['"*{]|export\\b\\s*(?:[*{]|default|type|function|const|var|let|async function)|import\\.meta\\b)`,"m"),Bd=new RegExp("(?:[\\s;]|^)(?:module.exports\\b|exports\\.\\w|require\\s*\\(|global\\.\\w|Object\\.(?:defineProperty|defineProperties|assign)\\s*\\(\\s*exports\\b)","m");function lt(e){let n=jd(e),t=Wd.test(n),s=Bd.test(n);if(t&&s)return"mixed";if(t)return"ESM";if(s)return"CJS";return"unknown"}function ha(e,n){if(e.endsWith(".mjs"))return"ESM";if(e.endsWith(".cjs"))return"CJS";return n==="module"?"ESM":"CJS"}function da(e){if(e==="ESM")return".mjs";if(e==="CJS")return".cjs";return".js"}function pa(e){return e===".mjs"||e===".cjs"}function Ge(e){return e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")}function ga(e){return/^#!\s*\//.test(e)}function jd(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*/g,"")}function me(e,n,t,s){Di(e,n,t,s)}function Di(e,n,t,s){if(typeof e==="string"){s(e,{path:n,isImports:t});return}if(Array.isArray(e)){s(e,{path:n,isImports:t});for(let i=0;i<e.length;i++)Di(e[i],n.concat(String(i)),t,s);return}if(e!==null&&typeof e==="object"){let i=Object.keys(e);s(e,{path:n,isImports:t},i);for(let r of i)Di(e[r],n.concat(r),t,s)}}function G(e,n,t,s,i,r,o){return{filePath:e,line:Nd(n,t),column:1,ruleId:s,message:i,severity:r,...o&&{help:o}}}function Ud(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Fi={meta:{docs:"Disallow deprecated jsnext:main and jsnext fields",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[];if(t["jsnext:main"]!=null)s.push(G(n.filePath,e,["jsnext:main"],"publint/deprecated-field-jsnext",'pkg["jsnext:main"] is deprecated. pkg.module should be used instead.',"warning",'The jsnext:main field is no longer recognized by modern bundlers. Use "module" instead.'));if(t.jsnext!=null)s.push(G(n.filePath,e,["jsnext"],"publint/deprecated-field-jsnext","pkg.jsnext is deprecated. pkg.module should be used instead.","warning",'The jsnext field is no longer recognized by modern bundlers. Use "module" instead.'));return s}};var Ni={meta:{docs:'Ensure "default" condition is last in exports objects',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("default"in o))return;if(a[a.length-1]!=="default")s.push(G(n.filePath,e,l.path.concat("default"),"publint/exports-default-should-be-last",`${ne(l.path.concat("default"))} should be the last condition in the object so it doesn't take precedence over the keys following it.`,"error",'Conditions are resolved in order. "default" acts as a fallback and should come last.'))}),s}};var Wi={meta:{docs:"Warn against using fallback arrays in exports",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l)=>{if(!Array.isArray(o))return;s.push(G(n.filePath,e,l.path,"publint/exports-fallback-array-use",`${ne(l.path)} uses fallback arrays which is not recommended. It works differently in some tools and may face inconsistent behaviors.`,"warning","Fallback arrays pick the first parseable value and have no practical use case in Node.js currently."))}),s}};var Bi={meta:{docs:"Ensure exports has a root entrypoint when main/module exist",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let[s]=X(t,"main"),[i]=X(t,"module"),[r,o]=X(t,"exports");if(s==null&&i==null||r==null)return[];if(typeof r!=="object"||Array.isArray(r))return[];let l=Object.keys(r);if(l.length===0)return[];if(!l[0]?.startsWith("."))return[];if(l.includes("."))return[];let c=[];if(s)c.push("main");if(i)c.push("module");return[G(n.filePath,e,o,"publint/exports-missing-root-entrypoint",`${ne(o)} is missing the root entrypoint export, which is defined in pkg.${c[0]}. Environments that support "exports" will ignore pkg.${c[0]} as "exports" takes the highest priority.`,"warning",`Add ${ne(o.concat("."))} to ensure the root entrypoint is accessible.`)]}};var ji={meta:{docs:'Ensure "module" condition precedes "require" in exports',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("module"in o)||!("require"in o))return;if(a.indexOf("module")>a.indexOf("require"))s.push(G(n.filePath,e,l.path.concat("module"),"publint/exports-module-should-precede-require",`${ne(l.path.concat("module"))} should come before the "require" condition so it can take precedence when used by a bundler.`,"error",'Bundlers prioritize conditions by order. "module" should precede "require" to ensure ESM is preferred.'))}),s}};var Ui={meta:{docs:'Ensure "types" condition is first in exports objects',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("types"in o))return;let c=a.indexOf("types");if(c===0)return;if(a.slice(0,c).filter((f)=>{if(f.startsWith("types"))return!1;if(typeof o[f]==="object"&&o[f]!==null&&ya(o[f],"types"))return!1;return!0}).length>0)s.push(G(n.filePath,e,l.path.concat("types"),"publint/exports-types-should-be-first",`${ne(l.path.concat("types"))} should be the first condition in the object so it can be resolved by TypeScript.`,"error",'TypeScript resolves conditions in order. The "types" condition must come first to ensure correct type resolution.'))}),s}};function ya(e,n){for(let t in e){if(t===n)return!0;if(typeof e[t]==="object"&&e[t]!==null&&ya(e[t],n))return!0}return!1}var zi={meta:{docs:'Ensure exports values start with "./"',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l)=>{if(typeof o!=="string")return;if(o.startsWith("./"))return;let a=`./${o.replace(/^[/]+/,"")}`;s.push(G(n.filePath,e,l.path,"publint/exports-value-invalid",`${ne(l.path)} is "${o}" which is invalid as it does not start with "./". Use "${a}" instead.`,"error",'All exports values must be relative paths starting with "./".'))}),s}};var zd=[{field:"main",expectTypes:["string"]},{field:"module",expectTypes:["string"]},{field:"types",expectTypes:["string"]},{field:"typings",expectTypes:["string"]},{field:"browser",expectTypes:["string","object"]},{field:"bin",expectTypes:["string","object"]},{field:"exports",expectTypes:["string","object"]},{field:"imports",expectTypes:["object"]},{field:"name",expectTypes:["string"]},{field:"version",expectTypes:["string"]},{field:"description",expectTypes:["string"]},{field:"license",expectTypes:["string"]}],qi={meta:{docs:"Ensure package.json fields have correct value types",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[];for(let{field:i,expectTypes:r}of zd){let[o,l]=X(t,i);if(o==null)continue;let a=typeof o;if(!r.includes(a)){let c=r.length===1?r[0]:`${r.slice(0,-1).join(", ")} or ${r[r.length-1]}`;s.push(G(n.filePath,e,l,"publint/field-invalid-value-type",`${ne(l)} has an invalid ${a} type. Expected a ${c} type instead.`,"error",`The "${i}" field must be of type ${c}.`))}}return s}};var Ki={meta:{docs:"Suggest adding exports when module field is present",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let[s,i]=X(t,"module"),[r]=X(t,"exports");if(s!=null&&r==null)return[G(n.filePath,e,i,"publint/has-module-but-no-exports","pkg.module is used to output ESM, but pkg.exports is not defined. As Node.js doesn't read pkg.module, the ESM output may be skipped. Consider adding pkg.exports to export the ESM output.","warning",'Node.js only reads "exports" for module resolution. Without it, the ESM entry point in "module" is ignored by Node.js.')];return[]}};var Vi={meta:{docs:'Ensure "default" condition is last in imports objects',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object")return[];return me(i,r,!0,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("default"in o))return;if(a[a.length-1]!=="default")s.push(G(n.filePath,e,l.path.concat("default"),"publint/imports-default-should-be-last",`${ne(l.path.concat("default"))} should be the last condition in the object so it doesn't take precedence over the keys following it.`,"error",'Conditions are resolved in order. "default" acts as a fallback and should come last.'))}),s}};var Hi={meta:{docs:'Ensure imports keys start with "#"',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object"||Array.isArray(i))return[];for(let o of Object.keys(i))if(!o.startsWith("#")){let l=`#${o.replace(/^[/]+/,"")}`,a=r.concat(o);s.push(G(n.filePath,e,a,"publint/imports-key-invalid",`${ne(a)} is invalid as the imports key does not start with "#". Use "${l}" instead.`,"error",'All imports keys must start with "#" to distinguish them from package specifiers.'))}return s}};var Zi={meta:{docs:'Ensure "module" condition precedes "require" in imports',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object")return[];return me(i,r,!0,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("module"in o)||!("require"in o))return;if(a.indexOf("module")>a.indexOf("require"))s.push(G(n.filePath,e,l.path.concat("module"),"publint/imports-module-should-precede-require",`${ne(l.path.concat("module"))} should come before the "require" condition so it can take precedence when used by a bundler.`,"error",'Bundlers prioritize conditions by order. "module" should precede "require" to ensure ESM is preferred.'))}),s}};var Gi={meta:{docs:'Ensure imports values start with "./"',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object")return[];return me(i,r,!0,(o,l)=>{if(typeof o!=="string")return;if(!o.startsWith("."))return;if(o.startsWith("./"))return;let a=`./${o.replace(/^[/]+/,"")}`;s.push(G(n.filePath,e,l.path,"publint/imports-value-invalid",`${ne(l.path)} is "${o}" which is invalid as it does not start with "./". Use "${a}" instead.`,"error",'Relative imports values must start with "./".'))}),s}};var Ji={meta:{docs:"Disallow local file references in dependencies",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=["dependencies","optionalDependencies","peerDependencies"];for(let r of i){let o=t[r];if(!o||typeof o!=="object")continue;for(let l of Object.keys(o)){let a=o[l];if(typeof a==="string"&&(a.startsWith("file:")||a.startsWith("link:")))s.push(G(n.filePath,e,[r,l],"publint/local-dependency",`The "${l}" dependency references "${a}" that will likely not work when installed by end-users.`,"error","Local file references (file: or link:) are not portable and will fail for consumers of the package."))}}return s}};var Yi={meta:{docs:'Suggest specifying the "type" field in package.json',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];if(t.type==null)return[G(n.filePath,e,["name"],"publint/use-type",'The package does not specify the "type" field. Node.js may attempt to detect the package type causing a small performance hit. Consider adding "type": "commonjs" or "type": "module".',"warning",'Adding "type" helps Node.js resolve module format without detection overhead.')];return[]}};import{existsSync as qd,readFileSync as Kd}from"fs";var Xi={meta:{docs:"Ensure bin files have a shebang for executability",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),[r,o]=X(t,"bin");if(r==null)return[];if(typeof r==="string")ba(r,o,i,s,n.filePath,e);else if(typeof r==="object"){for(let l of Object.keys(r))if(typeof r[l]==="string")ba(r[l],o.concat(l),i,s,n.filePath,e)}return s}};function ba(e,n,t,s,i,r){let o=Te(t,e);if(!qd(o))return;if(!Ge(e))return;let l;try{l=Kd(o,"utf8")}catch{return}if(!ga(l))s.push(G(i,r,n,"publint/bin-file-not-executable",`${ne(n)} is "${e}" but the file is not executable. It should start with a shebang, e.g. #!/usr/bin/env node.`,"error","Bin files must start with a shebang (e.g. #!/usr/bin/env node) to be executable."))}import{existsSync as xa,readFileSync as wa}from"fs";var Qi={meta:{docs:'Ensure files under "module" condition in exports are ESM',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),[r,o]=X(t,"exports");if(r==null)return[];me(r,o,!1,(c,u)=>{if(typeof c!=="string")return;if(!u.path.includes("module"))return;if(!c.startsWith("./")&&!c.startsWith("../"))return;if(c.includes("*"))return;let f=Te(i,c);if(!xa(f))return;if(!Ge(c))return;let m;try{m=wa(f,"utf8")}catch{return}if(lt(m)==="CJS")s.push(G(n.filePath,e,u.path,"publint/exports-module-should-be-esm",`${ne(u.path)} should be ESM, but the code is written in CJS.`,"error",'The "module" condition is only used by bundlers and must contain ESM code.'))});let[l,a]=X(t,"imports");if(l!=null&&typeof l==="object")me(l,a,!0,(c,u)=>{if(typeof c!=="string")return;if(!u.path.includes("module"))return;if(!c.startsWith("./"))return;if(c.includes("*"))return;let f=Te(i,c);if(!xa(f))return;if(!Ge(c))return;let m;try{m=wa(f,"utf8")}catch{return}if(lt(m)==="CJS")s.push(G(n.filePath,e,u.path,"publint/exports-module-should-be-esm",`${ne(u.path)} should be ESM, but the code is written in CJS.`,"error",'The "module" condition is only used by bundlers and must contain ESM code.'))});return s}};import{existsSync as jt}from"fs";import{dirname as Vd,isAbsolute as Hd,resolve as Zd}from"path";function er(e,n){let t=n;while(t.startsWith("./"))t=t.slice(2);let s=t.split("/")[0];if(!s||s===".."||s.startsWith("."))return!1;let i=Hd(n)?Vd(n).split("/")[0]||"/":Zd(e,s);return!jt(i)}var tr={meta:{docs:"Ensure files referenced in package.json exist",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),r=["main","module","types","typings","unpkg","jsdelivr"];for(let u of r){let[f,m]=X(t,u);if(f==null||typeof f!=="string")continue;if(er(i,f))continue;let h=Te(i,f);if(!ka(h))s.push(G(n.filePath,e,m,"publint/file-does-not-exist",`${ne(m)} is "${f}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))}let[o,l]=X(t,"bin");if(o!=null){if(typeof o==="string")Ra(o,l,s,n.filePath,e,i);else if(typeof o==="object"){for(let u of Object.keys(o))if(typeof o[u]==="string")Ra(o[u],l.concat(u),s,n.filePath,e,i)}}let[a,c]=X(t,"exports");if(a!=null)me(a,c,!1,(u,f)=>{if(typeof u!=="string")return;if(!u.startsWith("./")&&!u.startsWith("../"))return;if(u.includes("*"))return;if(er(i,u))return;let m=Te(i,u);if(!jt(m))s.push(G(n.filePath,e,f.path,"publint/file-does-not-exist",`${ne(f.path)} is "${u}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))});return s}};function Ra(e,n,t,s,i,r){if(er(r,e))return;let o=Te(r,e);if(!ka(o))t.push(G(s,i,n,"publint/file-does-not-exist",`${ne(n)} is "${e}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))}function ka(e){if(jt(e))return!0;if(jt(`${e}.js`))return!0;if(jt(`${e}/index.js`))return!0;return!1}import{existsSync as Gd,readFileSync as Jd}from"fs";import{extname as Yd}from"path";var nr={meta:{docs:"Ensure file code format matches its extension and package type",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),r=t.type,[o,l]=X(t,"main");if(o!=null&&typeof o==="string")$a(o,l,i,r,s,n.filePath,e);let[a,c]=X(t,"exports");if(a!=null)me(a,c,!1,(u,f)=>{if(typeof u!=="string")return;if(!u.startsWith("./")&&!u.startsWith("../"))return;if(u.includes("*"))return;if(f.path.includes("browser"))return;$a(u,f.path,i,r,s,n.filePath,e)});return s}};function $a(e,n,t,s,i,r,o){let l=Te(t,e);if(!Gd(l))return;if(!Ge(e))return;let a;try{a=Jd(l,"utf8")}catch{return}let c=lt(a);if(c==="unknown"||c==="mixed")return;let u=ha(l,s);if(c===u)return;let f=Yd(l),m=da(c),d=(pa(f)?"FILE_INVALID_EXPLICIT_FORMAT":"FILE_INVALID_FORMAT")==="FILE_INVALID_EXPLICIT_FORMAT"?`${ne(n)} is "${e}" and ends with the ${f} extension, but the code is written in ${c}. Consider using the ${m} extension.`:`${ne(n)} is "${e}" and is written in ${c}, but is interpreted as ${u}. Consider using the ${m} extension.`;i.push(G(r,o,n,"publint/file-invalid-format",d,"warning",`The file's code format (${c}) doesn't match the expected format (${u}) based on its extension and package type.`))}import{existsSync as Xd,readFileSync as Qd}from"fs";var sr={meta:{docs:'Ensure the "module" field points to an ESM file',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let[s,i]=X(t,"module");if(s==null||typeof s!=="string")return[];let r=je(n.filePath),o=Te(r,s);if(!Xd(o))return[];if(!Ge(s))return[];let l;try{l=Qd(o,"utf8")}catch{return[]}if(lt(l)==="CJS")return[G(n.filePath,e,i,"publint/module-should-be-esm",`${ne(i)} should be ESM, but the code is written in CJS.`,"error",'The "module" field is intended for ESM output used by bundlers. It should point to an ESM file.')];return[]}};var Pa={name:"publint",rules:{"use-type":ge(Yi),"local-dependency":ge(Ji),"deprecated-field-jsnext":ge(Fi),"has-module-but-no-exports":ge(Ki),"field-invalid-value-type":ge(qi),"exports-types-should-be-first":ge(Ui),"exports-default-should-be-last":ge(Ni),"exports-module-should-precede-require":ge(ji),"exports-value-invalid":ge(zi),"exports-missing-root-entrypoint":ge(Bi),"exports-fallback-array-use":ge(Wi),"imports-key-invalid":ge(Hi),"imports-value-invalid":ge(Gi),"imports-default-should-be-last":ge(Vi),"imports-module-should-precede-require":ge(Zi),"file-does-not-exist":ge(tr),"file-invalid-format":ge(nr),"module-should-be-esm":ge(sr),"bin-file-not-executable":ge(Xi),"exports-module-should-be-esm":ge(Qi)}};var va={meta:{docs:"Ensure all imports appear before other statements",recommended:!1},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=!1,r=0;for(let o=0;o<s.length;o++){let l=s[o].trim();if(!l||l.startsWith("//")||l.startsWith("/*")||l.startsWith("*"))continue;let a=l.match(/^\s*import\s+/);if(!a&&l.length>0){if(i=!0,r===0)r=o+1}if(i&&a)t.push({filePath:n.filePath,line:o+1,column:1,ruleId:"import/first",message:"Import statement must appear before other statements",severity:"error"})}return t}};var Ia={meta:{docs:"Disallow duplicate specifier names in a single import declaration"},check:(e,n)=>{let t=[],s=e.split(/\r?\n/);for(let i=0;i<s.length;i++){let r=s[i],o=r.match(/^\s*import\s*\{([^}]*)\}\s*from\s*['"][^'"]+['"]/);if(!o)continue;let a=o[1].split(",").map((u)=>u.trim()).filter(Boolean).map((u)=>u.split(/\s+as\s+/i)[0].trim()),c=new Set;for(let u of a){if(c.has(u)){t.push({filePath:n.filePath,line:i+1,column:Math.max(1,r.indexOf(u)+1),ruleId:"pickier/import-dedupe",message:"Expect no duplication in imports",severity:"warning"});break}c.add(u)}}return t}};function Ma(e){let n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?<![\\w$])${n}(?![\\w$])`)}function ep(e,n,t){let s=[],i=/^\s*import\s+type\b/.test(e),r=e.replace(/^\s*import\s+/,"").replace(/\s+from\s+['"][^'"]+['"].*$/s,"");if(/^['"]/.test(r))return s;let o=(c,u)=>{let f=c.trim();if(!f||f==="type")return;if(!/^[A-Z_$][\w$]*$/i.test(f))return;for(let m=n;m<t.length;m++){let h=t[m].search(Ma(f));if(h!==-1){s.push({name:f,line:m+1,column:h,typeOnly:u});return}if(/\bfrom\b/.test(t[m]))break}s.push({name:f,line:n+1,column:0,typeOnly:u})},l=r.match(/\{([\s\S]*)\}/);if(l)for(let c of l[1].split(",")){let u=c.trim();if(!u)continue;let f=/^type\s+/.test(u),h=u.replace(/^type\s+/,"").split(/\s+as\s+/);o(h[h.length-1],i||f)}let a=l?r.slice(0,r.indexOf("{")):r;for(let c of a.split(",")){let u=c.trim().replace(/^type\s+/,"");if(!u)continue;let f=u.match(/^\*\s+as\s+(\w+)$/);o(f?f[1]:u,i)}return s}var Ca={meta:{docs:"Disallow imports that nothing in the file uses"},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=[],r=new Set;for(let a=0;a<s.length;a++){if(!/^\s*import\s*(?![(.])/.test(s[a]))continue;let c=s[a],u=a,f=Math.min(s.length-1,a+40);while(u<f&&!/\bfrom\s*['"][^'"]*['"]/.test(c)&&!/^\s*import\s*['"]/.test(c))u++,c+=`
129
+ `),s=1,i=0;for(let r of n){let o=new RegExp(`"${Ud(r)}"\\s*:`);for(let l=i;l<t.length;l++)if(o.test(t[l])){s=l+1,i=l+1;break}}return s}function je(e){return Dd(e)}function Te(e,n){return Fd(e,n)}function ne(e){let n="pkg";for(let t of e)if(/^\d+$/.test(t))n+=`[${t}]`;else if(!/^[a-z_$][a-z0-9_$]*$/i.test(t))n+=`["${t}"]`;else n+=`.${t}`;return n}function X(e,n){if(e.publishConfig?.[n]!==void 0)return[e.publishConfig[n],["publishConfig",n]];return[e[n],[n]]}var Wd=new RegExp(`(?:[\\s;]|^)(?:import[\\w,{}\\s*]*from|import\\s*['"*{]|export\\b\\s*(?:[*{]|default|type|function|const|var|let|async function)|import\\.meta\\b)`,"m"),Bd=new RegExp("(?:[\\s;]|^)(?:module.exports\\b|exports\\.\\w|require\\s*\\(|global\\.\\w|Object\\.(?:defineProperty|defineProperties|assign)\\s*\\(\\s*exports\\b)","m");function lt(e){let n=jd(e),t=Wd.test(n),s=Bd.test(n);if(t&&s)return"mixed";if(t)return"ESM";if(s)return"CJS";return"unknown"}function ha(e,n){if(e.endsWith(".mjs"))return"ESM";if(e.endsWith(".cjs"))return"CJS";return n==="module"?"ESM":"CJS"}function da(e){if(e==="ESM")return".mjs";if(e==="CJS")return".cjs";return".js"}function pa(e){return e===".mjs"||e===".cjs"}function Ge(e){return e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")}function ga(e){return/^#!\s*\//.test(e)}function jd(e){return e.replace(/\/\*[\s\S]*?\*\//g,"").replace(/\/\/.*/g,"")}function me(e,n,t,s){Di(e,n,t,s)}function Di(e,n,t,s){if(typeof e==="string"){s(e,{path:n,isImports:t});return}if(Array.isArray(e)){s(e,{path:n,isImports:t});for(let i=0;i<e.length;i++)Di(e[i],n.concat(String(i)),t,s);return}if(e!==null&&typeof e==="object"){let i=Object.keys(e);s(e,{path:n,isImports:t},i);for(let r of i)Di(e[r],n.concat(r),t,s)}}function G(e,n,t,s,i,r,o){return{filePath:e,line:Nd(n,t),column:1,ruleId:s,message:i,severity:r,...o&&{help:o}}}function Ud(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Fi={meta:{docs:"Disallow deprecated jsnext:main and jsnext fields",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[];if(t["jsnext:main"]!=null)s.push(G(n.filePath,e,["jsnext:main"],"publint/deprecated-field-jsnext",'pkg["jsnext:main"] is deprecated. pkg.module should be used instead.',"warning",'The jsnext:main field is no longer recognized by modern bundlers. Use "module" instead.'));if(t.jsnext!=null)s.push(G(n.filePath,e,["jsnext"],"publint/deprecated-field-jsnext","pkg.jsnext is deprecated. pkg.module should be used instead.","warning",'The jsnext field is no longer recognized by modern bundlers. Use "module" instead.'));return s}};var Ni={meta:{docs:'Ensure "default" condition is last in exports objects',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("default"in o))return;if(a[a.length-1]!=="default")s.push(G(n.filePath,e,l.path.concat("default"),"publint/exports-default-should-be-last",`${ne(l.path.concat("default"))} should be the last condition in the object so it doesn't take precedence over the keys following it.`,"error",'Conditions are resolved in order. "default" acts as a fallback and should come last.'))}),s}};var Wi={meta:{docs:"Warn against using fallback arrays in exports",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l)=>{if(!Array.isArray(o))return;s.push(G(n.filePath,e,l.path,"publint/exports-fallback-array-use",`${ne(l.path)} uses fallback arrays which is not recommended. It works differently in some tools and may face inconsistent behaviors.`,"warning","Fallback arrays pick the first parseable value and have no practical use case in Node.js currently."))}),s}};var Bi={meta:{docs:"Ensure exports has a root entrypoint when main/module exist",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let[s]=X(t,"main"),[i]=X(t,"module"),[r,o]=X(t,"exports");if(s==null&&i==null||r==null)return[];if(typeof r!=="object"||Array.isArray(r))return[];let l=Object.keys(r);if(l.length===0)return[];if(!l[0]?.startsWith("."))return[];if(l.includes("."))return[];let c=[];if(s)c.push("main");if(i)c.push("module");return[G(n.filePath,e,o,"publint/exports-missing-root-entrypoint",`${ne(o)} is missing the root entrypoint export, which is defined in pkg.${c[0]}. Environments that support "exports" will ignore pkg.${c[0]} as "exports" takes the highest priority.`,"warning",`Add ${ne(o.concat("."))} to ensure the root entrypoint is accessible.`)]}};var ji={meta:{docs:'Ensure "module" condition precedes "require" in exports',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("module"in o)||!("require"in o))return;if(a.indexOf("module")>a.indexOf("require"))s.push(G(n.filePath,e,l.path.concat("module"),"publint/exports-module-should-precede-require",`${ne(l.path.concat("module"))} should come before the "require" condition so it can take precedence when used by a bundler.`,"error",'Bundlers prioritize conditions by order. "module" should precede "require" to ensure ESM is preferred.'))}),s}};var Ui={meta:{docs:'Ensure "types" condition is first in exports objects',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("types"in o))return;let c=a.indexOf("types");if(c===0)return;if(a.slice(0,c).filter((f)=>{if(f.startsWith("types"))return!1;if(typeof o[f]==="object"&&o[f]!==null&&ya(o[f],"types"))return!1;return!0}).length>0)s.push(G(n.filePath,e,l.path.concat("types"),"publint/exports-types-should-be-first",`${ne(l.path.concat("types"))} should be the first condition in the object so it can be resolved by TypeScript.`,"error",'TypeScript resolves conditions in order. The "types" condition must come first to ensure correct type resolution.'))}),s}};function ya(e,n){for(let t in e){if(t===n)return!0;if(typeof e[t]==="object"&&e[t]!==null&&ya(e[t],n))return!0}return!1}var zi={meta:{docs:'Ensure exports values start with "./"',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"exports");if(i==null)return[];return me(i,r,!1,(o,l)=>{if(typeof o!=="string")return;if(o.startsWith("./"))return;let a=`./${o.replace(/^[/]+/,"")}`;s.push(G(n.filePath,e,l.path,"publint/exports-value-invalid",`${ne(l.path)} is "${o}" which is invalid as it does not start with "./". Use "${a}" instead.`,"error",'All exports values must be relative paths starting with "./".'))}),s}};var zd=[{field:"main",expectTypes:["string"]},{field:"module",expectTypes:["string"]},{field:"types",expectTypes:["string"]},{field:"typings",expectTypes:["string"]},{field:"browser",expectTypes:["string","object"]},{field:"bin",expectTypes:["string","object"]},{field:"exports",expectTypes:["string","object"]},{field:"imports",expectTypes:["object"]},{field:"name",expectTypes:["string"]},{field:"version",expectTypes:["string"]},{field:"description",expectTypes:["string"]},{field:"license",expectTypes:["string"]}],qi={meta:{docs:"Ensure package.json fields have correct value types",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[];for(let{field:i,expectTypes:r}of zd){let[o,l]=X(t,i);if(o==null)continue;let a=typeof o;if(!r.includes(a)){let c=r.length===1?r[0]:`${r.slice(0,-1).join(", ")} or ${r[r.length-1]}`;s.push(G(n.filePath,e,l,"publint/field-invalid-value-type",`${ne(l)} has an invalid ${a} type. Expected a ${c} type instead.`,"error",`The "${i}" field must be of type ${c}.`))}}return s}};var Ki={meta:{docs:"Suggest adding exports when module field is present",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let[s,i]=X(t,"module"),[r]=X(t,"exports");if(s!=null&&r==null)return[G(n.filePath,e,i,"publint/has-module-but-no-exports","pkg.module is used to output ESM, but pkg.exports is not defined. As Node.js doesn't read pkg.module, the ESM output may be skipped. Consider adding pkg.exports to export the ESM output.","warning",'Node.js only reads "exports" for module resolution. Without it, the ESM entry point in "module" is ignored by Node.js.')];return[]}};var Vi={meta:{docs:'Ensure "default" condition is last in imports objects',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object")return[];return me(i,r,!0,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("default"in o))return;if(a[a.length-1]!=="default")s.push(G(n.filePath,e,l.path.concat("default"),"publint/imports-default-should-be-last",`${ne(l.path.concat("default"))} should be the last condition in the object so it doesn't take precedence over the keys following it.`,"error",'Conditions are resolved in order. "default" acts as a fallback and should come last.'))}),s}};var Hi={meta:{docs:'Ensure imports keys start with "#"',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object"||Array.isArray(i))return[];for(let o of Object.keys(i))if(!o.startsWith("#")){let l=`#${o.replace(/^[/]+/,"")}`,a=r.concat(o);s.push(G(n.filePath,e,a,"publint/imports-key-invalid",`${ne(a)} is invalid as the imports key does not start with "#". Use "${l}" instead.`,"error",'All imports keys must start with "#" to distinguish them from package specifiers.'))}return s}};var Zi={meta:{docs:'Ensure "module" condition precedes "require" in imports',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object")return[];return me(i,r,!0,(o,l,a)=>{if(!a||typeof o!=="object"||Array.isArray(o))return;if(!("module"in o)||!("require"in o))return;if(a.indexOf("module")>a.indexOf("require"))s.push(G(n.filePath,e,l.path.concat("module"),"publint/imports-module-should-precede-require",`${ne(l.path.concat("module"))} should come before the "require" condition so it can take precedence when used by a bundler.`,"error",'Bundlers prioritize conditions by order. "module" should precede "require" to ensure ESM is preferred.'))}),s}};var Gi={meta:{docs:'Ensure imports values start with "./"',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],[i,r]=X(t,"imports");if(i==null||typeof i!=="object")return[];return me(i,r,!0,(o,l)=>{if(typeof o!=="string")return;if(!o.startsWith("."))return;if(o.startsWith("./"))return;let a=`./${o.replace(/^[/]+/,"")}`;s.push(G(n.filePath,e,l.path,"publint/imports-value-invalid",`${ne(l.path)} is "${o}" which is invalid as it does not start with "./". Use "${a}" instead.`,"error",'Relative imports values must start with "./".'))}),s}};var Ji={meta:{docs:"Disallow local file references in dependencies",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=["dependencies","optionalDependencies","peerDependencies"];for(let r of i){let o=t[r];if(!o||typeof o!=="object")continue;for(let l of Object.keys(o)){let a=o[l];if(typeof a==="string"&&(a.startsWith("file:")||a.startsWith("link:")))s.push(G(n.filePath,e,[r,l],"publint/local-dependency",`The "${l}" dependency references "${a}" that will likely not work when installed by end-users.`,"error","Local file references (file: or link:) are not portable and will fail for consumers of the package."))}}return s}};var Yi={meta:{docs:'Suggest specifying the "type" field in package.json',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];if(t.type==null)return[G(n.filePath,e,["name"],"publint/use-type",'The package does not specify the "type" field. Node.js may attempt to detect the package type causing a small performance hit. Consider adding "type": "commonjs" or "type": "module".',"warning",'Adding "type" helps Node.js resolve module format without detection overhead.')];return[]}};import{existsSync as qd,readFileSync as Kd}from"fs";var Xi={meta:{docs:"Ensure bin files have a shebang for executability",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),[r,o]=X(t,"bin");if(r==null)return[];if(typeof r==="string")ba(r,o,i,s,n.filePath,e);else if(typeof r==="object"){for(let l of Object.keys(r))if(typeof r[l]==="string")ba(r[l],o.concat(l),i,s,n.filePath,e)}return s}};function ba(e,n,t,s,i,r){let o=Te(t,e);if(!qd(o))return;if(!Ge(e))return;let l;try{l=Kd(o,"utf8")}catch{return}if(!ga(l))s.push(G(i,r,n,"publint/bin-file-not-executable",`${ne(n)} is "${e}" but the file is not executable. It should start with a shebang, e.g. #!/usr/bin/env node.`,"error","Bin files must start with a shebang (e.g. #!/usr/bin/env node) to be executable."))}import{existsSync as xa,readFileSync as wa}from"fs";var Qi={meta:{docs:'Ensure files under "module" condition in exports are ESM',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),[r,o]=X(t,"exports");if(r==null)return[];me(r,o,!1,(c,u)=>{if(typeof c!=="string")return;if(!u.path.includes("module"))return;if(!c.startsWith("./")&&!c.startsWith("../"))return;if(c.includes("*"))return;let f=Te(i,c);if(!xa(f))return;if(!Ge(c))return;let m;try{m=wa(f,"utf8")}catch{return}if(lt(m)==="CJS")s.push(G(n.filePath,e,u.path,"publint/exports-module-should-be-esm",`${ne(u.path)} should be ESM, but the code is written in CJS.`,"error",'The "module" condition is only used by bundlers and must contain ESM code.'))});let[l,a]=X(t,"imports");if(l!=null&&typeof l==="object")me(l,a,!0,(c,u)=>{if(typeof c!=="string")return;if(!u.path.includes("module"))return;if(!c.startsWith("./"))return;if(c.includes("*"))return;let f=Te(i,c);if(!xa(f))return;if(!Ge(c))return;let m;try{m=wa(f,"utf8")}catch{return}if(lt(m)==="CJS")s.push(G(n.filePath,e,u.path,"publint/exports-module-should-be-esm",`${ne(u.path)} should be ESM, but the code is written in CJS.`,"error",'The "module" condition is only used by bundlers and must contain ESM code.'))});return s}};import{existsSync as jt}from"fs";import{dirname as Vd,isAbsolute as Hd,resolve as Zd}from"path";function er(e,n){let t=n;while(t.startsWith("./"))t=t.slice(2);let s=t.split("/")[0];if(!s||s===".."||s.startsWith("."))return!1;let i=Hd(n)?Vd(n).split("/")[0]||"/":Zd(e,s);return!jt(i)}var tr={meta:{docs:"Ensure files referenced in package.json exist",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),r=["main","module","types","typings","unpkg","jsdelivr"];for(let u of r){let[f,m]=X(t,u);if(f==null||typeof f!=="string")continue;if(er(i,f))continue;let h=Te(i,f);if(!ka(h))s.push(G(n.filePath,e,m,"publint/file-does-not-exist",`${ne(m)} is "${f}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))}let[o,l]=X(t,"bin");if(o!=null){if(typeof o==="string")Ra(o,l,s,n.filePath,e,i);else if(typeof o==="object"){for(let u of Object.keys(o))if(typeof o[u]==="string")Ra(o[u],l.concat(u),s,n.filePath,e,i)}}let[a,c]=X(t,"exports");if(a!=null)me(a,c,!1,(u,f)=>{if(typeof u!=="string")return;if(!u.startsWith("./")&&!u.startsWith("../"))return;if(u.includes("*"))return;if(er(i,u))return;let m=Te(i,u);if(!jt(m))s.push(G(n.filePath,e,f.path,"publint/file-does-not-exist",`${ne(f.path)} is "${u}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))});return s}};function Ra(e,n,t,s,i,r){if(er(r,e))return;let o=Te(r,e);if(!ka(o))t.push(G(s,i,n,"publint/file-does-not-exist",`${ne(n)} is "${e}" but the file does not exist.`,"error","The referenced file path cannot be found. Check the path for typos."))}function ka(e){if(jt(e))return!0;if(jt(`${e}.js`))return!0;if(jt(`${e}/index.js`))return!0;return!1}import{existsSync as Gd,readFileSync as Jd}from"fs";import{extname as Yd}from"path";var nr={meta:{docs:"Ensure file code format matches its extension and package type",recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let s=[],i=je(n.filePath),r=t.type,[o,l]=X(t,"main");if(o!=null&&typeof o==="string")$a(o,l,i,r,s,n.filePath,e);let[a,c]=X(t,"exports");if(a!=null)me(a,c,!1,(u,f)=>{if(typeof u!=="string")return;if(!u.startsWith("./")&&!u.startsWith("../"))return;if(u.includes("*"))return;if(f.path.includes("browser"))return;$a(u,f.path,i,r,s,n.filePath,e)});return s}};function $a(e,n,t,s,i,r,o){let l=Te(t,e);if(!Gd(l))return;if(!Ge(e))return;let a;try{a=Jd(l,"utf8")}catch{return}let c=lt(a);if(c==="unknown"||c==="mixed")return;let u=ha(l,s);if(c===u)return;let f=Yd(l),m=da(c),d=(pa(f)?"FILE_INVALID_EXPLICIT_FORMAT":"FILE_INVALID_FORMAT")==="FILE_INVALID_EXPLICIT_FORMAT"?`${ne(n)} is "${e}" and ends with the ${f} extension, but the code is written in ${c}. Consider using the ${m} extension.`:`${ne(n)} is "${e}" and is written in ${c}, but is interpreted as ${u}. Consider using the ${m} extension.`;i.push(G(r,o,n,"publint/file-invalid-format",d,"warning",`The file's code format (${c}) doesn't match the expected format (${u}) based on its extension and package type.`))}import{existsSync as Xd,readFileSync as Qd}from"fs";var sr={meta:{docs:'Ensure the "module" field points to an ESM file',recommended:!0},check(e,n){let t=Q(e);if(!t)return[];let[s,i]=X(t,"module");if(s==null||typeof s!=="string")return[];let r=je(n.filePath),o=Te(r,s);if(!Xd(o))return[];if(!Ge(s))return[];let l;try{l=Qd(o,"utf8")}catch{return[]}if(lt(l)==="CJS")return[G(n.filePath,e,i,"publint/module-should-be-esm",`${ne(i)} should be ESM, but the code is written in CJS.`,"error",'The "module" field is intended for ESM output used by bundlers. It should point to an ESM file.')];return[]}};var Pa={name:"publint",rules:{"use-type":ge(Yi),"local-dependency":ge(Ji),"deprecated-field-jsnext":ge(Fi),"has-module-but-no-exports":ge(Ki),"field-invalid-value-type":ge(qi),"exports-types-should-be-first":ge(Ui),"exports-default-should-be-last":ge(Ni),"exports-module-should-precede-require":ge(ji),"exports-value-invalid":ge(zi),"exports-missing-root-entrypoint":ge(Bi),"exports-fallback-array-use":ge(Wi),"imports-key-invalid":ge(Hi),"imports-value-invalid":ge(Gi),"imports-default-should-be-last":ge(Vi),"imports-module-should-precede-require":ge(Zi),"file-does-not-exist":ge(tr),"file-invalid-format":ge(nr),"module-should-be-esm":ge(sr),"bin-file-not-executable":ge(Xi),"exports-module-should-be-esm":ge(Qi)}};var va={meta:{docs:"Ensure all imports appear before other statements",recommended:!1},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=!1,r=0;for(let o=0;o<s.length;o++){let l=s[o].trim();if(!l||l.startsWith("//")||l.startsWith("/*")||l.startsWith("*"))continue;let a=l.match(/^\s*import\s+/);if(!a&&l.length>0){if(i=!0,r===0)r=o+1}if(i&&a)t.push({filePath:n.filePath,line:o+1,column:1,ruleId:"import/first",message:"Import statement must appear before other statements",severity:"error"})}return t}};var Ia={meta:{docs:"Disallow duplicate specifier names in a single import declaration"},check:(e,n)=>{let t=[],s=e.split(/\r?\n/);for(let i=0;i<s.length;i++){let r=s[i],o=r.match(/^\s*import\s*\{([^}]*)\}\s*from\s*['"][^'"]+['"]/);if(!o)continue;let a=o[1].split(",").map((u)=>u.trim()).filter(Boolean).map((u)=>u.split(/\s+as\s+/i)[0].trim()),c=new Set;for(let u of a){if(c.has(u)){t.push({filePath:n.filePath,line:i+1,column:Math.max(1,r.indexOf(u)+1),ruleId:"pickier/import-dedupe",message:"Expect no duplication in imports",severity:"warning"});break}c.add(u)}}return t}};function Ma(e){let n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?<![\\w$])${n}(?![\\w$])`)}function ep(e,n,t){let s=[],i=/^\s*import\s+type\b/.test(e),r=e.replace(/^\s*import\s+/,"").replace(/\s+from\s+['"][^'"]+['"].*$/s,"");if(/^['"]/.test(r))return s;let o=(c,u)=>{let f=c.trim();if(!f||f==="type")return;if(!/^[A-Z_$][\w$]*$/i.test(f))return;for(let m=n;m<t.length;m++){let h=t[m].search(Ma(f));if(h!==-1){s.push({name:f,line:m+1,column:h,typeOnly:u});return}if(/\bfrom\b/.test(t[m]))break}s.push({name:f,line:n+1,column:0,typeOnly:u})},l=r.match(/\{([\s\S]*)\}/);if(l)for(let c of l[1].split(",")){let u=c.trim();if(!u)continue;let f=/^type\s+/.test(u),h=u.replace(/^type\s+/,"").split(/\s+as\s+/);o(h[h.length-1],i||f)}let a=l?r.slice(0,r.indexOf("{")):r;for(let c of a.split(",")){let u=c.trim().replace(/^type\s+/,"");if(!u)continue;let f=u.match(/^\*\s+as\s+(\w+)$/);o(f?f[1]:u,i)}return s}var Ca={meta:{docs:"Disallow imports that nothing in the file uses"},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=[],r=new Set;for(let a=0;a<s.length;a++){if(!/^\s*import(?![\w$])\s*(?![(.])/.test(s[a]))continue;let c=s[a],u=a,f=Math.min(s.length-1,a+40);while(u<f&&!/\bfrom\s*['"][^'"]*['"]/.test(c)&&!/^\s*import\s*['"]/.test(c))u++,c+=`
130
130
  ${s[u]}`;if(!/\bfrom\s*['"][^'"]*['"]/.test(c)&&!/^\s*import\s*['"]/.test(c))continue;for(let m=a;m<=u;m++)r.add(m);i.push(...ep(c,a,s)),a=u}if(i.length===0)return t;let o=s.map((a,c)=>r.has(c)?"":a).join(`
131
131
  `),l=Li(o);for(let a of i){if(Ma(a.name).test(l))continue;t.push({filePath:n.filePath,line:a.line,column:a.column+1,ruleId:"pickier/no-unused-imports",message:a.typeOnly?`'${a.name}' is imported as a type but never used`:`'${a.name}' is imported but never used`,severity:"error"})}return t}};import{existsSync as tp,readFileSync as np}from"fs";import{dirname as sp,resolve as ip}from"path";var Sa={meta:{docs:"Ensure named imports correspond to a named export in the remote file",recommended:!0},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=sp(n.filePath);for(let r=0;r<s.length;r++){let l=s[r].match(/\bimport\s+\{([^}]+)\}\s+from\s+['"]([^'"]+)['"]/);if(l){let a=l[1].split(",").map((m)=>m.trim().split(/\s+as\s+/)[0].trim()),c=l[2];if(!c.startsWith(".")&&!c.startsWith("/"))continue;let u=[".ts",".tsx",".js",".jsx",""],f="";for(let m of u){let h=ip(i,c+m);if(tp(h)){f=np(h,"utf8");break}}if(f)for(let m of a){let h=new RegExp(`\\bexport\\s+(?:const|let|var|function|class)\\s+${m}\\b`),d=new RegExp(`\\bexport\\s+\\{[^}]*\\b${m}\\b[^}]*\\}`);if(![h,d].some((y)=>y.test(f)))t.push({filePath:n.filePath,line:r+1,column:1,ruleId:"import/named",message:`'${m}' not found in '${c}'`,severity:"error"})}}}return t}};import{existsSync as Ea,readFileSync as rp}from"fs";import{dirname as La,resolve as Ta}from"path";var Aa={meta:{docs:"Ensure imports don't create circular dependencies",recommended:!0},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=n.filePath,r=new Set,o=new Set;function l(c,u){if(o.has(c))return!0;if(r.has(c))return!1;r.add(c),o.add(c);try{let f=rp(c,"utf8"),m=a(f,La(c));for(let h of m)if(l(h,[...u,h]))return!0}catch{}return o.delete(c),!1}function a(c,u){let f=[],m=/\bimport(?:\s{2,}|\s+\S.*?(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))from\s+['"]([^'"]+)['"]/g,h;for(h=m.exec(c);h!==null;h=m.exec(c)){let d=h[1];if(d.startsWith(".")||d.startsWith("/")){let p=[".ts",".tsx",".js",".jsx",""];for(let g of p){let y=Ta(u,d+g);if(Ea(y)){f.push(y);break}}}}return f}for(let c=0;c<s.length;c++){let f=s[c].match(/\bimport(?:\s{2,}|\s+\S.*?(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))from\s+['"]([^'"]+)['"]/);if(f){let m=f[1];if(m.startsWith(".")||m.startsWith("/")){let h=[".ts",".tsx",".js",".jsx",""],d="";for(let p of h){let g=Ta(La(i),m+p);if(Ea(g)){d=g;break}}if(d){if(r.clear(),o.clear(),o.add(i),l(d,[i,d]))t.push({filePath:n.filePath,line:c+1,column:1,ruleId:"import/no-cycle",message:"Dependency cycle detected",severity:"error"})}}}}return t}};var Oa={meta:{docs:"Disallow duplicate module imports - all imports from the same module should be combined"},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=new Map,r=!1;for(let o=0;o<s.length;o++){let l=s[o];if(r){let h=l.indexOf("*/");if(h>=0)l=l.slice(h+2),r=!1;else continue}let a=l.indexOf("/*"),c=l.indexOf("//");if(a>=0&&(c===-1||a<c)){let h=l.indexOf("*/",a+2);if(h>=0)l=l.slice(0,a)+l.slice(h+2);else r=!0,l=l.slice(0,a)}if(c>=0)l=l.slice(0,c);let u=l.trim();if(!u)continue;let f=u.match(/^import\s+(?:type\s+)?(?:\{[^}]*\}|[\w$]+(?:\s*,\s*\{[^}]*\})?|\*\s+as\s+[\w$]+)\s+from\s+(['"`])(.+?)\1/);if(f){let h=f[2];if(i.has(h)){let d=i.get(h);t.push({filePath:n.filePath,line:o+1,column:1,ruleId:"no-duplicate-imports",message:`'${h}' imported multiple times (also imported on line${d.length>1?"s":""} ${d.join(", ")})`,severity:"error",help:`Combine all imports from '${h}' into a single import statement`}),d.push(o+1)}else i.set(h,[o+1])}let m=u.match(/^export\s+(?:type\s+)?(?:\{[^}]*\}|\*(?:\s+as\s+[\w$]+)?)\s+from\s+(['"`])(.+?)\1/);if(m){let h=m[2],d=`export:${h}`;if(i.has(d)){let p=i.get(d);t.push({filePath:n.filePath,line:o+1,column:1,ruleId:"no-duplicate-imports",message:`'${h}' re-exported multiple times (also exported on line${p.length>1?"s":""} ${p.join(", ")})`,severity:"error",help:`Combine all re-exports from '${h}' into a single export statement`}),p.push(o+1)}else i.set(d,[o+1])}}return t}};var _a={meta:{docs:"Disallow importing from dist directories"},check:(e,n)=>{let t=[],s=new RegExp(`^\\s*import\\s[^;]*?from\\s*['"]([^'"]+)['"]`,"m"),i=e.split(/\r?\n/);for(let r=0;r<i.length;r++){let o=i[r],l=o.match(s);if(!l)continue;let a=l[1];if(a==="dist"||(a.startsWith(".")||a.startsWith("/"))&&/(?:^|\/)dist(?:\/.|$)/.test(a))t.push({filePath:n.filePath,line:r+1,column:Math.max(1,o.indexOf(a)+1),ruleId:"pickier/no-import-dist",message:`Do not import modules in \`dist\` folder, got ${a}`,severity:"error"})}return t}};var Da={meta:{docs:"Disallow importing from node_modules by explicit path"},check:(e,n)=>{let t=[],s=new RegExp(`^\\s*import\\s[^;]*?from\\s*['"]([^'"]+)['"]`,"m"),i=/require\(\s*['"]([^'"]+)['"]\s*\)/,r=e.split(/\r?\n/);for(let o=0;o<r.length;o++){let l=r[o],a=l.match(s),c=l.match(i),u=a?.[1]||c?.[1];if(!u)continue;if(u.includes("/node_modules/")){let f=Math.max(1,l.indexOf(u)+1);t.push({filePath:n.filePath,line:o+1,column:f,ruleId:"pickier/no-import-node-modules-by-path",message:"Do not import modules in `node_modules` folder by path",severity:"error"})}}return t}};import{existsSync as op}from"fs";import{dirname as lp,join as ap,resolve as cp}from"path";var Fa={meta:{docs:"Ensure imports point to a file/module that can be resolved",recommended:!0},check:(e,n)=>{let t=[],s=e.split(/\r?\n/),i=lp(n.filePath);for(let r=0;r<s.length;r++){let o=s[r],l=[...o.matchAll(/\bimport(?:\s{2,}|\s+\S.*?(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))from\s+['"]([^'"]+)['"]/g),...o.matchAll(/\bimport\s*\(\s*['"]([^'"]+)['"]\s*\)/g),...o.matchAll(/\brequire\s*\(\s*['"]([^'"]+)['"]\s*\)/g)];for(let a of l){let c=a[1];if(!c.startsWith(".")&&!c.startsWith("/"))continue;let u=[],f=[".ts",".tsx",".js",".jsx",".mjs",".cjs",""];for(let h of f){let d=cp(i,c+h);u.push(d),u.push(ap(d,`index${h}`))}if(!u.some((h)=>op(h)))t.push({filePath:n.filePath,line:r+1,column:1,ruleId:"import/no-unresolved",message:`Unable to resolve path to module '${c}'`,severity:"error"})}}return t}};function Na(e,n,t){let s=t.order==="desc"?-1:1,i=t.type||"alphabetical",r=t.ignoreCase?e.toLowerCase():e,o=t.ignoreCase?n.toLowerCase():n;if(i==="line-length")return(r.length-o.length)*s;if(i==="natural")return r.localeCompare(o,void 0,{numeric:!0,sensitivity:"base"})*s;if(i==="unsorted")return 0;return r.localeCompare(o)*s}var up=new RegExp(`^export\\s+\\{[^}]*\\}\\s+from\\s+['"][^'"]+['"];?\\s*$`);function _s(e){return up.test(e)}var Wa={meta:{docs:"Ensure contiguous export statements are sorted consistently."},check:(e,n)=>{let t=[],s=n.config.pluginRules?.["pickier/sort-exports"]?.[1]||{},i=e.split(/\r?\n/),r=0;while(r<i.length){while(r<i.length&&!_s(i[r]))r++;if(r>=i.length)break;let o=[],l=r;while(l<i.length){let a=i[l];if(_s(a)){o.push({idx:l,line:a}),l++;continue}if(s.partitionByNewLine&&a.trim()==="")break;else break}if(o.length>1){let a=o.map((f)=>f.line),c=[...a].sort((f,m)=>Na(f,m,s));if(!a.every((f,m)=>f===c[m])){let f=a.findIndex((h,d)=>h!==c[d]),m=o[f]?.idx??o[0].idx;t.push({filePath:n.filePath,line:m+1,column:1,ruleId:"pickier/sort-exports",message:"Export statements are not sorted.",severity:"warning"})}}r=l+1}return t},fix:(e,n)=>{let t=n.config.pluginRules?.["pickier/sort-exports"]?.[1]||{},i=[...e.split(/\r?\n/)],r=0;while(r<i.length){while(r<i.length&&!_s(i[r]))r++;if(r>=i.length)break;let o=[],l=r;while(l<i.length){let a=i[l];if(_s(a)){o.push(l),l++;continue}if(t.partitionByNewLine&&a.trim()==="")break;else break}if(o.length>1){let a=o.map((f)=>i[f]),c=[...a].sort((f,m)=>Na(f,m,t));if(!a.every((f,m)=>f===c[m]))o.forEach((f,m)=>{i[f]=c[m]})}r=l+1}return i.join(`
132
132
  `)}};var Ba={meta:{docs:"Enforce sorted TypeScript heritage clauses (extends/implements lists)"},check:(e,n)=>{let t=n.options||{},s=t.type||"alphabetical",i=t.order||"asc",r=t.ignoreCase!==!1,o=Array.isArray(t.groups)?t.groups:[],l=t.customGroups||{},a=e.split(/\r?\n/),c=[],u=(k)=>i==="asc"?k:-k,f=(k,M)=>(r?k.toLowerCase():k).localeCompare(r?M.toLowerCase():M),m=(k,M)=>(r?k.toLowerCase():k).localeCompare(r?M.toLowerCase():M,void 0,{numeric:!0}),h=(k,M)=>{if(s==="line-length")return u(k.length-M.length);if(s==="natural")return u(m(k,M));if(s==="unsorted")return 0;return u(f(k,M))},d=Object.fromEntries(Object.entries(l).map(([k,M])=>{let C=(Array.isArray(M)?M:[M]).map((O)=>new RegExp(O));return[k,C]})),p=[];for(let k of o)if(Array.isArray(k))p.push(...k);else p.push(k);if(!p.includes("unknown"))p.push("unknown");let g=(k)=>{for(let[M,P]of Object.entries(d))if(P.some((C)=>C.test(k)))return M;return"unknown"},y=(k)=>{let M=[],P=0,C="";for(let O=0;O<k.length;O++){let I=k[O];if(I==="<")P++;else if(I===">")P=Math.max(0,P-1);if(I===","&&P===0){M.push(C.trim()),C="";continue}C+=I}if(C.trim())M.push(C.trim());return M},x=(k)=>{let M=k.trim(),P=M.match(/^([A-Z_$][\w$.]*)/i);return P?P[1]:M},R=(k,M)=>{let P=y(M);if(P.length<=1)return;let C=P.map(x),O=C.map(g),I=C.map((T,_)=>({n:T,g:O[_],i:_})).sort((T,_)=>{let S=p.indexOf(T.g),A=p.indexOf(_.g);if(S!==A)return S-A;return h(T.n,_.n)}).map((T)=>T.n);if(!C.every((T,_)=>T===I[_]))c.push({filePath:n.filePath,line:k,column:1,ruleId:"sort-heritage-clauses",message:"Heritage clauses are not sorted",severity:"warning"})};for(let k=0;k<a.length;k++){let M=a[k],P=M.match(/^\s*interface\s+[A-Za-z_$][^{]*\bextends\s+(.+?)\s*\{/);if(P)R(k+1,P[1]);let C=M.match(/^\s*class\s+[A-Za-z_$][^{]*\bimplements\s+(.+?)\s*\{/);if(C)R(k+1,C[1])}return c}};var ja={meta:{docs:"Require object keys to be sorted (ESLint-compatible core rule subset)"},check:()=>[]};var Ua={meta:{docs:"Enforce sorted named imports within each import statement"},check:(e,n)=>{let t=n.options||{},s=t.type||"alphabetical",i=t.order||"asc",r=t.ignoreCase!==!1,o=Boolean(t.ignoreAlias),l=e.split(/\r?\n/),a=[],c=(u,f)=>{let m=0;if(s==="line-length")m=u.length-f.length;else{let h=r?u.toLowerCase():u,d=r?f.toLowerCase():f;m=h.localeCompare(d)}return i==="asc"?m:-m};for(let u=0;u<l.length;u++){let m=l[u].match(/^\s*import\s+\{([^}]*)\}\s+from\s+['"][^'"]+['"]/);if(!m)continue;let d=m[1].split(",").map((x)=>x.trim()).filter(Boolean);if(d.length<=1)continue;let p=d.map((x)=>{let R=x.replace(/^type\s+/,""),k=R.match(/^([\w$]+)\s+as\s+([\w$]+)$/);if(k)return o?k[2]:k[1];let M=R.match(/^([\w$]+)$/);return M?M[1]:R}),g=[...p].sort(c);if(!p.every((x,R)=>x===g[R]))a.push({filePath:n.filePath,line:u+1,column:1,ruleId:"sort-named-imports",message:"Named imports are not sorted",severity:"warning"})}return a}};var za={meta:{docs:"Enforce sorted object keys"},check:(e,n)=>{let t=n.options||{},s=t.type||"alphabetical",i=t.order||"asc",r=t.ignoreCase!==!1,o=Boolean(t.partitionByNewLine),l=e.split(/\r?\n/),a=[],c=(f,m)=>{let h=0;if(s==="line-length")h=f.length-m.length;else{let d=r?f.toLowerCase():f,p=r?m.toLowerCase():m;h=d.localeCompare(p)}return i==="asc"?h:-h},u=0;while(u<l.length){let f=l[u],m=f.indexOf("{");if(m!==-1){let h=f.slice(0,m);if(/=\s*$|\(\s*$|\breturn\s*$/.test(h)){let d=0,p=u,g=u;for(;g<l.length;g++){for(let y of l[g])if(y==="{")d++;else if(y==="}")d--;if(d===0)break}if(g>p){let y=l.slice(p+1,g),x=[],R={startLine:p+2,props:[]},k=()=>{if(R.props.length)x.push(R);R={startLine:0,props:[]}};for(let M=0;M<y.length;M++){let P=y[M];if(o&&/^\s*$/.test(P)){k();continue}if(/^\s*\.\.\./.test(P))continue;if(/\{|\}/.test(P))continue;let C=P.match(/^\s*['"]?([\w$-]+)['"]?\s*:/);if(C){if(R.startLine===0)R.startLine=p+2+M;R.props.push({key:C[1],line:p+2+M})}}k();for(let M of x){let P=M.props.map((I)=>I.key),C=[...P].sort(c);if(!(P.length<=1||P.every((I,N)=>I===C[N]))&&M.props.length>0){let I=M.props[0];a.push({filePath:n.filePath,line:I.line,column:1,ruleId:"sort-objects",message:"Object keys are not sorted",severity:"warning"})}}u=g+1;continue}}}u++}return a}};var qa={meta:{docs:"Enforce top-level functions to use function declarations"},check:(e,n)=>{let t=[],s=e.split(/\r?\n/);for(let i=0;i<s.length;i++){let r=s[i];if(/^\s+/.test(r))continue;if(/^\s*(?:\/\/|\/\*)/.test(r))continue;let o=r.match(/^const\s+([A-Za-z_$][\w$]*)\s*=(.*)$/);if(!o)continue;let l=o[2].trim();if(/^\(?[A-Z_$,]*(?:\)\s*)?=>/i.test(l)||/^function\b/.test(l)){let a=r.indexOf("const")+1;t.push({filePath:n.filePath,line:i+1,column:a,ruleId:"pickier/top-level-function",message:"Top-level functions should be declared with function keyword",severity:"warning"});continue}if(l.trim().length===0||/[,({]$/.test(l.trim())){let a=s[i+1]||"";if(/^\s*(?:\(?[A-Za-z_$,]*(?:\)\s*)?=>|function\b)/.test(a)){let c=r.indexOf("const")+1;t.push({filePath:n.filePath,line:i+1,column:c,ruleId:"pickier/top-level-function",message:"Top-level functions should be declared with function keyword",severity:"warning"})}}}return t}};var fp=[[/^(block|inline|inline-block|flex|inline-flex|grid|inline-grid|flow-root|contents|hidden|table|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row-group|table-row|list-item|subgrid)$/,0],[/^(container|columns|break-after|break-before|break-inside|box-decoration|box-border|box-content|float|clear|isolation|object|overflow|overscroll|position|inset|top|right|bottom|left|start|end|z-|aspect|order)/,1],[/^(static|fixed|absolute|relative|sticky)$/,1],[/^(visible|invisible|collapse)$/,1],[/^(basis|flex-|grow|shrink|order|grid-|col-|row-|auto-cols|auto-rows|gap|justify|items|content|self|place)/,2],[/^(p|px|py|ps|pe|pt|pr|pb|pl|m|mx|my|ms|me|mt|mr|mb|ml|space|indent)-/,3],[/^(-?(p|px|py|ps|pe|pt|pr|pb|pl|m|mx|my|ms|me|mt|mr|mb|ml|space|indent)-)/,3],[/^(w-|h-|min-w|max-w|min-h|max-h|size-)/,4],[/^(font|text|tracking|leading|list|placeholder|vertical|whitespace|break|hyphens|content|truncate|overflow-ellipsis|overflow-clip|line-clamp|underline|overline|line-through|no-underline|uppercase|lowercase|capitalize|normal-case|italic|not-italic|ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|normal-nums|antialiased|subpixel-antialiased)/,5],[/^(bg-|from-|via-|to-|gradient-)/,6],[/^(border|rounded|outline|ring|divide|accent)/,7],[/^(shadow|opacity|mix-blend|bg-blend)/,8],[/^(blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|saturate|sepia|backdrop)/,9],[/^(border-collapse|border-separate|border-spacing|table-auto|table-fixed|caption)/,10],[/^(transition|duration|ease|delay|animate)/,11],[/^(scale|rotate|translate|skew|origin|transform|perspective)/,12],[/^(appearance|cursor|caret|pointer-events|resize|scroll|snap|touch|select|will-change)/,13],[/^(fill|stroke)/,14],[/^(sr-only|not-sr-only)$/,15]],mp=/^([a-z0-9][-a-z0-9]{0,50}:)+(?!\[)/;function hp(e){let n=0;while(n<e.length){if(e[n]==="[")break;let t=e.indexOf(":",n);if(t===-1)break;if(e[t+1]==="[")break;n=t+1}return e.slice(n)}function dp(e){let n=hp(e);if(n.startsWith("!"))n=n.slice(1);for(let[t,s]of fp)if(t.test(n))return s;return 99}function pp(e){let n=e.match(mp);if(!n)return 0;let t=n[0].slice(0,-1).split(":"),s={sm:1,md:2,lg:3,xl:4,"2xl":5},i=10;for(let r of t)if(s[r]!==void 0)i+=s[r];else i+=20;return i}var Ka=new Map;function Va(e){let n=Ka.get(e);if(n)return n;let t={group:dp(e),variant:pp(e)};return Ka.set(e,t),t}function ir(e){return[...e].sort((n,t)=>{let s=Va(n),i=Va(t),r=s.group,o=i.group;if(r!==o)return r-o;let l=s.variant,a=i.variant;if(l!==a)return l-a;return n.localeCompare(t)})}var gp=/\b(?:class|className|:class)\s*=\s*(?:"([^"]*?)"|'([^']*?)')/g,yp=/\b(?:class|className|:class)\s*=\s*\{`([^`]*?)`\}/g,bp=/\b(?:clsx|cn|tw|cva|tv)\s*\(\s*(?:"([^"]*?)"|'([^']*?)')/g;function xp(e){let n=e.replace(/\[[^\]]*\]/g,"");if(/['"`]/.test(n))return!0;if(/[{}()=]/.test(n))return!0;if(/ \? | && | \|\| /.test(n))return!0;if(/\b(?:true|false|null|undefined|function|return|typeof|instanceof)\b/.test(n))return!0;return!1}function Ha(e){let n=[];if(!e.includes("class")&&!e.includes("clsx")&&!e.includes("cn(")&&!e.includes("tw(")&&!e.includes("cva(")&&!e.includes("tv("))return n;for(let t of[gp,yp,bp]){t.lastIndex=0;let s;while((s=t.exec(e))!==null){let i=s[1]??s[2]??"";if(!i.trim())continue;if(xp(i))continue;let r=e.indexOf(i,s.index);if(r===-1)continue;n.push({value:i,start:r,end:r+i.length})}}return n.sort((t,s)=>t.start-s.start),n}function Za(e){let n=[],t="",s=0;for(let i of e)if(i==="[")s++,t+=i;else if(i==="]")s=Math.max(0,s-1),t+=i;else if(/\s/.test(i)&&s===0){if(t)n.push(t),t=""}else t+=i;if(t)n.push(t);return n}function Ga(e){let n=ir(e);return e.every((t,s)=>t===n[s])}var Ja={meta:{docs:"Enforce consistent Tailwind CSS class ordering (layout \u2192 spacing \u2192 typography \u2192 etc.).",recommended:!0,editsStringContent:!0},check:(e,n)=>{let t=[],s=Ha(e);for(let{value:i,start:r}of s){let o=Za(i);if(o.length<2)continue;if(!Ga(o)){let l=e.slice(0,r),a=(l.match(/\n/g)??[]).length+1,c=l.lastIndexOf(`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{h as a}from"./chunk-djgqvaq1.js";import"./chunk-vdbbvx8x.js";import"./chunk-gy6wyx8t.js";import"./chunk-awmb5sg5.js";export{a as runUnified};
2
+ import{h as a}from"./chunk-sj3ctzyt.js";import"./chunk-vdbbvx8x.js";import"./chunk-gy6wyx8t.js";import"./chunk-awmb5sg5.js";export{a as runUnified};
package/dist/src/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{a as i,b as r,c as t,g as o}from"../chunk-dsmbhdmt.js";import{h as s}from"../chunk-djgqvaq1.js";import{A as F,B as I,C as O,D as A,E,F as W,G as U,H as q,I as z,J as B,K as D,L as G,M as N,k as m,l as b,m as P,n as C,o as R,p as d,q as y,r as k,s as h,t as v,u as w,v as S,w as L,x as M,y as T,z as j}from"../chunk-vdbbvx8x.js";import{N as e,P as n}from"../chunk-gy6wyx8t.js";import"../chunk-awmb5sg5.js";export{h as ALWAYS_IGNORES,k as ENV,R as MAX_FIXER_PASSES,v as UNIVERSAL_IGNORES,O as blue,E as bold,T as colorize,W as colors,n as config,G as createIgnoreMatcher,y as createLimiter,e as defaultConfig,b as detectQuoteIssues,z as expandPatterns,m as formatCode,C as formatImports,w as getRuleSetting,d as glob,A as gray,j as green,P as hasIndentIssue,B as isCodeFile,M as isRuleOff,r as lintText,q as loadConfigFromPath,U as mergeConfig,S as normalizeRuleSeverity,F as red,L as resolveRuleSeverity,s as run,i as runFormat,o as runLint,t as runLintProgrammatic,N as shouldIgnorePath,D as withAlwaysIgnores,I as yellow};
2
+ import{a as i,b as r,c as t,g as o}from"../chunk-tskywgx9.js";import{h as s}from"../chunk-sj3ctzyt.js";import{A as F,B as I,C as O,D as A,E,F as W,G as U,H as q,I as z,J as B,K as D,L as G,M as N,k as m,l as b,m as P,n as C,o as R,p as d,q as y,r as k,s as h,t as v,u as w,v as S,w as L,x as M,y as T,z as j}from"../chunk-vdbbvx8x.js";import{N as e,P as n}from"../chunk-gy6wyx8t.js";import"../chunk-awmb5sg5.js";export{h as ALWAYS_IGNORES,k as ENV,R as MAX_FIXER_PASSES,v as UNIVERSAL_IGNORES,O as blue,E as bold,T as colorize,W as colors,n as config,G as createIgnoreMatcher,y as createLimiter,e as defaultConfig,b as detectQuoteIssues,z as expandPatterns,m as formatCode,C as formatImports,w as getRuleSetting,d as glob,A as gray,j as green,P as hasIndentIssue,B as isCodeFile,M as isRuleOff,r as lintText,q as loadConfigFromPath,U as mergeConfig,S as normalizeRuleSeverity,F as red,L as resolveRuleSeverity,s as run,i as runFormat,o as runLint,t as runLintProgrammatic,N as shouldIgnorePath,D as withAlwaysIgnores,I as yellow};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pickier",
3
3
  "type": "module",
4
- "version": "0.1.64",
4
+ "version": "0.1.65",
5
5
  "description": "Format, lint and more in a fraction of seconds.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",