eslint / typescript-eslint-parser

An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code.
Other
915 stars 92 forks source link

Missing visitor-keys #555

Closed armano2 closed 5 years ago

armano2 commented 5 years ago

I did some checking what we can and what we are not able to visit and i found some missing stuff:

missing typeParameters

missing superTypeParameters

class foo extends bar<Foo>

missing implements

class foo implements bar, class foo implements bar, baz

missing import equals

import foo = require('foo')

invalid order:

missing decorators:

armano2 commented 5 years ago

small update

armano2 commented 5 years ago

@mysticatea i have question about implements do you think that it should be variable?

implements references to type -> interface which is type

mysticatea commented 5 years ago

No.

TypeScript has two namespaces: variables and types.

// Those are not redeclaration 
// because `interface` defines only in types and `const` defines only in variables.
interface A {}
const A = 0

// On the other hand, `class` defines in both types and variables.
class B {}

Then, the scopeManager doesn't have things of types namespace. I think that we should provide a way to access types namespace, but we don't have it now.

armano2 commented 5 years ago

ok, i was thinking correctly,

i just wanted to confirm that :)