@zayne-labs/eslint-config 0.9.12 → 0.9.13
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 +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +23 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/cli/index.js
CHANGED
package/dist/cli/index.js.map
CHANGED
|
@@ -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 \"));\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,mBAAqD;CACjE;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,aAAgC,iBAAiB,KAAK,EAAE,YAAY;AAEjF,MAAaC,eAAsD,CAClE;CACC,OAAO,EAAE,KAAK;CACd,OAAO;;AAIT,MAAaC,QAAgC,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AAQ;AACZ,IAAI"}
|
|
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.13\",\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 \"));\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,mBAAqD;CACjE;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,aAAgC,iBAAiB,KAAK,EAAE,YAAY;AAEjF,MAAaC,eAAsD,CAClE;CACC,OAAO,EAAE,KAAK;CACd,OAAO;;AAIT,MAAaC,QAAgC,aAAa,KAAK,EAAE,YAAY;AAE7E,MAAa,kBAAkB,eAAe;CAC7C,OAAO,CAAC,uBAAuB;CAC/B,OAAO;EAAC;EAA+B;EAA6B;;CACpE,OAAO,CAAC;CACR,QAAQ,CAAC,wBAAwB;CACjC,KAAK;EAAC;EAAqB;EAA+B;;;;;;ACzE3D,SAAgB,aAAsB;AACrC,KAAI;AACH,WAAS;AACT,SAAO;SACA;AAC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,MAAM,UACL,WACC,IAAI,SAAS,0DACZ;AAEH,WAAO,EAAE,YAAkC;KAC1C,SAAS,EAAE,MAAM;KACjB,SAAS;KACT,UAAU;;;GAIZ,uBAAuB,EAAE,cAAc;AACtC,QAAI,CAAC,QAAQ,qBAAsB;AAEnC,WAAO,EAAE,QAAQ;KAChB,cAAc;KACd,SAAS;;;KAIZ,EACC,gBAAgB;AACf,KAAE,OAAO;AACT,WAAQ,KAAK;;AAKhB,MAAI,CAAC,OAAO,qBACX,QAAO,QAAQ,KAAK;;AAItB,OAAM,kBAAkB;AACxB,OAAM,kBAAkB;AACxB,OAAM,qBAAqB;AAE3B,GAAE,IAAI,QAAQ,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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -16875,6 +16875,28 @@ declare const vue: (options?: ExtractOptions<OptionsConfig["vue"]>) => Promise<T
|
|
|
16875
16875
|
//#region src/configs/yaml.d.ts
|
|
16876
16876
|
declare const yaml: (options?: ExtractOptions<OptionsConfig["yaml"]>) => Promise<TypedFlatConfigItem[]>;
|
|
16877
16877
|
//#endregion
|
|
16878
|
+
//#region src/constants.d.ts
|
|
16879
|
+
declare const defaultPluginRenameMap: {
|
|
16880
|
+
"@eslint-react/debug": "react-debug";
|
|
16881
|
+
"@eslint-react/dom": "react-dom";
|
|
16882
|
+
"@eslint-react/hooks-extra": "react-hooks-extra";
|
|
16883
|
+
"@eslint-react/naming-convention": "react-naming-convention";
|
|
16884
|
+
"@eslint-react/web-api": "react-web-api";
|
|
16885
|
+
"@eslint-react": "react";
|
|
16886
|
+
"@next/next": "nextjs-next";
|
|
16887
|
+
"@stylistic": "stylistic";
|
|
16888
|
+
"@tanstack/query": "tanstack-query";
|
|
16889
|
+
"@tanstack/router": "tanstack-router";
|
|
16890
|
+
"@typescript-eslint": "ts-eslint";
|
|
16891
|
+
"better-tailwindcss": "tailwindcss-better";
|
|
16892
|
+
"import-x": "import";
|
|
16893
|
+
n: "node";
|
|
16894
|
+
} & {
|
|
16895
|
+
$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";
|
|
16896
|
+
};
|
|
16897
|
+
declare const allowedNextJsExportNames: string[];
|
|
16898
|
+
declare const allowedReactRouterExportNames: string[];
|
|
16899
|
+
//#endregion
|
|
16878
16900
|
//#region src/factory.d.ts
|
|
16879
16901
|
/**
|
|
16880
16902
|
* @description Construct an array of ESLint flat config items.
|
|
@@ -16984,5 +17006,5 @@ declare const isPackageInScope: (name: string) => boolean;
|
|
|
16984
17006
|
declare const ensurePackages: (packages: Array<string | undefined>) => Promise<void>;
|
|
16985
17007
|
declare const resolveOptions: <TObject>(option: boolean | TObject | undefined) => TObject;
|
|
16986
17008
|
//#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 };
|
|
17009
|
+
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, perfectionist, pnpm, react, renamePluginInConfigs, renamePlugins, renameRules, resolveOptions, solid, sortPackageJson, sortTsconfig, stylistic, tailwindcssBetter, tanstack, toml, typescript, unicorn, vue, yaml, zayne };
|
|
16988
17010
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1959,5 +1959,5 @@ const zayne = (options = {}, ...userConfigs) => {
|
|
|
1959
1959
|
};
|
|
1960
1960
|
|
|
1961
1961
|
//#endregion
|
|
1962
|
-
export { 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, 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 };
|
|
1962
|
+
export { 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, allowedNextJsExportNames, allowedReactRouterExportNames, astro, combine, comments, defaultPluginRenameMap, 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 };
|
|
1963
1963
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zayne-labs/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.13",
|
|
5
5
|
"description": "Zayne Labs' ESLint config preset",
|
|
6
6
|
"author": "Ryan Zayne",
|
|
7
7
|
"license": "MIT",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"tsx": "4.20.5",
|
|
167
167
|
"typescript": "5.9.2",
|
|
168
168
|
"vue-eslint-parser": "10.2.0",
|
|
169
|
-
"@zayne-labs/tsconfig": "0.9.
|
|
169
|
+
"@zayne-labs/tsconfig": "0.9.13"
|
|
170
170
|
},
|
|
171
171
|
"publishConfig": {
|
|
172
172
|
"access": "public",
|