mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +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 |
||
---|---|---|
.. | ||
buffer.rs | ||
mod.rs | ||
swc.rs | ||
ts_estree.rs |