@zayne-labs/eslint-config 0.9.12 → 0.9.14

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/cli/index.js CHANGED
@@ -10,7 +10,7 @@ import parse from "parse-gitignore";
10
10
  import { execSync } from "node:child_process";
11
11
 
12
12
  //#region package.json
13
- var version = "0.9.12";
13
+ var version = "0.9.14";
14
14
 
15
15
  //#endregion
16
16
  //#region src/cli/constants.ts
@@ -69,8 +69,8 @@ const frameworkOptions = [
69
69
  ];
70
70
  const frameworks = frameworkOptions.map(({ value }) => value);
71
71
  const extraOptions = [{
72
- label: c.cyan("TailwindCSS"),
73
- value: "tailwindcss"
72
+ label: c.cyan("TailwindCSS (Better)"),
73
+ value: "tailwindcssBetter"
74
74
  }];
75
75
  const extra = extraOptions.map(({ value }) => value);
76
76
  const dependenciesMap = defineEnumDeep({
@@ -82,6 +82,7 @@ const dependenciesMap = defineEnumDeep({
82
82
  ],
83
83
  solid: ["eslint-plugin-solid"],
84
84
  svelte: ["eslint-plugin-svelte", "svelte-eslint-parser"],
85
+ tailwindcssBetter: ["eslint-plugin-better-tailwindcss"],
85
86
  vue: [
86
87
  "eslint-plugin-vue",
87
88
  "eslint-processor-vue-blocks",
@@ -133,6 +134,7 @@ async function updateEslintFiles(result) {
133
134
  }
134
135
  const configLines = [];
135
136
  if (eslintIgnores.length > 0) configLines.push(`ignores: ${JSON.stringify(eslintIgnores)},`);
137
+ if (result.extra.includes("tailwindcssBetter")) configLines.push(`tailwindcssBetter: true,`);
136
138
  for (const framework of result.frameworks) configLines.push(`${framework}: true,`);
137
139
  const mainConfig = configLines.map((line) => ` ${line}`).join("\n");
138
140
  const additionalConfig = [];
@@ -148,6 +150,7 @@ const versionsMap = {
148
150
  "astro-eslint-parser": "^1.2.2",
149
151
  eslint: "^9.24.0",
150
152
  "eslint-plugin-astro": "^1.3.1",
153
+ "eslint-plugin-better-tailwindcss": "^3.7.6",
151
154
  "eslint-plugin-react-hooks": "^5.2.0",
152
155
  "eslint-plugin-react-refresh": "^0.4.19",
153
156
  "eslint-plugin-solid": "^0.14.5",
@@ -167,6 +170,15 @@ async function updatePackageJson(result) {
167
170
  pkg.devDependencies["@zayne-labs/eslint-config"] = `^${version}`;
168
171
  pkg.devDependencies.eslint ??= versionsMap.eslint;
169
172
  const addedPackages = [];
173
+ for (const item of result.extra) switch (item) {
174
+ case "tailwindcssBetter":
175
+ dependenciesMap.tailwindcssBetter.forEach((f) => {
176
+ pkg.devDependencies && (pkg.devDependencies[f] = versionsMap[f]);
177
+ addedPackages.push(f);
178
+ });
179
+ break;
180
+ default:
181
+ }
170
182
  for (const framework of result.frameworks) {
171
183
  const dependencies = dependenciesMap[framework];
172
184
  if (!dependencies) continue;
@@ -240,7 +252,7 @@ async function run(options = {}) {
240
252
  extra: ({ results }) => {
241
253
  const isArgExtraValid = (argExtra?.length ?? 0) > 0 && (argExtra ?? []).filter((element) => !extra.includes(element)).length === 0;
242
254
  if (!results.uncommittedConfirmed || isArgExtraValid) return;
243
- const message = argExtra ? `"${argExtra}" isn't a valid extra util. Please choose from below: ` : "Select a extra utils:";
255
+ const message = argExtra ? `"${argExtra}" isn't a valid extra util. Please choose from below: ` : "Select an extra util:";
244
256
  return p.multiselect({
245
257
  message: c.reset(message),
246
258
  options: extraOptions,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["frameworkOptions: Array<PromItem<FrameworkOption>>","frameworks: FrameworkOption[]","extraOptions: Array<PromItem<ExtraLibrariesOption>>","extra: ExtraLibrariesOption[]","eslintIgnores: string[]","configLines: string[]","additionalConfig: string[]","eslintConfigContent: string","addedPackages: string[]","dotVscodePath: string","settingsPath: string","result: PromptResult"],"sources":["../../package.json","../../src/cli/constants.ts","../../src/cli/utils.ts","../../src/cli/stages/update-eslint-files.ts","../../src/cli/constants-generated.ts","../../src/cli/stages/update-package-json.ts","../../src/cli/stages/update-vscode-settings.ts","../../src/cli/run.ts","../../src/cli/index.ts"],"sourcesContent":["{\n\t\"name\": \"@zayne-labs/eslint-config\",\n\t\"type\": \"module\",\n\t\"version\": \"0.9.12\",\n\t\"description\": \"Zayne Labs' ESLint config preset\",\n\t\"author\": \"Ryan Zayne\",\n\t\"license\": \"MIT\",\n\t\"homepage\": \"https://github.com/zayne-labs/config#readme\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+https://github.com/zayne-labs/config.git\"\n\t},\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/zayne-labs/config/issues\"\n\t},\n\t\"keywords\": [],\n\t\"sideEffects\": false,\n\t\"exports\": {\n\t\t\".\": \"./dist/index.js\"\n\t},\n\t\"bin\": \"./bin/index.js\",\n\t\"files\": [\n\t\t\"bin\",\n\t\t\"dist\"\n\t],\n\t\"engines\": {\n\t\t\"node\": \">=18.x\"\n\t},\n\t\"scripts\": {\n\t\t\"build\": \"pnpm typegen && tsdown\",\n\t\t\"build:dev\": \"pnpm typegen && cross-env NODE_ENV=development tsdown\",\n\t\t\"lint:attw\": \"attw --pack . --ignore-rules=cjs-resolves-to-esm\",\n\t\t\"lint:eslint\": \"eslint . --max-warnings 0\",\n\t\t\"lint:format\": \"prettier --cache --write .\",\n\t\t\"lint:packages\": \"pnpm dedupe --check\",\n\t\t\"lint:publint\": \"publint --strict .\",\n\t\t\"lint:type-check\": \"pnpm typegen && tsc --pretty -p tsconfig.json\",\n\t\t\"release\": \"pnpm publish --no-git-checks\",\n\t\t\"release:test\": \"pnpx pkg-pr-new publish\",\n\t\t\"typegen\": \"tsx scripts/typegen.ts\",\n\t\t\"version-package\": \"changeset version\"\n\t},\n\t\"peerDependencies\": {\n\t\t\"@eslint-react/eslint-plugin\": \">=1.15.0\",\n\t\t\"@next/eslint-plugin-next\": \">=14.2.15\",\n\t\t\"@tanstack/eslint-plugin-query\": \">=5.59.7\",\n\t\t\"@tanstack/eslint-plugin-router\": \">=1.120.17\",\n\t\t\"astro-eslint-parser\": \">=1.0.2\",\n\t\t\"eslint\": \">=9.12.0\",\n\t\t\"eslint-config-expo\": \">=9.2.0\",\n\t\t\"eslint-plugin-astro\": \">=1.2.0\",\n\t\t\"eslint-plugin-better-tailwindcss\": \">=3.2.0\",\n\t\t\"eslint-plugin-depend\": \">=1.2.0\",\n\t\t\"eslint-plugin-pnpm\": \">=0.3.1\",\n\t\t\"eslint-plugin-react-hooks\": \">=5.0.0\",\n\t\t\"eslint-plugin-react-refresh\": \">=0.4.12\",\n\t\t\"eslint-plugin-solid\": \">=0.14.3\",\n\t\t\"eslint-plugin-svelte\": \">=2.35.1\",\n\t\t\"eslint-plugin-vue\": \">=9.28.0\",\n\t\t\"eslint-processor-vue-blocks\": \">=0.1.2\",\n\t\t\"vue-eslint-parser\": \">=9.4.3\"\n\t},\n\t\"peerDependenciesMeta\": {\n\t\t\"@eslint-react/eslint-plugin\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"@next/eslint-plugin-next\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"@tanstack/eslint-plugin-query\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"@tanstack/eslint-plugin-router\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"astro-eslint-parser\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-config-expo\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-astro\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-better-tailwindcss\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-depend\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-pnpm\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-react-hooks\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-react-refresh\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-solid\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-svelte\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-vue\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-processor-vue-blocks\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"vue-eslint-parser\": {\n\t\t\t\"optional\": true\n\t\t}\n\t},\n\t\"dependencies\": {\n\t\t\"@antfu/install-pkg\": \"1.1.0\",\n\t\t\"@clack/prompts\": \"0.11.0\",\n\t\t\"@eslint-community/eslint-plugin-eslint-comments\": \"4.5.0\",\n\t\t\"@eslint/compat\": \"1.3.2\",\n\t\t\"@eslint/js\": \"9.34.0\",\n\t\t\"@stylistic/eslint-plugin\": \"5.2.3\",\n\t\t\"@zayne-labs/toolkit-type-helpers\": \"0.10.9\",\n\t\t\"ansis\": \"4.1.0\",\n\t\t\"cac\": \"6.7.14\",\n\t\t\"eslint-config-flat-gitignore\": \"2.1.0\",\n\t\t\"eslint-flat-config-utils\": \"2.1.1\",\n\t\t\"eslint-import-resolver-typescript\": \"4.4.4\",\n\t\t\"eslint-merge-processors\": \"^2.0.0\",\n\t\t\"eslint-plugin-import-x\": \"4.16.1\",\n\t\t\"eslint-plugin-jsdoc\": \"54.1.1\",\n\t\t\"eslint-plugin-jsonc\": \"2.20.1\",\n\t\t\"eslint-plugin-n\": \"17.21.3\",\n\t\t\"eslint-plugin-perfectionist\": \"4.15.0\",\n\t\t\"eslint-plugin-security\": \"3.0.1\",\n\t\t\"eslint-plugin-toml\": \"^0.12.0\",\n\t\t\"eslint-plugin-unicorn\": \"60.0.0\",\n\t\t\"eslint-plugin-yml\": \"^1.17.0\",\n\t\t\"globals\": \"16.3.0\",\n\t\t\"jsonc-eslint-parser\": \"2.4.0\",\n\t\t\"local-pkg\": \"1.1.2\",\n\t\t\"parse-gitignore\": \"2.0.0\",\n\t\t\"toml-eslint-parser\": \"0.10.0\",\n\t\t\"typescript-eslint\": \"8.41.0\",\n\t\t\"yaml-eslint-parser\": \"1.3.0\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@arethetypeswrong/cli\": \"0.18.2\",\n\t\t\"@changesets/cli\": \"2.29.6\",\n\t\t\"@eslint-react/eslint-plugin\": \"1.52.7\",\n\t\t\"@next/eslint-plugin-next\": \"15.5.2\",\n\t\t\"@tanstack/eslint-plugin-query\": \"5.83.1\",\n\t\t\"@tanstack/eslint-plugin-router\": \"1.131.2\",\n\t\t\"@total-typescript/ts-reset\": \"0.6.1\",\n\t\t\"@types/eslint-plugin-security\": \"3.0.0\",\n\t\t\"@types/node\": \"24.3.0\",\n\t\t\"@zayne-labs/tsconfig\": \"workspace:*\",\n\t\t\"astro-eslint-parser\": \"1.2.2\",\n\t\t\"concurrently\": \"9.2.1\",\n\t\t\"cross-env\": \"10.0.0\",\n\t\t\"eslint\": \"9.34.0\",\n\t\t\"eslint-config-expo\": \"^9.2.0\",\n\t\t\"eslint-plugin-astro\": \"1.3.1\",\n\t\t\"eslint-plugin-better-tailwindcss\": \"3.7.6\",\n\t\t\"eslint-plugin-depend\": \"1.2.0\",\n\t\t\"eslint-plugin-pnpm\": \"1.1.1\",\n\t\t\"eslint-plugin-react-hooks\": \"5.2.0\",\n\t\t\"eslint-plugin-react-refresh\": \"0.4.20\",\n\t\t\"eslint-plugin-solid\": \"0.14.5\",\n\t\t\"eslint-plugin-svelte\": \"3.11.0\",\n\t\t\"eslint-plugin-vue\": \"10.4.0\",\n\t\t\"eslint-processor-vue-blocks\": \"2.0.0\",\n\t\t\"eslint-typegen\": \"2.3.0\",\n\t\t\"husky\": \"9.1.7\",\n\t\t\"lint-staged\": \"16.1.5\",\n\t\t\"pkg-pr-new\": \"0.0.58\",\n\t\t\"prettier\": \"3.6.2\",\n\t\t\"publint\": \"0.3.12\",\n\t\t\"tailwindcss\": \"^4.1.12\",\n\t\t\"tsdown\": \"^0.14.2\",\n\t\t\"tsx\": \"4.20.5\",\n\t\t\"typescript\": \"5.9.2\",\n\t\t\"vue-eslint-parser\": \"10.2.0\"\n\t},\n\t\"publishConfig\": {\n\t\t\"access\": \"public\",\n\t\t\"registry\": \"https://registry.npmjs.org/\",\n\t\t\"provenance\": true\n\t}\n}\n","import { defineEnumDeep } from \"@zayne-labs/toolkit-type-helpers\";\nimport c from \"ansis\";\nimport type { ExtraLibrariesOption, FrameworkOption, PromItem } from \"./types\";\n\nexport const vscodeSettingsString = `\n // Auto fix\n // \"editor.codeActionsOnSave\": {\n // \"source.fixAll.eslint\": \"explicit\",\n // },\n\n // Enable eslint for all supported languages\n \"eslint.validate\": [\n \"javascript\",\n \"javascriptreact\",\n \"typescript\",\n \"typescriptreact\",\n \"vue\",\n \"html\",\n \"markdown\",\n \"json\",\n \"json5\",\n \"jsonc\",\n \"yaml\",\n \"toml\",\n \"xml\",\n \"gql\",\n \"graphql\",\n \"astro\",\n \"svelte\",\n \"css\",\n \"less\",\n \"scss\",\n \"postcss\"\n ]\n`;\n\nexport const frameworkOptions: Array<PromItem<FrameworkOption>> = [\n\t{\n\t\tlabel: c.green(\"Vue\"),\n\t\tvalue: \"vue\",\n\t},\n\t{\n\t\tlabel: c.cyan(\"React\"),\n\t\tvalue: \"react\",\n\t},\n\t{\n\t\tlabel: c.red(\"Svelte\"),\n\t\tvalue: \"svelte\",\n\t},\n\t{\n\t\tlabel: c.magenta(\"Astro\"),\n\t\tvalue: \"astro\",\n\t},\n\t{\n\t\tlabel: c.cyan(\"Solid\"),\n\t\tvalue: \"solid\",\n\t},\n];\n\nexport const frameworks: FrameworkOption[] = frameworkOptions.map(({ value }) => value);\n\nexport const extraOptions: Array<PromItem<ExtraLibrariesOption>> = [\n\t{\n\t\tlabel: c.cyan(\"TailwindCSS\"),\n\t\tvalue: \"tailwindcss\",\n\t},\n];\n\nexport const extra: ExtraLibrariesOption[] = extraOptions.map(({ value }) => value);\n\nexport const dependenciesMap = defineEnumDeep({\n\tastro: [\"eslint-plugin-astro\", \"astro-eslint-parser\"],\n\treact: [\"@eslint-react/eslint-plugin\", \"eslint-plugin-react-hooks\", \"eslint-plugin-react-refresh\"],\n\tsolid: [\"eslint-plugin-solid\"],\n\tsvelte: [\"eslint-plugin-svelte\", \"svelte-eslint-parser\"],\n\tvue: [\"eslint-plugin-vue\", \"eslint-processor-vue-blocks\", \"vue-eslint-parser\"],\n});\n","import { execSync } from \"node:child_process\";\n\nexport function isGitClean(): boolean {\n\ttry {\n\t\texecSync(\"git diff-index --quiet HEAD --\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function getEslintConfigContent(mainConfig: string, additionalConfigs?: string[]): string {\n\tconst additionalConfigsStr = additionalConfigs?.map((config) => `,{\\n${config}\\n}`);\n\n\treturn `\nimport { zayne } from '@zayne-labs/eslint-config'\n\nexport default zayne({\n${mainConfig}\n}${additionalConfigsStr})\n`.trimStart();\n}\n","/* eslint-disable max-depth -- Allow */\nimport fs from \"node:fs\";\nimport fsp from \"node:fs/promises\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\n// @ts-expect-error missing types\nimport parse from \"parse-gitignore\";\nimport type { PromptResult } from \"../types\";\nimport { getEslintConfigContent } from \"../utils\";\n\nexport async function updateEslintFiles(result: PromptResult): Promise<void> {\n\tconst cwd = process.cwd();\n\tconst pathESLintIgnore = path.join(cwd, \".eslintignore\");\n\tconst pathPackageJSON = path.join(cwd, \"package.json\");\n\n\tconst pkgContent = await fsp.readFile(pathPackageJSON, \"utf8\");\n\tconst pkg = JSON.parse(pkgContent) as Record<string, unknown>;\n\n\tconst configFileName = pkg.type === \"module\" ? \"eslint.config.js\" : \"eslint.config.mjs\";\n\tconst pathFlatConfig = path.join(cwd, configFileName);\n\n\tconst eslintIgnores: string[] = [];\n\n\tif (fs.existsSync(pathESLintIgnore)) {\n\t\tp.log.step(c.cyan`Migrating existing .eslintignore`);\n\t\tconst content = await fsp.readFile(pathESLintIgnore, \"utf8\");\n\t\tconst parsed = parse(content);\n\t\tconst globs = parsed.globs();\n\n\t\tfor (const glob of globs) {\n\t\t\tif (glob.type === \"ignore\") {\n\t\t\t\teslintIgnores.push(...(glob.patterns as string[]));\n\t\t\t}\n\n\t\t\tif (glob.type === \"unignore\") {\n\t\t\t\teslintIgnores.push(...(glob.patterns.map((pattern: string) => `!${pattern}`) as string[]));\n\t\t\t}\n\t\t}\n\t}\n\n\tconst configLines: string[] = [];\n\n\tif (eslintIgnores.length > 0) {\n\t\tconfigLines.push(`ignores: ${JSON.stringify(eslintIgnores)},`);\n\t}\n\n\tfor (const framework of result.frameworks) {\n\t\tconfigLines.push(`${framework}: true,`);\n\t}\n\n\tconst mainConfig = configLines.map((line) => ` ${line}`).join(\"\\n\");\n\n\tconst additionalConfig: string[] = [];\n\n\tconst eslintConfigContent: string = getEslintConfigContent(mainConfig, additionalConfig);\n\n\tawait fsp.writeFile(pathFlatConfig, eslintConfigContent);\n\n\tp.log.success(c.green`Created ${configFileName}`);\n}\n","export const versionsMap = {\n\t\"@eslint-react/eslint-plugin\": \"^1.38.4\",\n\t\"astro-eslint-parser\": \"^1.2.2\",\n\teslint: \"^9.24.0\",\n\t\"eslint-plugin-astro\": \"^1.3.1\",\n\t\"eslint-plugin-react-hooks\": \"^5.2.0\",\n\t\"eslint-plugin-react-refresh\": \"^0.4.19\",\n\t\"eslint-plugin-solid\": \"^0.14.5\",\n\t\"eslint-plugin-svelte\": \"^3.3.3\",\n\t\"svelte-eslint-parser\": \"^1.1.0\",\n};\n","import fsp from \"node:fs/promises\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\nimport { version } from \"../../../package.json\";\nimport { dependenciesMap } from \"../constants\";\nimport { versionsMap } from \"../constants-generated\";\nimport type { PromptResult } from \"../types\";\n\nexport async function updatePackageJson(result: PromptResult): Promise<void> {\n\tconst cwd = process.cwd();\n\n\tconst pathPackageJSON = path.join(cwd, \"package.json\");\n\n\tp.log.step(c.cyan`Bumping @zayne-labs/eslint-config to v${version}`);\n\n\tconst pkgContent = await fsp.readFile(pathPackageJSON, \"utf8\");\n\tconst pkg = JSON.parse(pkgContent) as Record<string, Record<string, string | undefined> | undefined>;\n\n\tpkg.devDependencies ??= {};\n\tpkg.devDependencies[\"@zayne-labs/eslint-config\"] = `^${version}`;\n\tpkg.devDependencies.eslint ??= versionsMap.eslint;\n\n\tconst addedPackages: string[] = [];\n\n\tfor (const framework of result.frameworks) {\n\t\tconst dependencies = dependenciesMap[framework];\n\n\t\t// eslint-disable-next-line ts-eslint/no-unnecessary-condition -- Allow\n\t\tif (!dependencies) continue;\n\n\t\tdependencies.forEach((dependency) => {\n\t\t\tif (!pkg.devDependencies) return;\n\n\t\t\tpkg.devDependencies[dependency] = versionsMap[dependency as keyof typeof versionsMap];\n\t\t\taddedPackages.push(dependency);\n\t\t});\n\t}\n\n\tif (addedPackages.length > 0) {\n\t\tp.note(c.dim(addedPackages.join(\", \")), \"Added packages\");\n\t}\n\n\tawait fsp.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));\n\n\tp.log.success(c.green`Changes wrote to package.json`);\n}\n","import fs from \"node:fs\";\nimport fsp from \"node:fs/promises\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport { green } from \"ansis\";\nimport { vscodeSettingsString } from \"../constants\";\nimport type { PromptResult } from \"../types\";\n\nexport async function updateVscodeSettings(result: PromptResult): Promise<void> {\n\tconst cwd = process.cwd();\n\n\tif (!result.updateVscodeSettings) return;\n\n\tconst dotVscodePath: string = path.join(cwd, \".vscode\");\n\tconst settingsPath: string = path.join(dotVscodePath, \"settings.json\");\n\n\tif (!fs.existsSync(dotVscodePath)) await fsp.mkdir(dotVscodePath, { recursive: true });\n\n\tif (!fs.existsSync(settingsPath)) {\n\t\tawait fsp.writeFile(settingsPath, `{${vscodeSettingsString}}\\n`, \"utf8\");\n\t\tp.log.success(green`Created .vscode/settings.json`);\n\t} else {\n\t\tlet settingsContent = await fsp.readFile(settingsPath, \"utf8\");\n\n\t\tsettingsContent = settingsContent.trim().replace(/\\s*\\}$/, \"\");\n\t\tsettingsContent += settingsContent.endsWith(\",\") || settingsContent.endsWith(\"{\") ? \"\" : \",\";\n\t\tsettingsContent += `${vscodeSettingsString}}\\n`;\n\n\t\tawait fsp.writeFile(settingsPath, settingsContent, \"utf8\");\n\t\tp.log.success(green`Updated .vscode/settings.json`);\n\t}\n}\n","/* eslint-disable perfectionist/sort-objects -- Ignore */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\nimport { extra, extraOptions, frameworkOptions, frameworks } from \"./constants\";\nimport { updateEslintFiles } from \"./stages/update-eslint-files\";\nimport { updatePackageJson } from \"./stages/update-package-json\";\nimport { updateVscodeSettings } from \"./stages/update-vscode-settings\";\nimport type { ExtraLibrariesOption, FrameworkOption, PromptResult } from \"./types\";\nimport { isGitClean } from \"./utils\";\n\nexport type CliRunOptions = {\n\t/**\n\t * Use the extra utils: formatter / perfectionist / unocss\n\t */\n\textra?: string[];\n\t/**\n\t * Use the framework template for optimal customization: vue / react / svelte / astro\n\t */\n\tframeworks?: string[];\n\t/**\n\t * Skip prompts and use default values\n\t */\n\tyes?: boolean;\n};\n\nexport async function run(options: CliRunOptions = {}): Promise<void> {\n\tconst argSkipPrompt = Boolean(process.env.SKIP_PROMPT) || options.yes;\n\tconst argTemplate = options.frameworks?.map((m) => m.trim()).filter(Boolean);\n\tconst argExtra = options.extra?.map((m) => m.trim()).filter(Boolean);\n\n\tif (fs.existsSync(path.join(process.cwd(), \"eslint.config.js\"))) {\n\t\tp.log.warn(c.yellow`eslint.config.js already exists, migration wizard exited.`);\n\n\t\treturn process.exit(1);\n\t}\n\n\t// Set default value for promptResult if `argSkipPrompt` is enabled\n\tlet result: PromptResult = {\n\t\textra: (argExtra ?? []) as ExtraLibrariesOption[],\n\t\tframeworks: (argTemplate ?? []) as FrameworkOption[],\n\t\tuncommittedConfirmed: false,\n\t\tupdateVscodeSettings: true,\n\t};\n\n\tif (!argSkipPrompt) {\n\t\tresult = (await p.group(\n\t\t\t{\n\t\t\t\tuncommittedConfirmed: () => {\n\t\t\t\t\tif (isGitClean()) {\n\t\t\t\t\t\treturn Promise.resolve(true);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn p.confirm({\n\t\t\t\t\t\tinitialValue: false,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"There are uncommitted changes in the current repository, are you sure to continue?\",\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\tframeworks: ({ results }) => {\n\t\t\t\t\tconst isArgTemplateValid =\n\t\t\t\t\t\t(argTemplate?.length ?? 0) > 0\n\t\t\t\t\t\t&& (argTemplate ?? []).filter((element) => !frameworks.includes(element)).length === 0;\n\n\t\t\t\t\tif (!results.uncommittedConfirmed || isArgTemplateValid) return;\n\n\t\t\t\t\tconst message =\n\t\t\t\t\t\targTemplate ?\n\t\t\t\t\t\t\t`\"${argTemplate}\" isn't a valid template. Please choose from below: `\n\t\t\t\t\t\t:\t\"Select a framework:\";\n\n\t\t\t\t\treturn p.multiselect<FrameworkOption>({\n\t\t\t\t\t\tmessage: c.reset(message),\n\t\t\t\t\t\toptions: frameworkOptions,\n\t\t\t\t\t\trequired: false,\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\textra: ({ results }) => {\n\t\t\t\t\tconst isArgExtraValid =\n\t\t\t\t\t\t(argExtra?.length ?? 0) > 0\n\t\t\t\t\t\t&& (argExtra ?? []).filter((element) => !extra.includes(element)).length === 0;\n\n\t\t\t\t\tif (!results.uncommittedConfirmed || isArgExtraValid) return;\n\n\t\t\t\t\tconst message =\n\t\t\t\t\t\targExtra ?\n\t\t\t\t\t\t\t`\"${argExtra}\" isn't a valid extra util. Please choose from below: `\n\t\t\t\t\t\t:\t\"Select a extra utils:\";\n\n\t\t\t\t\treturn p.multiselect<ExtraLibrariesOption>({\n\t\t\t\t\t\tmessage: c.reset(message),\n\t\t\t\t\t\toptions: extraOptions,\n\t\t\t\t\t\trequired: false,\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\tupdateVscodeSettings: ({ results }) => {\n\t\t\t\t\tif (!results.uncommittedConfirmed) return;\n\n\t\t\t\t\treturn p.confirm({\n\t\t\t\t\t\tinitialValue: true,\n\t\t\t\t\t\tmessage: \"Update .vscode/settings.json for better VS Code experience?\",\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tonCancel: () => {\n\t\t\t\t\tp.cancel(\"Operation cancelled.\");\n\t\t\t\t\tprocess.exit(0);\n\t\t\t\t},\n\t\t\t}\n\t\t)) as PromptResult;\n\n\t\tif (!result.uncommittedConfirmed) {\n\t\t\treturn process.exit(1);\n\t\t}\n\t}\n\n\tawait updatePackageJson(result);\n\tawait updateEslintFiles(result);\n\tawait updateVscodeSettings(result);\n\n\tp.log.success(c.green`Setup completed`);\n\n\tp.outro(\n\t\t`Now you can update the dependencies by running ${c.blue(\"pnpm install\")} and also ${c.blue(\"eslint --fix\")}\\n`\n\t);\n}\n","import process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\nimport { cac } from \"cac\";\nimport { version } from \"../../package.json\";\nimport { type CliRunOptions, run } from \"./run\";\n\nfunction header(): void {\n\tp.intro(`${c.green`@zayne-labs/eslint-config `}${c.dim`v${version}`}`);\n}\n\nconst cli = cac(\"@zayne-labs/eslint-config\");\n\ncli.command(\"\", \"Run the initialization or migration\")\n\t.option(\"--yes, -y\", \"Skip prompts and use default values\", { default: false })\n\t.option(\n\t\t\"--template, -t <template>\",\n\t\t\"Use the framework template for optimal customization: vue / react / svelte / astro\",\n\t\t{ type: [] }\n\t)\n\t.option(\"--extra, -e <extra>\", \"Use the extra utils: perfectionist / tailwindcss\", { type: [] })\n\t.action(async (options: CliRunOptions) => {\n\t\theader();\n\t\ttry {\n\t\t\tawait run(options);\n\t\t} catch (error) {\n\t\t\tp.log.error(c.inverse.red(\" Failed to migrate \"));\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,EAAE,KAAK;AAErB,GAAE,MACD,kDAAkD,EAAE,KAAK,gBAAgB,YAAY,EAAE,KAAK,gBAAgB;;;;;AC1H9G,SAAS,SAAe;AACvB,GAAE,MAAM,GAAG,EAAE,KAAK,+BAA+B,EAAE,GAAG,IAAI;;AAG3D,MAAM,MAAM,IAAI;AAEhB,IAAI,QAAQ,IAAI,uCACd,OAAO,aAAa,uCAAuC,EAAE,SAAS,SACtE,OACA,6BACA,sFACA,EAAE,MAAM,MAER,OAAO,uBAAuB,oDAAoD,EAAE,MAAM,MAC1F,OAAO,OAAO,YAA2B;AACzC;AACA,KAAI;AACH,QAAM,IAAI;UACF,OAAO;AACf,IAAE,IAAI,MAAM,EAAE,QAAQ,IAAI;AAC1B,IAAE,IAAI,MAAM,EAAE,GAAG,KAAK,OAAO;AAC7B,UAAQ,KAAK;;;AAIhB,IAAI;AACJ,IAAI,QAAQ;AACZ,IAAI"}
1
+ {"version":3,"file":"index.js","names":["frameworkOptions: Array<PromItem<FrameworkOptionUnion>>","frameworks: FrameworkOptionUnion[]","extraOptions: Array<PromItem<ExtraLibrariesOptionUnion>>","eslintIgnores: string[]","configLines: string[]","additionalConfig: string[]","eslintConfigContent: string","addedPackages: string[]","dotVscodePath: string","settingsPath: string","result: PromptResult"],"sources":["../../package.json","../../src/cli/constants.ts","../../src/cli/utils.ts","../../src/cli/stages/update-eslint-files.ts","../../src/cli/constants-generated.ts","../../src/cli/stages/update-package-json.ts","../../src/cli/stages/update-vscode-settings.ts","../../src/cli/run.ts","../../src/cli/index.ts"],"sourcesContent":["{\n\t\"name\": \"@zayne-labs/eslint-config\",\n\t\"type\": \"module\",\n\t\"version\": \"0.9.14\",\n\t\"description\": \"Zayne Labs' ESLint config preset\",\n\t\"author\": \"Ryan Zayne\",\n\t\"license\": \"MIT\",\n\t\"homepage\": \"https://github.com/zayne-labs/config#readme\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git+https://github.com/zayne-labs/config.git\"\n\t},\n\t\"bugs\": {\n\t\t\"url\": \"https://github.com/zayne-labs/config/issues\"\n\t},\n\t\"keywords\": [],\n\t\"sideEffects\": false,\n\t\"exports\": {\n\t\t\".\": \"./dist/index.js\"\n\t},\n\t\"bin\": \"./bin/index.js\",\n\t\"files\": [\n\t\t\"bin\",\n\t\t\"dist\"\n\t],\n\t\"engines\": {\n\t\t\"node\": \">=18.x\"\n\t},\n\t\"scripts\": {\n\t\t\"build\": \"pnpm typegen && tsdown\",\n\t\t\"build:dev\": \"pnpm typegen && cross-env NODE_ENV=development tsdown\",\n\t\t\"dev\": \"pnpm build:dev --watch\",\n\t\t\"lint:attw\": \"attw --pack . --ignore-rules=cjs-resolves-to-esm\",\n\t\t\"lint:eslint\": \"eslint . --max-warnings 0\",\n\t\t\"lint:format\": \"prettier --write .\",\n\t\t\"lint:packages\": \"pnpm dedupe --check\",\n\t\t\"lint:publint\": \"publint --strict .\",\n\t\t\"lint:type-check\": \"pnpm typegen && tsc --pretty -p tsconfig.json\",\n\t\t\"release\": \"pnpm publish --no-git-checks\",\n\t\t\"release:test\": \"pnpx pkg-pr-new publish\",\n\t\t\"typegen\": \"tsx scripts/typegen.ts\",\n\t\t\"version-package\": \"changeset version\"\n\t},\n\t\"peerDependencies\": {\n\t\t\"@eslint-react/eslint-plugin\": \">=1.15.0\",\n\t\t\"@next/eslint-plugin-next\": \">=14.2.15\",\n\t\t\"@tanstack/eslint-plugin-query\": \">=5.59.7\",\n\t\t\"@tanstack/eslint-plugin-router\": \">=1.120.17\",\n\t\t\"astro-eslint-parser\": \">=1.0.2\",\n\t\t\"eslint\": \">=9.12.0\",\n\t\t\"eslint-config-expo\": \">=9.2.0\",\n\t\t\"eslint-plugin-astro\": \">=1.2.0\",\n\t\t\"eslint-plugin-better-tailwindcss\": \">=3.2.0\",\n\t\t\"eslint-plugin-depend\": \">=1.2.0\",\n\t\t\"eslint-plugin-pnpm\": \">=0.3.1\",\n\t\t\"eslint-plugin-react-hooks\": \">=5.0.0\",\n\t\t\"eslint-plugin-react-refresh\": \">=0.4.12\",\n\t\t\"eslint-plugin-solid\": \">=0.14.3\",\n\t\t\"eslint-plugin-svelte\": \">=2.35.1\",\n\t\t\"eslint-plugin-vue\": \">=9.28.0\",\n\t\t\"eslint-processor-vue-blocks\": \">=0.1.2\",\n\t\t\"vue-eslint-parser\": \">=9.4.3\"\n\t},\n\t\"peerDependenciesMeta\": {\n\t\t\"@eslint-react/eslint-plugin\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"@next/eslint-plugin-next\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"@tanstack/eslint-plugin-query\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"@tanstack/eslint-plugin-router\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"astro-eslint-parser\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-config-expo\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-astro\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-better-tailwindcss\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-depend\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-pnpm\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-react-hooks\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-react-refresh\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-solid\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-svelte\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-plugin-vue\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"eslint-processor-vue-blocks\": {\n\t\t\t\"optional\": true\n\t\t},\n\t\t\"vue-eslint-parser\": {\n\t\t\t\"optional\": true\n\t\t}\n\t},\n\t\"dependencies\": {\n\t\t\"@antfu/install-pkg\": \"1.1.0\",\n\t\t\"@clack/prompts\": \"0.11.0\",\n\t\t\"@eslint-community/eslint-plugin-eslint-comments\": \"4.5.0\",\n\t\t\"@eslint/compat\": \"1.3.2\",\n\t\t\"@eslint/js\": \"9.34.0\",\n\t\t\"@stylistic/eslint-plugin\": \"5.2.3\",\n\t\t\"@zayne-labs/toolkit-type-helpers\": \"0.10.9\",\n\t\t\"ansis\": \"4.1.0\",\n\t\t\"cac\": \"6.7.14\",\n\t\t\"eslint-config-flat-gitignore\": \"2.1.0\",\n\t\t\"eslint-flat-config-utils\": \"2.1.1\",\n\t\t\"eslint-import-resolver-typescript\": \"4.4.4\",\n\t\t\"eslint-merge-processors\": \"^2.0.0\",\n\t\t\"eslint-plugin-import-x\": \"4.16.1\",\n\t\t\"eslint-plugin-jsdoc\": \"54.1.1\",\n\t\t\"eslint-plugin-jsonc\": \"2.20.1\",\n\t\t\"eslint-plugin-n\": \"17.21.3\",\n\t\t\"eslint-plugin-perfectionist\": \"4.15.0\",\n\t\t\"eslint-plugin-security\": \"3.0.1\",\n\t\t\"eslint-plugin-toml\": \"^0.12.0\",\n\t\t\"eslint-plugin-unicorn\": \"60.0.0\",\n\t\t\"eslint-plugin-yml\": \"^1.17.0\",\n\t\t\"globals\": \"16.3.0\",\n\t\t\"jsonc-eslint-parser\": \"2.4.0\",\n\t\t\"local-pkg\": \"1.1.2\",\n\t\t\"parse-gitignore\": \"2.0.0\",\n\t\t\"toml-eslint-parser\": \"0.10.0\",\n\t\t\"typescript-eslint\": \"8.41.0\",\n\t\t\"yaml-eslint-parser\": \"1.3.0\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@arethetypeswrong/cli\": \"0.18.2\",\n\t\t\"@changesets/cli\": \"2.29.6\",\n\t\t\"@eslint-react/eslint-plugin\": \"1.52.7\",\n\t\t\"@next/eslint-plugin-next\": \"15.5.2\",\n\t\t\"@tanstack/eslint-plugin-query\": \"5.83.1\",\n\t\t\"@tanstack/eslint-plugin-router\": \"1.131.2\",\n\t\t\"@total-typescript/ts-reset\": \"0.6.1\",\n\t\t\"@types/eslint-plugin-security\": \"3.0.0\",\n\t\t\"@types/node\": \"24.3.0\",\n\t\t\"@zayne-labs/tsconfig\": \"workspace:*\",\n\t\t\"astro-eslint-parser\": \"1.2.2\",\n\t\t\"concurrently\": \"9.2.1\",\n\t\t\"cross-env\": \"10.0.0\",\n\t\t\"eslint\": \"9.34.0\",\n\t\t\"eslint-config-expo\": \"^9.2.0\",\n\t\t\"eslint-plugin-astro\": \"1.3.1\",\n\t\t\"eslint-plugin-better-tailwindcss\": \"3.7.6\",\n\t\t\"eslint-plugin-depend\": \"1.2.0\",\n\t\t\"eslint-plugin-pnpm\": \"1.1.1\",\n\t\t\"eslint-plugin-react-hooks\": \"5.2.0\",\n\t\t\"eslint-plugin-react-refresh\": \"0.4.20\",\n\t\t\"eslint-plugin-solid\": \"0.14.5\",\n\t\t\"eslint-plugin-svelte\": \"3.11.0\",\n\t\t\"eslint-plugin-vue\": \"10.4.0\",\n\t\t\"eslint-processor-vue-blocks\": \"2.0.0\",\n\t\t\"eslint-typegen\": \"2.3.0\",\n\t\t\"husky\": \"9.1.7\",\n\t\t\"lint-staged\": \"16.1.5\",\n\t\t\"pkg-pr-new\": \"0.0.58\",\n\t\t\"prettier\": \"3.6.2\",\n\t\t\"publint\": \"0.3.12\",\n\t\t\"tailwindcss\": \"^4.1.12\",\n\t\t\"tsdown\": \"^0.14.2\",\n\t\t\"tsx\": \"4.20.5\",\n\t\t\"typescript\": \"5.9.2\",\n\t\t\"vue-eslint-parser\": \"10.2.0\"\n\t},\n\t\"publishConfig\": {\n\t\t\"access\": \"public\",\n\t\t\"registry\": \"https://registry.npmjs.org/\",\n\t\t\"provenance\": true\n\t}\n}\n","import { defineEnumDeep } from \"@zayne-labs/toolkit-type-helpers\";\nimport c from \"ansis\";\nimport type { ExtraLibrariesOptionUnion, FrameworkOptionUnion, PromItem } from \"./types\";\n\nexport const vscodeSettingsString = `\n // Auto fix\n // \"editor.codeActionsOnSave\": {\n // \"source.fixAll.eslint\": \"explicit\",\n // },\n\n // Enable eslint for all supported languages\n \"eslint.validate\": [\n \"javascript\",\n \"javascriptreact\",\n \"typescript\",\n \"typescriptreact\",\n \"vue\",\n \"html\",\n \"markdown\",\n \"json\",\n \"json5\",\n \"jsonc\",\n \"yaml\",\n \"toml\",\n \"xml\",\n \"gql\",\n \"graphql\",\n \"astro\",\n \"svelte\",\n \"css\",\n \"less\",\n \"scss\",\n \"postcss\"\n ]\n`;\n\nexport const frameworkOptions: Array<PromItem<FrameworkOptionUnion>> = [\n\t{\n\t\tlabel: c.green(\"Vue\"),\n\t\tvalue: \"vue\",\n\t},\n\t{\n\t\tlabel: c.cyan(\"React\"),\n\t\tvalue: \"react\",\n\t},\n\t{\n\t\tlabel: c.red(\"Svelte\"),\n\t\tvalue: \"svelte\",\n\t},\n\t{\n\t\tlabel: c.magenta(\"Astro\"),\n\t\tvalue: \"astro\",\n\t},\n\t{\n\t\tlabel: c.cyan(\"Solid\"),\n\t\tvalue: \"solid\",\n\t},\n];\n\nexport const frameworks: FrameworkOptionUnion[] = frameworkOptions.map(({ value }) => value);\n\nexport const extraOptions: Array<PromItem<ExtraLibrariesOptionUnion>> = [\n\t{\n\t\tlabel: c.cyan(\"TailwindCSS (Better)\"),\n\t\tvalue: \"tailwindcssBetter\",\n\t},\n];\n\nexport const extra = extraOptions.map(({ value }) => value);\n\nexport const dependenciesMap = defineEnumDeep({\n\tastro: [\"eslint-plugin-astro\", \"astro-eslint-parser\"],\n\treact: [\"@eslint-react/eslint-plugin\", \"eslint-plugin-react-hooks\", \"eslint-plugin-react-refresh\"],\n\tsolid: [\"eslint-plugin-solid\"],\n\tsvelte: [\"eslint-plugin-svelte\", \"svelte-eslint-parser\"],\n\ttailwindcssBetter: [\"eslint-plugin-better-tailwindcss\"],\n\tvue: [\"eslint-plugin-vue\", \"eslint-processor-vue-blocks\", \"vue-eslint-parser\"],\n}) satisfies Record<ExtraLibrariesOptionUnion | FrameworkOptionUnion, string[]>;\n","import { execSync } from \"node:child_process\";\n\nexport function isGitClean(): boolean {\n\ttry {\n\t\texecSync(\"git diff-index --quiet HEAD --\");\n\t\treturn true;\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nexport function getEslintConfigContent(mainConfig: string, additionalConfigs?: string[]): string {\n\tconst additionalConfigsStr = additionalConfigs?.map((config) => `,{\\n${config}\\n}`);\n\n\treturn `\nimport { zayne } from '@zayne-labs/eslint-config'\n\nexport default zayne({\n${mainConfig}\n}${additionalConfigsStr})\n`.trimStart();\n}\n","/* eslint-disable max-depth -- Allow */\nimport fs from \"node:fs\";\nimport fsp from \"node:fs/promises\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\n// @ts-expect-error missing types\nimport parse from \"parse-gitignore\";\nimport type { PromptResult } from \"../types\";\nimport { getEslintConfigContent } from \"../utils\";\n\nexport async function updateEslintFiles(result: PromptResult): Promise<void> {\n\tconst cwd = process.cwd();\n\tconst pathESLintIgnore = path.join(cwd, \".eslintignore\");\n\tconst pathPackageJSON = path.join(cwd, \"package.json\");\n\n\tconst pkgContent = await fsp.readFile(pathPackageJSON, \"utf8\");\n\tconst pkg = JSON.parse(pkgContent) as Record<string, unknown>;\n\n\tconst configFileName = pkg.type === \"module\" ? \"eslint.config.js\" : \"eslint.config.mjs\";\n\tconst pathFlatConfig = path.join(cwd, configFileName);\n\n\tconst eslintIgnores: string[] = [];\n\n\tif (fs.existsSync(pathESLintIgnore)) {\n\t\tp.log.step(c.cyan`Migrating existing .eslintignore`);\n\n\t\tconst content = await fsp.readFile(pathESLintIgnore, \"utf8\");\n\t\tconst parsed = parse(content);\n\t\tconst globs = parsed.globs();\n\n\t\tfor (const glob of globs) {\n\t\t\tif (glob.type === \"ignore\") {\n\t\t\t\teslintIgnores.push(...(glob.patterns as string[]));\n\t\t\t}\n\n\t\t\tif (glob.type === \"unignore\") {\n\t\t\t\teslintIgnores.push(...(glob.patterns.map((pattern: string) => `!${pattern}`) as string[]));\n\t\t\t}\n\t\t}\n\t}\n\n\tconst configLines: string[] = [];\n\n\tif (eslintIgnores.length > 0) {\n\t\tconfigLines.push(`ignores: ${JSON.stringify(eslintIgnores)},`);\n\t}\n\n\tif (result.extra.includes(\"tailwindcssBetter\")) {\n\t\tconfigLines.push(`tailwindcssBetter: true,`);\n\t}\n\n\tfor (const framework of result.frameworks) {\n\t\tconfigLines.push(`${framework}: true,`);\n\t}\n\n\tconst mainConfig = configLines.map((line) => ` ${line}`).join(\"\\n\");\n\n\tconst additionalConfig: string[] = [];\n\n\tconst eslintConfigContent: string = getEslintConfigContent(mainConfig, additionalConfig);\n\n\tawait fsp.writeFile(pathFlatConfig, eslintConfigContent);\n\n\tp.log.success(c.green`Created ${configFileName}`);\n}\n","export const versionsMap = {\n\t\"@eslint-react/eslint-plugin\": \"^1.38.4\",\n\t\"astro-eslint-parser\": \"^1.2.2\",\n\teslint: \"^9.24.0\",\n\t\"eslint-plugin-astro\": \"^1.3.1\",\n\t\"eslint-plugin-better-tailwindcss\": \"^3.7.6\",\n\t\"eslint-plugin-react-hooks\": \"^5.2.0\",\n\t\"eslint-plugin-react-refresh\": \"^0.4.19\",\n\t\"eslint-plugin-solid\": \"^0.14.5\",\n\t\"eslint-plugin-svelte\": \"^3.3.3\",\n\t\"svelte-eslint-parser\": \"^1.1.0\",\n};\n","import fsp from \"node:fs/promises\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\nimport { version } from \"../../../package.json\";\nimport { dependenciesMap } from \"../constants\";\nimport { versionsMap } from \"../constants-generated\";\nimport type { PromptResult } from \"../types\";\n\nexport async function updatePackageJson(result: PromptResult): Promise<void> {\n\tconst cwd = process.cwd();\n\n\tconst pathPackageJSON = path.join(cwd, \"package.json\");\n\n\tp.log.step(c.cyan`Bumping @zayne-labs/eslint-config to v${version}`);\n\n\tconst pkgContent = await fsp.readFile(pathPackageJSON, \"utf8\");\n\tconst pkg = JSON.parse(pkgContent) as Record<string, Record<string, string | undefined> | undefined>;\n\n\tpkg.devDependencies ??= {};\n\tpkg.devDependencies[\"@zayne-labs/eslint-config\"] = `^${version}`;\n\tpkg.devDependencies.eslint ??= versionsMap.eslint;\n\n\tconst addedPackages: string[] = [];\n\n\tfor (const item of result.extra) {\n\t\tswitch (item) {\n\t\t\t// eslint-disable-next-line ts-eslint/no-unnecessary-condition -- Ignore for now\n\t\t\tcase \"tailwindcssBetter\": {\n\t\t\t\tdependenciesMap.tailwindcssBetter.forEach((f) => {\n\t\t\t\t\tpkg.devDependencies\n\t\t\t\t\t\t&& (pkg.devDependencies[f] = versionsMap[f as keyof typeof versionsMap]);\n\n\t\t\t\t\taddedPackages.push(f);\n\t\t\t\t});\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdefault: {\n\t\t\t\titem satisfies never;\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (const framework of result.frameworks) {\n\t\tconst dependencies = dependenciesMap[framework];\n\n\t\t// eslint-disable-next-line ts-eslint/no-unnecessary-condition -- Allow\n\t\tif (!dependencies) continue;\n\n\t\tdependencies.forEach((dependency) => {\n\t\t\tif (!pkg.devDependencies) return;\n\n\t\t\tpkg.devDependencies[dependency] = versionsMap[dependency as keyof typeof versionsMap];\n\t\t\taddedPackages.push(dependency);\n\t\t});\n\t}\n\n\tif (addedPackages.length > 0) {\n\t\tp.note(c.dim(addedPackages.join(\", \")), \"Added packages\");\n\t}\n\n\tawait fsp.writeFile(pathPackageJSON, JSON.stringify(pkg, null, 2));\n\n\tp.log.success(c.green`Changes wrote to package.json`);\n}\n","import fs from \"node:fs\";\nimport fsp from \"node:fs/promises\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport { green } from \"ansis\";\nimport { vscodeSettingsString } from \"../constants\";\nimport type { PromptResult } from \"../types\";\n\nexport async function updateVscodeSettings(result: PromptResult): Promise<void> {\n\tconst cwd = process.cwd();\n\n\tif (!result.updateVscodeSettings) return;\n\n\tconst dotVscodePath: string = path.join(cwd, \".vscode\");\n\tconst settingsPath: string = path.join(dotVscodePath, \"settings.json\");\n\n\tif (!fs.existsSync(dotVscodePath)) await fsp.mkdir(dotVscodePath, { recursive: true });\n\n\tif (!fs.existsSync(settingsPath)) {\n\t\tawait fsp.writeFile(settingsPath, `{${vscodeSettingsString}}\\n`, \"utf8\");\n\t\tp.log.success(green`Created .vscode/settings.json`);\n\t} else {\n\t\tlet settingsContent = await fsp.readFile(settingsPath, \"utf8\");\n\n\t\tsettingsContent = settingsContent.trim().replace(/\\s*\\}$/, \"\");\n\t\tsettingsContent += settingsContent.endsWith(\",\") || settingsContent.endsWith(\"{\") ? \"\" : \",\";\n\t\tsettingsContent += `${vscodeSettingsString}}\\n`;\n\n\t\tawait fsp.writeFile(settingsPath, settingsContent, \"utf8\");\n\t\tp.log.success(green`Updated .vscode/settings.json`);\n\t}\n}\n","/* eslint-disable perfectionist/sort-objects -- Ignore */\nimport fs from \"node:fs\";\nimport path from \"node:path\";\nimport process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\nimport { extra, extraOptions, frameworkOptions, frameworks } from \"./constants\";\nimport { updateEslintFiles } from \"./stages/update-eslint-files\";\nimport { updatePackageJson } from \"./stages/update-package-json\";\nimport { updateVscodeSettings } from \"./stages/update-vscode-settings\";\nimport type { ExtraLibrariesOptionUnion, FrameworkOptionUnion, PromptResult } from \"./types\";\nimport { isGitClean } from \"./utils\";\n\nexport type CliRunOptions = {\n\t/**\n\t * Use the extra utils: formatter / perfectionist / unocss\n\t */\n\textra?: string[];\n\t/**\n\t * Use the framework template for optimal customization: vue / react / svelte / astro\n\t */\n\tframeworks?: string[];\n\t/**\n\t * Skip prompts and use default values\n\t */\n\tyes?: boolean;\n};\n\nexport async function run(options: CliRunOptions = {}): Promise<void> {\n\tconst argSkipPrompt = Boolean(process.env.SKIP_PROMPT) || options.yes;\n\tconst argTemplate = options.frameworks?.map((m) => m.trim()).filter(Boolean);\n\tconst argExtra = options.extra?.map((m) => m.trim()).filter(Boolean);\n\n\tif (fs.existsSync(path.join(process.cwd(), \"eslint.config.js\"))) {\n\t\tp.log.warn(c.yellow`eslint.config.js already exists, migration wizard exited.`);\n\n\t\treturn process.exit(1);\n\t}\n\n\t// Set default value for promptResult if `argSkipPrompt` is enabled\n\tlet result: PromptResult = {\n\t\textra: (argExtra ?? []) as ExtraLibrariesOptionUnion[],\n\t\tframeworks: (argTemplate ?? []) as FrameworkOptionUnion[],\n\t\tuncommittedConfirmed: false,\n\t\tupdateVscodeSettings: true,\n\t};\n\n\tif (!argSkipPrompt) {\n\t\tresult = (await p.group(\n\t\t\t{\n\t\t\t\tuncommittedConfirmed: () => {\n\t\t\t\t\tif (isGitClean()) {\n\t\t\t\t\t\treturn Promise.resolve(true);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn p.confirm({\n\t\t\t\t\t\tinitialValue: false,\n\t\t\t\t\t\tmessage:\n\t\t\t\t\t\t\t\"There are uncommitted changes in the current repository, are you sure to continue?\",\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\tframeworks: ({ results }) => {\n\t\t\t\t\tconst isArgTemplateValid =\n\t\t\t\t\t\t(argTemplate?.length ?? 0) > 0\n\t\t\t\t\t\t&& (argTemplate ?? []).filter((element) => !frameworks.includes(element)).length === 0;\n\n\t\t\t\t\tif (!results.uncommittedConfirmed || isArgTemplateValid) return;\n\n\t\t\t\t\tconst message =\n\t\t\t\t\t\targTemplate ?\n\t\t\t\t\t\t\t`\"${argTemplate}\" isn't a valid template. Please choose from below: `\n\t\t\t\t\t\t:\t\"Select a framework:\";\n\n\t\t\t\t\treturn p.multiselect<FrameworkOptionUnion>({\n\t\t\t\t\t\tmessage: c.reset(message),\n\t\t\t\t\t\toptions: frameworkOptions,\n\t\t\t\t\t\trequired: false,\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\textra: ({ results }) => {\n\t\t\t\t\tconst isArgExtraValid =\n\t\t\t\t\t\t(argExtra?.length ?? 0) > 0\n\t\t\t\t\t\t&& (argExtra ?? []).filter((element) => !extra.includes(element)).length === 0;\n\n\t\t\t\t\tif (!results.uncommittedConfirmed || isArgExtraValid) return;\n\n\t\t\t\t\tconst message =\n\t\t\t\t\t\targExtra ?\n\t\t\t\t\t\t\t`\"${argExtra}\" isn't a valid extra util. Please choose from below: `\n\t\t\t\t\t\t:\t\"Select an extra util:\";\n\n\t\t\t\t\treturn p.multiselect<ExtraLibrariesOptionUnion>({\n\t\t\t\t\t\tmessage: c.reset(message),\n\t\t\t\t\t\toptions: extraOptions,\n\t\t\t\t\t\trequired: false,\n\t\t\t\t\t});\n\t\t\t\t},\n\n\t\t\t\tupdateVscodeSettings: ({ results }) => {\n\t\t\t\t\tif (!results.uncommittedConfirmed) return;\n\n\t\t\t\t\treturn p.confirm({\n\t\t\t\t\t\tinitialValue: true,\n\t\t\t\t\t\tmessage: \"Update .vscode/settings.json for better VS Code experience?\",\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tonCancel: () => {\n\t\t\t\t\tp.cancel(\"Operation cancelled.\");\n\t\t\t\t\tprocess.exit(0);\n\t\t\t\t},\n\t\t\t}\n\t\t)) as PromptResult;\n\n\t\tif (!result.uncommittedConfirmed) {\n\t\t\treturn process.exit(1);\n\t\t}\n\t}\n\n\tawait updatePackageJson(result);\n\tawait updateEslintFiles(result);\n\tawait updateVscodeSettings(result);\n\n\tp.log.success(c.green`Setup completed`);\n\n\tp.outro(\n\t\t`Now you can update the dependencies by running ${c.blue(\"pnpm install\")} and also ${c.blue(\"eslint --fix\")}\\n`\n\t);\n}\n","import process from \"node:process\";\nimport * as p from \"@clack/prompts\";\nimport c from \"ansis\";\nimport { cac } from \"cac\";\nimport { version } from \"../../package.json\";\nimport { type CliRunOptions, run } from \"./run\";\n\nfunction header(): void {\n\tp.intro(`${c.green`@zayne-labs/eslint-config `}${c.dim`v${version}`}`);\n}\n\nconst cli = cac(\"@zayne-labs/eslint-config\");\n\ncli.command(\"\", \"Run the initialization or migration\")\n\t.option(\"--yes, -y\", \"Skip prompts and use default values\", { default: false })\n\t.option(\n\t\t\"--template, -t <template>\",\n\t\t\"Use the framework template for optimal customization: vue / react / svelte / astro\",\n\t\t{ type: [] }\n\t)\n\t.option(\"--extra, -e <extra>\", \"Use the extra utils: perfectionist / tailwindcss\", { type: [] })\n\t.action(async (options: CliRunOptions) => {\n\t\theader();\n\t\ttry {\n\t\t\tawait run(options);\n\t\t} catch (error) {\n\t\t\tp.log.error(c.inverse.red(\" Failed to migrate \"));\n\t\t\tp.log.error(c.red`✘ ${String(error)}`);\n\t\t\tprocess.exit(1);\n\t\t}\n\t});\n\ncli.help();\ncli.version(version);\ncli.parse();\n"],"mappings":";;;;;;;;;;;;cAGY;;;;ACCZ,MAAa,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCpC,MAAaA,mBAA0D;CACtE;EACC,OAAO,EAAE,MAAM;EACf,OAAO;;CAER;EACC,OAAO,EAAE,KAAK;EACd,OAAO;;CAER;EACC,OAAO,EAAE,IAAI;EACb,OAAO;;CAER;EACC,OAAO,EAAE,QAAQ;EACjB,OAAO;;CAER;EACC,OAAO,EAAE,KAAK;EACd,OAAO;;;AAIT,MAAaC,aAAqC,iBAAiB,KAAK,EAAE,YAAY;AAEtF,MAAaC,eAA2D,CACvE;CACC,OAAO,EAAE,KAAK;CACd,OAAO;;AAIT,MAAa,QAAQ,aAAa,KAAK,EAAE,YAAY;AAErD,MAAa,kBAAkB,eAAe;CAC7C,OAAO,CAAC,uBAAuB;CAC/B,OAAO;EAAC;EAA+B;EAA6B;;CACpE,OAAO,CAAC;CACR,QAAQ,CAAC,wBAAwB;CACjC,mBAAmB,CAAC;CACpB,KAAK;EAAC;EAAqB;EAA+B;;;;;;AC1E3D,SAAgB,aAAsB;AACrC,KAAI;AACH,WAAS;AACT,SAAO;SACA;AACP,SAAO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dist/index.d.ts CHANGED
@@ -490,6 +490,16 @@ interface Rules {
490
490
  * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/require-description.html
491
491
  */
492
492
  'eslint-comments/require-description'?: Linter.RuleEntry<EslintCommentsRequireDescription>;
493
+ /**
494
+ * Prevents process.env from being accessed dynamically
495
+ * @see https://github.com/expo/expo/blob/main/packages/eslint-plugin-expo/docs/rules/no-dynamic-env-var.md
496
+ */
497
+ 'expo/no-dynamic-env-var'?: Linter.RuleEntry<[]>;
498
+ /**
499
+ * Disallow desctructuring of environment variables
500
+ * @see https://github.com/expo/expo/blob/main/packages/eslint-plugin-expo/docs/rules/no-env-var-destructuring.md
501
+ */
502
+ 'expo/no-env-var-destructuring'?: Linter.RuleEntry<[]>;
493
503
  /**
494
504
  * Enforce `for` loop update clause moving the counter in the right direction
495
505
  * @see https://eslint.org/docs/latest/rules/for-direction
@@ -1491,106 +1501,106 @@ interface Rules {
1491
1501
  * Enforce font-display behavior with Google Fonts.
1492
1502
  * @see https://nextjs.org/docs/messages/google-font-display
1493
1503
  */
1494
- 'nextjs-next/google-font-display'?: Linter.RuleEntry<[]>;
1504
+ 'nextjs/google-font-display'?: Linter.RuleEntry<[]>;
1495
1505
  /**
1496
1506
  * Ensure `preconnect` is used with Google Fonts.
1497
1507
  * @see https://nextjs.org/docs/messages/google-font-preconnect
1498
1508
  */
1499
- 'nextjs-next/google-font-preconnect'?: Linter.RuleEntry<[]>;
1509
+ 'nextjs/google-font-preconnect'?: Linter.RuleEntry<[]>;
1500
1510
  /**
1501
1511
  * Enforce `id` attribute on `next/script` components with inline content.
1502
1512
  * @see https://nextjs.org/docs/messages/inline-script-id
1503
1513
  */
1504
- 'nextjs-next/inline-script-id'?: Linter.RuleEntry<[]>;
1514
+ 'nextjs/inline-script-id'?: Linter.RuleEntry<[]>;
1505
1515
  /**
1506
1516
  * Prefer `next/script` component when using the inline script for Google Analytics.
1507
1517
  * @see https://nextjs.org/docs/messages/next-script-for-ga
1508
1518
  */
1509
- 'nextjs-next/next-script-for-ga'?: Linter.RuleEntry<[]>;
1519
+ 'nextjs/next-script-for-ga'?: Linter.RuleEntry<[]>;
1510
1520
  /**
1511
1521
  * Prevent assignment to the `module` variable.
1512
1522
  * @see https://nextjs.org/docs/messages/no-assign-module-variable
1513
1523
  */
1514
- 'nextjs-next/no-assign-module-variable'?: Linter.RuleEntry<[]>;
1524
+ 'nextjs/no-assign-module-variable'?: Linter.RuleEntry<[]>;
1515
1525
  /**
1516
1526
  * Prevent Client Components from being async functions.
1517
1527
  * @see https://nextjs.org/docs/messages/no-async-client-component
1518
1528
  */
1519
- 'nextjs-next/no-async-client-component'?: Linter.RuleEntry<[]>;
1529
+ 'nextjs/no-async-client-component'?: Linter.RuleEntry<[]>;
1520
1530
  /**
1521
1531
  * Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.
1522
1532
  * @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
1523
1533
  */
1524
- 'nextjs-next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>;
1534
+ 'nextjs/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>;
1525
1535
  /**
1526
1536
  * Prevent manual stylesheet tags.
1527
1537
  * @see https://nextjs.org/docs/messages/no-css-tags
1528
1538
  */
1529
- 'nextjs-next/no-css-tags'?: Linter.RuleEntry<[]>;
1539
+ 'nextjs/no-css-tags'?: Linter.RuleEntry<[]>;
1530
1540
  /**
1531
1541
  * Prevent importing `next/document` outside of `pages/_document.js`.
1532
1542
  * @see https://nextjs.org/docs/messages/no-document-import-in-page
1533
1543
  */
1534
- 'nextjs-next/no-document-import-in-page'?: Linter.RuleEntry<[]>;
1544
+ 'nextjs/no-document-import-in-page'?: Linter.RuleEntry<[]>;
1535
1545
  /**
1536
1546
  * Prevent duplicate usage of `<Head>` in `pages/_document.js`.
1537
1547
  * @see https://nextjs.org/docs/messages/no-duplicate-head
1538
1548
  */
1539
- 'nextjs-next/no-duplicate-head'?: Linter.RuleEntry<[]>;
1549
+ 'nextjs/no-duplicate-head'?: Linter.RuleEntry<[]>;
1540
1550
  /**
1541
1551
  * Prevent usage of `<head>` element.
1542
1552
  * @see https://nextjs.org/docs/messages/no-head-element
1543
1553
  */
1544
- 'nextjs-next/no-head-element'?: Linter.RuleEntry<[]>;
1554
+ 'nextjs/no-head-element'?: Linter.RuleEntry<[]>;
1545
1555
  /**
1546
1556
  * Prevent usage of `next/head` in `pages/_document.js`.
1547
1557
  * @see https://nextjs.org/docs/messages/no-head-import-in-document
1548
1558
  */
1549
- 'nextjs-next/no-head-import-in-document'?: Linter.RuleEntry<[]>;
1559
+ 'nextjs/no-head-import-in-document'?: Linter.RuleEntry<[]>;
1550
1560
  /**
1551
1561
  * Prevent usage of `<a>` elements to navigate to internal Next.js pages.
1552
1562
  * @see https://nextjs.org/docs/messages/no-html-link-for-pages
1553
1563
  */
1554
- 'nextjs-next/no-html-link-for-pages'?: Linter.RuleEntry<NextjsNextNoHtmlLinkForPages>;
1564
+ 'nextjs/no-html-link-for-pages'?: Linter.RuleEntry<NextjsNoHtmlLinkForPages>;
1555
1565
  /**
1556
1566
  * Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
1557
1567
  * @see https://nextjs.org/docs/messages/no-img-element
1558
1568
  */
1559
- 'nextjs-next/no-img-element'?: Linter.RuleEntry<[]>;
1569
+ 'nextjs/no-img-element'?: Linter.RuleEntry<[]>;
1560
1570
  /**
1561
1571
  * Prevent page-only custom fonts.
1562
1572
  * @see https://nextjs.org/docs/messages/no-page-custom-font
1563
1573
  */
1564
- 'nextjs-next/no-page-custom-font'?: Linter.RuleEntry<[]>;
1574
+ 'nextjs/no-page-custom-font'?: Linter.RuleEntry<[]>;
1565
1575
  /**
1566
1576
  * Prevent usage of `next/script` in `next/head` component.
1567
1577
  * @see https://nextjs.org/docs/messages/no-script-component-in-head
1568
1578
  */
1569
- 'nextjs-next/no-script-component-in-head'?: Linter.RuleEntry<[]>;
1579
+ 'nextjs/no-script-component-in-head'?: Linter.RuleEntry<[]>;
1570
1580
  /**
1571
1581
  * Prevent usage of `styled-jsx` in `pages/_document.js`.
1572
1582
  * @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
1573
1583
  */
1574
- 'nextjs-next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>;
1584
+ 'nextjs/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>;
1575
1585
  /**
1576
1586
  * Prevent synchronous scripts.
1577
1587
  * @see https://nextjs.org/docs/messages/no-sync-scripts
1578
1588
  */
1579
- 'nextjs-next/no-sync-scripts'?: Linter.RuleEntry<[]>;
1589
+ 'nextjs/no-sync-scripts'?: Linter.RuleEntry<[]>;
1580
1590
  /**
1581
1591
  * Prevent usage of `<title>` with `Head` component from `next/document`.
1582
1592
  * @see https://nextjs.org/docs/messages/no-title-in-document-head
1583
1593
  */
1584
- 'nextjs-next/no-title-in-document-head'?: Linter.RuleEntry<[]>;
1594
+ 'nextjs/no-title-in-document-head'?: Linter.RuleEntry<[]>;
1585
1595
  /**
1586
1596
  * Prevent common typos in Next.js data fetching functions.
1587
1597
  */
1588
- 'nextjs-next/no-typos'?: Linter.RuleEntry<[]>;
1598
+ 'nextjs/no-typos'?: Linter.RuleEntry<[]>;
1589
1599
  /**
1590
1600
  * Prevent duplicate polyfills from Polyfill.io.
1591
1601
  * @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
1592
1602
  */
1593
- 'nextjs-next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>;
1603
+ 'nextjs/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>;
1594
1604
  /**
1595
1605
  * Disallow the use of `alert`, `confirm`, and `prompt`
1596
1606
  * @see https://eslint.org/docs/latest/rules/no-alert
@@ -9003,8 +9013,8 @@ type NewlineAfterVar = [] | [("never" | "always")];
9003
9013
  type NewlinePerChainedCall = [] | [{
9004
9014
  ignoreChainWithDepth?: number;
9005
9015
  }];
9006
- // ----- nextjs-next/no-html-link-for-pages -----
9007
- type NextjsNextNoHtmlLinkForPages = [] | [(string | string[])];
9016
+ // ----- nextjs/no-html-link-for-pages -----
9017
+ type NextjsNoHtmlLinkForPages = [] | [(string | string[])];
9008
9018
  // ----- no-bitwise -----
9009
9019
  type NoBitwise = [] | [{
9010
9020
  allow?: ("^" | "|" | "&" | "<<" | ">>" | ">>>" | "^=" | "|=" | "&=" | "<<=" | ">>=" | ">>>=" | "~")[];
@@ -16151,7 +16161,7 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
16151
16161
  }];
16152
16162
 
16153
16163
  // Names of all the configs
16154
- type ConfigNames = "zayne/js-eslint/setup" | "zayne/js-eslint/recommended" | "zayne/js-eslint/rules" | "zayne/unicorn/recommended" | "zayne/unicorn/rules" | "zayne/ts-eslint/type-aware-setup" | "zayne/ts-eslint/strictTypeChecked" | "zayne/ts-eslint/strictTypeChecked" | "zayne/ts-eslint/strictTypeChecked" | "zayne/ts-eslint/stylisticTypeChecked" | "zayne/ts-eslint/stylisticTypeChecked" | "zayne/ts-eslint/stylisticTypeChecked" | "zayne/ts-eslint/rules" | "zayne/ts-eslint/rules-type-aware" | "zayne/perfectionist/rules" | "zayne/stylistic/rules" | "zayne/import/setup" | "zayne/import/recommended" | "zayne/import/rules" | "zayne/jsdoc/rules" | "zayne/jsonc/setup" | "zayne/jsonc/rules" | "zayne/react/setup" | "zayne/react/setup-processor" | "zayne/react/recommended" | "zayne/react/rules" | "zayne/react/refresh" | "zayne/react/compiler" | "zayne/react/nextjs" | "zayne/node/recommended" | "zayne/node/rules" | "zayne/node/security/recommended" | "zayne/tanstack-query/recommended" | "zayne/tanstack-query/rules" | "zayne/tanstack-router/recommended" | "zayne/tanstack-router/rules" | "zayne/eslint-comments/rules" | "zayne/toml/setup" | "zayne/toml/rules" | "zayne/yaml/setup" | "zayne/yaml/rules" | "zayne/vue/setup" | "zayne/vue/setup/file-processor" | "zayne/vue/recommended" | "zayne/vue/rules" | "zayne/solid/setup" | "zayne/solid/recommended" | "zayne/solid/rules" | "zayne/pnpm/rules/package-json" | "zayne/pnpm/rules/pnpm-workspace-yaml" | "zayne/astro/setup" | "zayne/astro/recommended" | "zayne/astro/rules" | "zayne/depend/recommended" | "zayne/depend/recommended/package-json" | "zayne/tailwindcss-better/setup" | "zayne/tailwindcss-better/recommended" | "zayne/tailwindcss-better/rules" | "zayne/expo/rules";
16164
+ type ConfigNames = "zayne/js-eslint/setup" | "zayne/js-eslint/recommended" | "zayne/js-eslint/rules" | "zayne/unicorn/recommended" | "zayne/unicorn/rules" | "zayne/ts-eslint/type-aware-setup" | "zayne/ts-eslint/strictTypeChecked" | "zayne/ts-eslint/strictTypeChecked" | "zayne/ts-eslint/strictTypeChecked" | "zayne/ts-eslint/stylisticTypeChecked" | "zayne/ts-eslint/stylisticTypeChecked" | "zayne/ts-eslint/stylisticTypeChecked" | "zayne/ts-eslint/rules" | "zayne/ts-eslint/rules-type-aware" | "zayne/perfectionist/rules" | "zayne/stylistic/rules" | "zayne/import/setup" | "zayne/import/recommended" | "zayne/import/rules" | "zayne/jsdoc/rules" | "zayne/jsonc/setup" | "zayne/jsonc/rules" | "zayne/react/setup" | "zayne/react/setup-processor" | "zayne/react/recommended" | "zayne/react/rules" | "zayne/react/refresh" | "zayne/react/compiler" | "zayne/react/nextjs" | "zayne/node/recommended" | "zayne/node/rules" | "zayne/node/security/recommended" | "zayne/tanstack-query/recommended" | "zayne/tanstack-query/rules" | "zayne/tanstack-router/recommended" | "zayne/tanstack-router/rules" | "zayne/eslint-comments/rules" | "zayne/toml/setup" | "zayne/toml/rules" | "zayne/yaml/setup" | "zayne/yaml/rules" | "zayne/vue/setup" | "zayne/vue/setup/file-processor" | "zayne/vue/recommended" | "zayne/vue/rules" | "zayne/solid/setup" | "zayne/solid/recommended" | "zayne/solid/rules" | "zayne/pnpm/rules/package-json" | "zayne/pnpm/rules/pnpm-workspace-yaml" | "zayne/astro/setup" | "zayne/astro/recommended" | "zayne/astro/rules" | "zayne/depend/recommended" | "zayne/depend/recommended/package-json" | "zayne/tailwindcss-better/setup" | "zayne/tailwindcss-better/recommended" | "zayne/tailwindcss-better/rules" | "zayne/expo/recommended" | "zayne/expo/recommended" | "zayne/expo/rules";
16155
16165
  //#endregion
16156
16166
  //#region src/types/eslint-config-types/parser-options.d.ts
16157
16167
  // Some types copied from `@types/eslint` `Linter.ParserOptions`
@@ -16875,6 +16885,28 @@ declare const vue: (options?: ExtractOptions<OptionsConfig["vue"]>) => Promise<T
16875
16885
  //#region src/configs/yaml.d.ts
16876
16886
  declare const yaml: (options?: ExtractOptions<OptionsConfig["yaml"]>) => Promise<TypedFlatConfigItem[]>;
16877
16887
  //#endregion
16888
+ //#region src/constants.d.ts
16889
+ declare const defaultPluginRenameMap: {
16890
+ "@eslint-react/debug": "react-debug";
16891
+ "@eslint-react/dom": "react-dom";
16892
+ "@eslint-react/hooks-extra": "react-hooks-extra";
16893
+ "@eslint-react/naming-convention": "react-naming-convention";
16894
+ "@eslint-react/web-api": "react-web-api";
16895
+ "@eslint-react": "react";
16896
+ "@next/next": "nextjs";
16897
+ "@stylistic": "stylistic";
16898
+ "@tanstack/query": "tanstack-query";
16899
+ "@tanstack/router": "tanstack-router";
16900
+ "@typescript-eslint": "ts-eslint";
16901
+ "better-tailwindcss": "tailwindcss-better";
16902
+ "import-x": "import";
16903
+ n: "node";
16904
+ } & {
16905
+ $inferUnion: "@eslint-react/debug" | "@eslint-react/dom" | "@eslint-react/hooks-extra" | "@eslint-react/naming-convention" | "@eslint-react/web-api" | "@eslint-react" | "@next/next" | "@stylistic" | "@tanstack/query" | "@tanstack/router" | "@typescript-eslint" | "better-tailwindcss" | "import-x" | "n";
16906
+ };
16907
+ declare const allowedNextJsExportNames: string[];
16908
+ declare const allowedReactRouterExportNames: string[];
16909
+ //#endregion
16878
16910
  //#region src/factory.d.ts
16879
16911
  /**
16880
16912
  * @description Construct an array of ESLint flat config items.
@@ -16904,7 +16936,7 @@ declare const GLOB_JSON5 = "**/*.json5";
16904
16936
  declare const GLOB_JSONC = "**/*.jsonc";
16905
16937
  declare const GLOB_MARKDOWN = "**/*.md";
16906
16938
  declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
16907
- declare const GLOB_SVELTE = "**/*.svelte";
16939
+ declare const GLOB_SVELTE = "**/*.svelte?(.{js,ts})";
16908
16940
  declare const GLOB_VUE = "**/*.vue";
16909
16941
  declare const GLOB_YAML = "**/*.y?(a)ml";
16910
16942
  declare const GLOB_TOML = "**/*.toml";
@@ -16952,25 +16984,73 @@ declare const interopDefault: <TModule>(module: Awaitable<TModule>) => Promise<T
16952
16984
  */
16953
16985
  declare const renameRules: (rules: Record<string, unknown> | undefined, renameMap: Record<string, string>) => TypedFlatConfigItem["rules"] | undefined;
16954
16986
  declare const renamePlugins: (plugins: Record<string, unknown> | undefined, renameMap: Record<string, string>) => Record<string, ESLint.Plugin> | undefined;
16987
+ type OverrideConfigsOptions = {
16988
+ configArray: TypedFlatConfigItem[];
16989
+ overrides: TypedFlatConfigItem | ((config: TypedFlatConfigItem) => TypedFlatConfigItem);
16990
+ };
16955
16991
  /**
16956
- * @description - Rename plugin names a flat configs array
16992
+ * @description - Override configurations in a flat configs array with either a static config object or a function that returns a config object
16993
+ * @param options - Configuration options
16994
+ * @param options.configs - Array of flat config items to override
16995
+ * @param options.overrides - Either a config object to merge or a function that takes a config and returns overrides
16996
+ * @returns Array of merged config items with overrides applied
16997
+ *
16998
+ * @example
16999
+ * ```ts
17000
+ * import { overrideConfigs } from '@zayne-labs/eslint-config'
17001
+ *
17002
+ * // Override with static config
17003
+ * overrideConfigs({
17004
+ * configArray: existingConfigs,
17005
+ * overrides: {
17006
+ * rules: {
17007
+ * 'no-console': 'error'
17008
+ * }
17009
+ * }
17010
+ * })
17011
+ *
17012
+ * // Override with function
17013
+ * overrideConfigs({
17014
+ * configArray: existingConfigs,
17015
+ * overrides: (config) => ({
17016
+ * ...config,
17017
+ * rules: {
17018
+ * ...config.rules,
17019
+ * 'no-console': 'error'
17020
+ * }
17021
+ * })
17022
+ * })
17023
+ * ```
17024
+ */
17025
+ declare const overrideConfigs: (options: OverrideConfigsOptions) => TypedFlatConfigItem[];
17026
+ type RenamePluginInConfigsOptions = {
17027
+ configArray: OverrideConfigsOptions["configArray"];
17028
+ overrides?: OverrideConfigsOptions["overrides"];
17029
+ renameMap: Record<string, string>;
17030
+ };
17031
+ /**
17032
+ * @description - Rename plugin names and rules in a flat configs array
17033
+ *
17034
+ * @param options - Configuration options
17035
+ * @param options.configArray - Array of flat config items to process
17036
+ * @param options.overrides - Optional config overrides to apply
17037
+ * @param options.renameMap - Map of old plugin names to new names
16957
17038
  *
16958
17039
  * @example
16959
17040
  * ```ts
16960
17041
  * import { renamePluginInConfigs } from '@zayne-labs/eslint-config'
16961
17042
  * import someConfigs from './some-configs'
16962
17043
  *
16963
- * export default renamePluginInConfigs(someConfigs, {
16964
- * '@typescript-eslint': 'ts',
16965
- * 'import-x': 'import',
17044
+ * renamePluginInConfigs({
17045
+ * configArray: someConfigs,
17046
+ * renameMap: {
17047
+ * '@typescript-eslint': 'ts',
17048
+ * 'import-x': 'import',
17049
+ * }
16966
17050
  * })
16967
17051
  * ```
16968
17052
  */
16969
- declare const renamePluginInConfigs: (options: {
16970
- configs: TypedFlatConfigItem[];
16971
- overrides?: TypedFlatConfigItem;
16972
- renameMap: Record<string, string>;
16973
- }) => TypedFlatConfigItem[];
17053
+ declare const renamePluginInConfigs: (options: RenamePluginInConfigsOptions) => TypedFlatConfigItem[];
16974
17054
  declare const isPackageInScope: (name: string) => boolean;
16975
17055
  /**
16976
17056
  * @description
@@ -16984,5 +17064,5 @@ declare const isPackageInScope: (name: string) => boolean;
16984
17064
  declare const ensurePackages: (packages: Array<string | undefined>) => Promise<void>;
16985
17065
  declare const resolveOptions: <TObject>(option: boolean | TObject | undefined) => TObject;
16986
17066
  //#endregion
16987
- export { Awaitable, type ConfigNames, ExtractOptions, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLES, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsAppType, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsHasJsx, OptionsHasTypeScript, OptionsNode, OptionsOverrides, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTailwindCSS, OptionsTailwindCSSBetter, OptionsTanstack, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, Prettify, type Rules, TypedFlatConfigItem, astro, combine, comments, depend, ensurePackages, expo, gitIgnores, ignores, imports, interopDefault, isObject, isPackageInScope, javascript, jsdoc, jsonc, node, perfectionist, pnpm, react, renamePluginInConfigs, renamePlugins, renameRules, resolveOptions, solid, sortPackageJson, sortTsconfig, stylistic, tailwindcssBetter, tanstack, toml, typescript, unicorn, vue, yaml, zayne };
17067
+ export { Awaitable, type ConfigNames, ExtractOptions, GLOB_ALL_SRC, GLOB_ASTRO, GLOB_ASTRO_TS, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLES, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsAppType, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsHasJsx, OptionsHasTypeScript, OptionsNode, OptionsOverrides, OptionsReact, OptionsRegExp, OptionsStylistic, OptionsTailwindCSS, OptionsTailwindCSSBetter, OptionsTanstack, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsVue, Prettify, type Rules, TypedFlatConfigItem, allowedNextJsExportNames, allowedReactRouterExportNames, astro, combine, comments, defaultPluginRenameMap, depend, ensurePackages, expo, gitIgnores, ignores, imports, interopDefault, isObject, isPackageInScope, javascript, jsdoc, jsonc, node, overrideConfigs, perfectionist, pnpm, react, renamePluginInConfigs, renamePlugins, renameRules, resolveOptions, solid, sortPackageJson, sortTsconfig, stylistic, tailwindcssBetter, tanstack, toml, typescript, unicorn, vue, yaml, zayne };
16988
17068
  //# sourceMappingURL=index.d.ts.map