From 1d34de7113efb10854bc0c614b9c533b6ea8b30f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sun, 1 Oct 2023 19:32:42 +0200 Subject: [PATCH] fix: use options.repository for n/no-missing-import's allowedModules --- src/steps/writing/creation/createESLintRC.test.ts | 10 ++-------- src/steps/writing/creation/createESLintRC.ts | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/steps/writing/creation/createESLintRC.test.ts b/src/steps/writing/creation/createESLintRC.test.ts index 2fcd95ff1..33ddabb57 100644 --- a/src/steps/writing/creation/createESLintRC.test.ts +++ b/src/steps/writing/creation/createESLintRC.test.ts @@ -77,10 +77,7 @@ describe("createESLintRC", () => { { files: \\"**/*.md/*.ts\\", rules: { - \\"n/no-missing-import\\": [ - \\"error\\", - { allowModules: [\\"create-typescript-app\\"] }, - ], + \\"n/no-missing-import\\": [\\"error\\", { allowModules: [\\"test-repository\\"] }], }, }, { @@ -162,10 +159,7 @@ describe("createESLintRC", () => { { files: \\"**/*.md/*.ts\\", rules: { - \\"n/no-missing-import\\": [ - \\"error\\", - { allowModules: [\\"create-typescript-app\\"] }, - ], + \\"n/no-missing-import\\": [\\"error\\", { allowModules: [\\"test-repository\\"] }], }, }, { diff --git a/src/steps/writing/creation/createESLintRC.ts b/src/steps/writing/creation/createESLintRC.ts index d2cea501c..34a52583a 100644 --- a/src/steps/writing/creation/createESLintRC.ts +++ b/src/steps/writing/creation/createESLintRC.ts @@ -82,7 +82,7 @@ module.exports = { rules: { "n/no-missing-import": [ "error", - { allowModules: ["create-typescript-app"] }, + { allowModules: ["${options.repository}"] }, ], }, },