Skip to content

Commit

Permalink
Error if tslint.json is present
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey committed Feb 12, 2024
1 parent 69e8b39 commit 52fbd83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/fifty-points-eat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@definitelytyped/dtslint": patch
---

Error if tslint.json is present
6 changes: 6 additions & 0 deletions packages/dtslint/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

0 comments on commit 52fbd83

Please sign in to comment.