Conflicts `eslint-disable` comments with ESLint's `spaced-comment` rule
See original GitHub issueIs your feature request related to a problem? Please describe.
It looks like the comment node are extracted here: https://github.com/B2o5T/graphql-eslint/blob/4bcee4a7849602076fb9e0d9ab33e78141e20a8e/packages/plugin/src/estree-converter/utils.ts#L109
but since the API conforms to the SourceLocation
type from estree, there’s no actual comment
field exposed.
Therefore it’s not possible to disable a rule on a per field basis.
Describe the solution you’d like
Expose the comment field to the Node
type:
https://github.com/B2o5T/graphql-eslint/blob/c33bde9c1c5bd8aa780a8ef6c1737eaaaa95f3b0/packages/plugin/src/estree-converter/types.ts#L106-L116
This way we can detect the comment on a field like https://github.com/relayjs/eslint-plugin-relay/blob/main/src/utils.js#L111-L114 which lets us disable a rule on a field level.
Describe alternatives you’ve considered n/a
Additional context n/a
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
@shogunsea I reopened your issue to figure out why there are conflicts with
spaced-comment
rule when I’ll have a timeThe error occurs when comments are written without a space in the schema (Second one)