Support for visitorKeys
#532
Description
eslint v4.14.0 added the ability to extend the set of keys that the traverser visits on a given node.
https://github.com/eslint/eslint/blob/master/docs/developer-guide/working-with-custom-parsers.md
The reason I mention this, is because there are certain nodes that have a definition in the default config which prevents traversing children.
For example, Identifier
is explicitly set to an empty array, meaning that the traverser will not traverse into the typeAnnotation
.
Rules in eslint-plugin-typescript
have worked around this by explicitly handling the nodes (i.e. no-explicit-any
defines an Identifier
selector).
This causes confusion with new contributors who assume the typeAnnotation
AST node should be traversed: bradzacher/eslint-plugin-typescript#117
The confusion is compounded when certain nodes, like ClassProperty
don't have entries in the default visitor key config, meaning that they fallback to the default keys, which includes typeAnnotation
.
Is it worthwhile adding support for a custom set of visitorKeys
, which add support for typeAnnotation
where applicable?