Repository: JoshuaKGoldberg/create-typescript-app (ts)

Issue:
🐛 Bug: `blockESLintPlugin` shouldn't add `peerDependencies`
### Bug Report Checklist

- [x] I have tried restarting my IDE and the issue persists.
- [x] I have pulled the latest `main` branch of the repository.
- [x] I have [searched for related issues](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aissue) and found none that matched my issue.

### Expected

Not every ESLint plugin will use the same peerDependencies, so `blockESLintPlugin` shouldn't add new ones.

### Actual

https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/pull/993/files#r2027957603 & https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/pull/993/files#r2027957696 show that it does.

### Additional Info

🎁 

Pull request description:
fix: correct blockESLintPlugin peerDependencies and config file name
## PR Checklist

- [x] Addresses an existing open issue: fixes #2134, #2137
- [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken

## Overview

🎁 

Patch:
diff --git a/cspell.json b/cspell.json
index 2b6087d..99987a7 100644
--- a/cspell.json
+++ b/cspell.json
@@ -15,7 +15,7 @@
 		"attw",
 		"boop",
 		"dbaeumer",
-		"eslint-doc-generatorrc.js",
+		"eslint-doc-generatorrc",
 		"infile",
 		"joshuakgoldberg",
 		"markdownlintignore",
diff --git a/src/blocks/blockESLintPlugin.ts b/src/blocks/blockESLintPlugin.ts
index 045403b..dc78242 100644
--- a/src/blocks/blockESLintPlugin.ts
+++ b/src/blocks/blockESLintPlugin.ts
@@ -10,11 +10,13 @@ export const blockESLintPlugin = base.createBlock({
 	about: {
 		name: "ESLint Plugin",
 	},
-	produce() {
+	produce({ options }) {
+		const configFileName = `.eslint-doc-generatorrc.${options.type === "commonjs" ? "mjs" : "js"}`;
+
 		return {
 			addons: [
 				blockCSpell({
-					words: ["eslint-doc-generatorrc.js"],
+					words: ["eslint-doc-generatorrc"],
 				}),
 				blockDevelopmentDocs({
 					sections: {
@@ -43,7 +45,7 @@ pnpm build:docs
 				}),
 				blockESLint({
 					extensions: ['eslintPlugin.configs["flat/recommended"]'],
-					ignores: [".eslint-doc-generatorrc.js", "docs/rules/*/*.ts"],
+					ignores: [configFileName, "docs/rules/*/*.ts"],
 					imports: [
 						{
 							source: {
@@ -71,11 +73,6 @@ pnpm build:docs
 							"eslint-doc-generator": "2.1.0",
 							"eslint-plugin-eslint-plugin": "6.4.0",
 						},
-						peerDependencies: {
-							"@typescript-eslint/parser": ">=8",
-							eslint: ">=9",
-							typescript: ">=5",
-						},
 						scripts: {
 							"build:docs": "eslint-doc-generator",
 							"lint:docs": "eslint-doc-generator --check",
@@ -89,7 +86,7 @@ pnpm build:docs
 				}),
 			],
 			files: {
-				".eslint-doc-generatorrc.js": `import prettier from "prettier";
+				[configFileName]: `import prettier from "prettier";
 
 /** @type {import('eslint-doc-generator').GenerateOptions} */
 const config = {


Test patch:
diff --git a/src/blocks/blockESLintPlugin.test.ts b/src/blocks/blockESLintPlugin.test.ts
index da3bd9f..90cc1d0 100644
--- a/src/blocks/blockESLintPlugin.test.ts
+++ b/src/blocks/blockESLintPlugin.test.ts
@@ -5,7 +5,7 @@ import { blockESLintPlugin } from "./blockESLintPlugin.js";
 import { optionsBase } from "./options.fakes.js";
 
 describe("blockESLintPlugin", () => {
-	test("without mode", () => {
+	test("without options or mode", () => {
 		const creation = testBlock(blockESLintPlugin, {
 			options: optionsBase,
 		});
@@ -16,7 +16,7 @@ describe("blockESLintPlugin", () => {
 			    {
 			      "addons": {
 			        "words": [
-			          "eslint-doc-generatorrc.js",
+			          "eslint-doc-generatorrc",
 			        ],
 			      },
 			      "block": [Function],
@@ -95,11 +95,6 @@ describe("blockESLintPlugin", () => {
 			            "eslint-doc-generator": "2.1.0",
 			            "eslint-plugin-eslint-plugin": "6.4.0",
 			          },
-			          "peerDependencies": {
-			            "@typescript-eslint/parser": ">=8",
-			            "eslint": ">=9",
-			            "typescript": ">=5",
-			          },
 			          "scripts": {
 			            "build:docs": "eslint-doc-generator",
 			            "lint:docs": "eslint-doc-generator --check",
@@ -140,6 +135,139 @@ describe("blockESLintPlugin", () => {
 		`);
 	});
 
+	test("with options.type set to commonjs", () => {
+		const creation = testBlock(blockESLintPlugin, {
+			options: {
+				...optionsBase,
+				type: "commonjs",
+			},
+		});
+
+		expect(creation).toMatchInlineSnapshot(`
+			{
+			  "addons": [
+			    {
+			      "addons": {
+			        "words": [
+			          "eslint-doc-generatorrc",
+			        ],
+			      },
+			      "block": [Function],
+			    },
+			    {
+			      "addons": {
+			        "sections": {
+			          "Building": {
+			            "innerSections": [
+			              {
+			                "contents": "
+			Run [\`eslint-doc-generator\`](https://github.com/bmish/eslint-doc-generator) to generate Markdown files documenting rules.
+
+			\`\`\`shell
+			pnpm build:docs
+			\`\`\`
+					",
+			                "heading": "Building Docs",
+			              },
+			            ],
+			          },
+			          "Linting": {
+			            "contents": {
+			              "items": [
+			                "- \`pnpm lint:docs\` ([eslint-doc-generator](https://github.com/bmish/eslint-doc-generator)): Generates and validates documentation for ESLint rules",
+			              ],
+			            },
+			          },
+			        },
+			      },
+			      "block": [Function],
+			    },
+			    {
+			      "addons": {
+			        "extensions": [
+			          "eslintPlugin.configs["flat/recommended"]",
+			        ],
+			        "ignores": [
+			          ".eslint-doc-generatorrc.mjs",
+			          "docs/rules/*/*.ts",
+			        ],
+			        "imports": [
+			          {
+			            "source": {
+			              "packageName": "eslint-plugin-eslint-plugin",
+			              "version": "6.4.0",
+			            },
+			            "specifier": "eslintPlugin",
+			          },
+			        ],
+			      },
+			      "block": [Function],
+			    },
+			    {
+			      "addons": {
+			        "jobs": [
+			          {
+			            "name": "Lint Docs",
+			            "steps": [
+			              {
+			                "run": "pnpm build || exit 0",
+			              },
+			              {
+			                "run": "pnpm lint:docs",
+			              },
+			            ],
+			          },
+			        ],
+			      },
+			      "block": [Function],
+			    },
+			    {
+			      "addons": {
+			        "properties": {
+			          "devDependencies": {
+			            "eslint-doc-generator": "2.1.0",
+			            "eslint-plugin-eslint-plugin": "6.4.0",
+			          },
+			          "scripts": {
+			            "build:docs": "eslint-doc-generator",
+			            "lint:docs": "eslint-doc-generator --check",
+			          },
+			        },
+			      },
+			      "block": [Function],
+			    },
+			    {
+			      "addons": {
+			        "coverage": {
+			          "exclude": [
+			            "src/index.ts",
+			            "src/rules/index.ts",
+			          ],
+			        },
+			      },
+			      "block": [Function],
+			    },
+			  ],
+			  "files": {
+			    ".eslint-doc-generatorrc.mjs": "import prettier from "prettier";
+
+			/** @type {import('eslint-doc-generator').GenerateOptions} */
+			const config = {
+				postprocess: async (content, path) =>
+					prettier.format(content, {
+						...(await prettier.resolveConfig(path)),
+						parser: "markdown",
+					}),
+				ruleDocTitleFormat: "prefix-name",
+			};
+
+			export default config;
+			",
+			  },
+			}
+		`);
+	});
+
 	test("setup mode", () => {
 		const creation = testBlock(blockESLintPlugin, {
 			mode: "setup",
@@ -152,7 +280,7 @@ describe("blockESLintPlugin", () => {
 			    {
 			      "addons": {
 			        "words": [
-			          "eslint-doc-generatorrc.js",
+			          "eslint-doc-generatorrc",
 			        ],
 			      },
 			      "block": [Function],
@@ -231,11 +359,6 @@ describe("blockESLintPlugin", () => {
 			            "eslint-doc-generator": "2.1.0",
 			            "eslint-plugin-eslint-plugin": "6.4.0",
 			          },
-			          "peerDependencies": {
-			            "@typescript-eslint/parser": ">=8",
-			            "eslint": ">=9",
-			            "typescript": ">=5",
-			          },
 			          "scripts": {
 			            "build:docs": "eslint-doc-generator",
 			            "lint:docs": "eslint-doc-generator --check",