Skip to content

Feature: no-inline-comments: Allow exception inside JSX #11270

@alexilyaev

Description

@alexilyaev

What rule do you want to change?
no-inline-comments
Does this change cause the rule to produce more or fewer warnings?
Fewer
How will the change be implemented? (New option, new default behavior, etc.)?
Rule options, or change in rule behavior
Please provide some example code that this change will affect:

function App() {
  return (
    <div>
      {/* Some comment */}
      <h1>Some heading</div>
    </div>
  )
}

What does the rule currently do for this code?
Right now no-inline-comments will warn on any comments inside JSX.
What will the rule do after it's changed?
It makes sense to allow comments inside JSX while still disallowing inline comments in regular JS blocks.
Are you willing to submit a pull request to implement this change?
Unfortunately not.

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintruleRelates to ESLint's core rules

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions