Closed
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I have searched for related issues and found none that match my proposal.
- I have searched the current rule list and found no rules that match my proposal.
- I have read the FAQ and my problem is not listed.
My proposal is suitable for this project
- My proposal specifically checks TypeScript syntax, or it proposes a check that requires type information to be accurate.
- My proposal is not a "formatting rule"; meaning it does not just enforce how code is formatted (whitespace, brace placement, etc).
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
I've seen people doing the interface into class declaration merging pattern a few times (like in #5273) and I don't think people understand how unsafe it can be.
I propose a lint rule which detects instances of unsafe declaration merging and warns against it.
Fail Cases
interface Foo {}
class Foo {}
Pass Cases
interface Foo {}
class Bar implements Foo {}
namespace Foo2 {}
namespace Foo2 {}
enum Foo2 {}
namespace Foo3 {}
function Foo3() {}
Additional Info
No response