deno/cli/js
Marvin Hagemeister c015b8affd
feat(unstable): support comments in lint plugin (#29189)
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
2025-05-08 21:59:36 +02:00
..
40_bench.js fix(bench): lower bench time budget when n is specified (#28454) 2025-03-10 16:17:19 -04:00
40_jupyter.js feat(jupyter): make GPUTexture and GPUBuffer displayable (#28117) 2025-02-18 00:29:45 -08:00
40_lint.js feat(unstable): support comments in lint plugin (#29189) 2025-05-08 21:59:36 +02:00
40_lint_selector.js fix(unstable): lint plugin fix :has(), :is/where/matches and :not() selectors (#28348) 2025-03-04 16:04:39 +01:00
40_lint_types.d.ts feat(unstable): support comments in lint plugin (#29189) 2025-05-08 21:59:36 +02:00
40_test.js feat(bench): add warmup and n for controlling number of iterations (#28123) 2025-02-18 12:44:43 -05:00
40_test_common.js chore: Happy New Year 2025 (#27509) 2024-12-31 19:12:39 +00:00