Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Docs: describe how to feature-detect scopeManager/visitorKeys support (
  • Loading branch information
not-an-aardvark committed Dec 24, 2017
1 parent f7dcb70 commit cbf0fb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/developer-guide/working-with-plugins.md
Expand Up @@ -173,7 +173,9 @@ If you want to use your own parser and provide additional capabilities for your
* `ast` should contain the AST.
* `services` can contain any parser-dependent services (such as type checkers for nodes). The value of the `services` property is available to rules as `context.parserServices`. Default is an empty object.
* `scopeManager` can be a [ScopeManager](./scope-manager-interface.md) object. Custom parsers can use customized scope analysis for experimental/enhancement syntaxes. Default is the `ScopeManager` object which is created by [eslint-scope](https://github.com/eslint/eslint-scope).
* Support for `scopeManager` was added in ESLint v4.14.0. ESLint versions which support `scopeManager` will provide an `eslintScopeManager: true` property in `parserOptions`, which can be used for feature detection.
* `visitorKeys` can be an object to customize AST traversal. The keys of the object are the type of AST nodes. Each value is an array of the property names which should be traversed. Default is [KEYS of `eslint-visitor-keys`](https://github.com/eslint/eslint-visitor-keys#evkkeys).
* Support for `visitorKeys` was added in ESLint v4.14.0. ESLint versions which support `visitorKeys` will provide an `eslintVisitorKeys: true` property in `parserOptions`, which can be used for feature detection.

You can find an ESLint parser project [here](https://github.com/eslint/typescript-eslint-parser).

Expand Down

0 comments on commit cbf0fb9

Please sign in to comment.