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

SpaceInHtmlTag customisation #125

Open
TomasBarry opened this issue May 1, 2019 · 4 comments
Open

SpaceInHtmlTag customisation #125

TomasBarry opened this issue May 1, 2019 · 4 comments

Comments

@TomasBarry
Copy link

When the SpaceInHtmlTag rule is enabled, the following code is flagged:

<img
  alt='...'
  className='...'
/>

I realise that I could just disable this rule but then the following code is accepted:

<img     alt='...'              className='...' />

Which is undesirable.

Is it possible to customise the SpaceInHtmlTag rule such that scenario 1 is accepted but scenario 2 is not? Or do we have to make a choice on what we want to accept?

@glenpike
Copy link

glenpike commented Oct 2, 2019

I would also like to customise the exclusions from this as an empty alt tag: alt="" is recommended for accessibility compliance with some image types - https://www.w3.org/WAI/tutorials/images/decorative/

@5mutawa
Copy link

5mutawa commented Jul 6, 2022

The issue is the space after the last attribute.

The following gets flagged:

<span
  class="..."
  id="..."
>
  Text ...
</span>

But this passes

<span
  class="..."
  id="...">
  Text ...
</span>

@coder2000
Copy link

I would like to see additional characters supported. Some js libraries like alpine use special characters like @ and it causes issues.

@CodeF53
Copy link

CodeF53 commented Jan 29, 2024

I also had to disable this rule due to use of Alpine's @ event syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants