Skip to content

Linter plugins: Add comments-related APIs #14564

@overlookmotel

Description

@overlookmotel

Comment-related APIs are not yet supported in JS plugins e.g. context.sourceCode.getAllComments (as noted in docs).

The token-related APIs are going to be hard to implement, but the comment-related ones should not be too hard, as raw transfer can already deal with comments (implemented in oxc-parser).

#14488 demonstrates these APIs are required for eslint-plugin-react-hooks plugin.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions