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

Allow for line-ignore option #11

Open
muenzpraeger opened this issue May 2, 2020 · 7 comments
Open

Allow for line-ignore option #11

muenzpraeger opened this issue May 2, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@muenzpraeger
Copy link

It is a common scenario that CSS classes get constructed within a JavaScript getter.

image

It would be great to have an ignore option like // slds-ignore-next-line that allows the developer to disable validation, in the sense like ESLint or Prettier allow to ignore lines.

@kirupa
Copy link
Contributor

kirupa commented Jul 2, 2020

This is a good suggestion! I will add it to our next sprint’s deliverable 😀

@doniarobinson-sf
Copy link
Contributor

Can we think of another valid case for people to ignore lines? Because in the example above, if we let them ignore that line, we don't get a chance to validate that second token. They might also choose to ignore lines instead of fixing them when they receive their reports for what they've done wrong. Maybe I'm cynical, but I can see a lot ways that can go awry, and we actually want a heavy degree of control here. However, another way of resolving the issue listed above is to check for a token that contains a curly brace and not validate that.

@muenzpraeger
Copy link
Author

The same applies to every other part where the SLDS plugin shows errors, also with a CSS class. The developer should always be in full control of what they fix, and what they want to ignore. That's how every other linting works.

@ambreeen ambreeen added enhancement New feature or request needs-prioritization labels Jul 22, 2020
@jonnyl
Copy link

jonnyl commented Aug 13, 2020

@doniarobinson-sf Loading animation within a component, like Lightning Desktop, that changes seasonally is a great example of where we would like to allow this entire file to be ignored by SLDSValidation. Ping me for specifics on the test failure/use-case.

@eltoroit
Copy link

eltoroit commented Sep 9, 2020

+1

@billyma
Copy link
Collaborator

billyma commented Aug 24, 2021

We are working on this item, and will publish the updated behavior soon.

@SteffenBaumann
Copy link

Any updates on this one?

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

No branches or pull requests

8 participants