Skip to content

feat(linter): configuration comments #100

Description

@Boshen

configuration comments, a.k.a suspension comments, eslint-disable-next

https://eslint.org/docs/latest/use/configure/rules#disabling-rules

background: #6


Here's what I have in mind, please correct me if you don't think it is not going to work:

To get configuration comments to work, we need to:

  1. inside the lexer, save all the eslint configuration comments and the span they apply to
  2. when a diagnostic is emitted, find if it overlaps with the comment ranges saved from above
  3. report all unused comments (the reportUnusedDisableDirectives option)

The first step will be the most difficult part. I don't know if it is even possible, but it'll be much more efficient than eslint because we don't need to track line numbers.

Metadata

Metadata

Assignees

Labels

E-Help WantedExperience level - For the experienced collaborators

Type

No type

Fields

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions