Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't flag whitespace around <br/> tags #2989

Merged
merged 1 commit into from May 18, 2021

Conversation

pascalpp
Copy link
Contributor

@pascalpp pascalpp commented May 18, 2021

Ref: #2988

This PR simply removes BR from the set of inline elements, because I don't think there's any case where whitespace around a br tag would result in a different result rendered in the browser.

Adds example tests for code that should not be flagged by this rule:

<App>
  A
  <br/>
  B
</App>

<App>
  A<br/>
  B
</App>

<App>
  A<br/>B
</App>

<App>A<br/>B</App>

@codecov-commenter
Copy link

codecov-commenter commented May 18, 2021

Codecov Report

Merging #2989 (9a140a5) into master (9aa539d) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2989   +/-   ##
=======================================
  Coverage   97.59%   97.59%           
=======================================
  Files         110      110           
  Lines        7268     7268           
  Branches     2651     2651           
=======================================
  Hits         7093     7093           
  Misses        175      175           
Impacted Files Coverage Δ
lib/rules/jsx-child-element-spacing.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9aa539d...9a140a5. Read the comment docs.

@ljharb ljharb merged commit 9a140a5 into jsx-eslint:master May 18, 2021
@pascalpp pascalpp deleted the exception-for-br branch May 18, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants