This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 886
New rules for linting type declarations #1844
Labels
Comments
|
I don't think the |
right, I'll edit the table |
This was referenced Dec 16, 2016
With #2273 this should be done. |
ghost
closed this as completed
Feb 28, 2017
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We've been working on lint rules for DefinitelyTyped and most may be of general use. Would you be interested in my making PRs for some of these rules?
forbidden-types
Function
,Object
,Boolean
,Number
, andString
types. These have better alternatives (specific function types,{}
,boolean
,number
,string
).functional-interfaces
type Foo = () => void
overinterface Foo { (): void; }
.interface-over-type-literal
interface Foo { x: number; }
overtype Foo = { x: number; }
.no-empty-interface
interface Foo { }
. (TypeScript is structurally typed, so this doesn't accomplish anything.)no-public
public
keyword. This could be an option formember-access
to make it forbid instead of mandate.unified-signatures
over
interface Foo { foo(x: number): void; foo(x: string): void; }`.void-return
foo(x: void): number
but allowsfoo(x: number): void
. This could be joined withforbidden-types
.(
dt-header
andno-single-declare-module
will probably not be useful outside of DefinitelyTyped.)The text was updated successfully, but these errors were encountered: