mirror of
https://github.com/denoland/deno.git
synced 2025-07-07 21:35:07 +00:00
![]() This PR adds support for comments in the AST for lint plugins. - The `Program` node has a `comments` field pointing to an array of all comments. - `SourceCode.getAllComments()`: Returns all comments (same as `program.comments`) - `SourceCode.getCommentsBefore(node)`: Get all comments before this Node - `SourceCode.getCommentsAfter(node)`: Get all comments after this Node - `SourceCode.getCommentsInside(node)`: Get all comments inside this Node ESLint docs: - https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-code - https://eslint.org/docs/latest/extend/custom-rules#accessing-comments |
||
---|---|---|
.. | ||
40_bench.js | ||
40_jupyter.js | ||
40_lint.js | ||
40_lint_selector.js | ||
40_lint_types.d.ts | ||
40_test.js | ||
40_test_common.js |