From 52fbd83448f34b580ccadbc5cdd240996264ce38 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:55:17 -0800 Subject: [PATCH] Error if tslint.json is present --- .changeset/fifty-points-eat.md | 5 +++++ packages/dtslint/src/index.ts | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changeset/fifty-points-eat.md diff --git a/.changeset/fifty-points-eat.md b/.changeset/fifty-points-eat.md new file mode 100644 index 0000000000..4f81f74b55 --- /dev/null +++ b/.changeset/fifty-points-eat.md @@ -0,0 +1,5 @@ +--- +"@definitelytyped/dtslint": patch +--- + +Error if tslint.json is present diff --git a/packages/dtslint/src/index.ts b/packages/dtslint/src/index.ts index c528227d35..63e60f696a 100644 --- a/packages/dtslint/src/index.ts +++ b/packages/dtslint/src/index.ts @@ -379,5 +379,11 @@ function checkExpectedFiles(dirPath: string, isLatest: boolean): { errors: strin errors.push(`${dirPath}: Must contain 'index.d.ts'.`); } + if (fs.existsSync(joinPaths(dirPath, "tslint.json"))) { + errors.push( + `${dirPath}: Should not contain 'tslint.json'. This file is no longer required; place all lint-related options into .eslintrc.json.`, + ); + } + return { errors }; }