You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
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?
Name
Description
PR
forbidden-types
This forbids the Function, Object, Boolean, Number, and String types. These have better alternatives (specific function types, {}, boolean, number, string).
How would this work for more complex signatures like interface Foo { foo(x: number, y: boolean): void; foo(x: string, y: SomeInterface): void; }? Would it allow a bad combo like foo(true, "bar")?.
void-return
I don't understand why someone would write foo(x: void): number in the first place
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: