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 error for readonly or disabled by default #3

Closed
wesleytodd opened this issue Dec 10, 2018 · 3 comments
Closed

Don't error for readonly or disabled by default #3

wesleytodd opened this issue Dec 10, 2018 · 3 comments

Comments

@wesleytodd
Copy link

wesleytodd commented Dec 10, 2018

I think it would be good to exclude elements with readonly or disabled by default with the ability to turn it on. I am using input's for displaying some non-editable information and this lint rule set errors on them. One other option would be to not error on input without an onChange, but I am not sure which would be better and more robust.

@davidcalhoun
Copy link
Owner

Great suggestion, thanks! For your second option, it may in any case be useful to support this. I think I forgot to capture your feedback previously about warnings vs errors, which might help this. Created a ticket to track it: #4

@wesleytodd
Copy link
Author

Yeah I ended up just disabling it on all but the main files. Even then I ended up disabling the entire anchor rule and about 10% of the other button and input cases.

@davidcalhoun
Copy link
Owner

davidcalhoun commented Dec 11, 2018

Added in 1.1.0:

  • elements with disabled and readonly are now ignored by default (they can be turned back on in each rule's config - see the readme)
  • plugin:test-selectors/recommended now emits warnings by default. For the old behavior which emits errors, folks can use plugin:test-selectors/recommendedWithErrors

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

2 participants