diff --git a/src/steps/finalizeDependencies.test.ts b/src/steps/finalizeDependencies.test.ts index 8bb34ad9e..6f6d8cf5a 100644 --- a/src/steps/finalizeDependencies.test.ts +++ b/src/steps/finalizeDependencies.test.ts @@ -92,7 +92,7 @@ describe("finalize", () => { expect(mockExecaCommand.mock.calls).toMatchInlineSnapshot(` [ [ - "pnpm add @eslint-community/eslint-plugin-eslint-comments@latest @eslint/js@latest @types/eslint-plugin-markdown@latest @types/eslint__js@latest @types/node@latest eslint@latest eslint-plugin-jsdoc@latest eslint-plugin-n@latest eslint-plugin-regexp@latest husky@latest lint-staged@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest prettier-plugin-sh@latest tsup@latest typescript@latest typescript-eslint@latest -D", + "pnpm add @eslint-community/eslint-plugin-eslint-comments@latest @eslint/js@latest @types/eslint__js@latest @types/node@latest eslint@latest eslint-plugin-jsdoc@latest eslint-plugin-n@latest eslint-plugin-regexp@latest husky@latest lint-staged@latest prettier@latest prettier-plugin-curly@latest prettier-plugin-packagejson@latest prettier-plugin-sh@latest tsup@latest typescript@latest typescript-eslint@latest -D", ], [ "pnpm dedupe --offline", diff --git a/src/steps/finalizeDependencies.ts b/src/steps/finalizeDependencies.ts index 732be0418..2d7470696 100644 --- a/src/steps/finalizeDependencies.ts +++ b/src/steps/finalizeDependencies.ts @@ -6,14 +6,10 @@ import { Options } from "../shared/types.js"; export async function finalizeDependencies(options: Options) { const devDependencies = [ "@eslint/js", - "@eslint-community/eslint-plugin-eslint-comments", - "@types/eslint-plugin-markdown", "@types/eslint__js", "@types/node", "eslint", - "eslint-plugin-jsdoc", "eslint-plugin-n", - "eslint-plugin-regexp", "husky", "lint-staged", "prettier", @@ -24,6 +20,10 @@ export async function finalizeDependencies(options: Options) { "typescript", "typescript-eslint", ...(options.excludeAllContributors ? [] : ["all-contributors-cli"]), + ...(options.excludeLintESLint + ? [] + : ["@eslint-community/eslint-plugin-eslint-comments"]), + ...(options.excludeLintJSDoc ? [] : ["eslint-plugin-jsdoc"]), ...(options.excludeLintJson ? [] : ["eslint-plugin-jsonc"]), ...(options.excludeLintJson && options.excludeLintPackageJson ? [] @@ -32,6 +32,7 @@ export async function finalizeDependencies(options: Options) { ...(options.excludeLintMd ? [] : [ + "@types/eslint-plugin-markdown", "eslint-plugin-markdown", "markdownlint", "markdownlint-cli", @@ -41,6 +42,7 @@ export async function finalizeDependencies(options: Options) { ...(options.excludeLintPerfectionist ? [] : ["eslint-plugin-perfectionist"]), + ...(options.excludeLintRegex ? [] : ["eslint-plugin-regexp"]), ...(options.excludeLintSpelling ? [] : ["cspell"]), ...(options.excludeLintYml ? [] : ["eslint-plugin-yml"]), ...(options.excludeReleases