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

no-literals: only check strings #1301

Closed
davidyorr opened this issue Jul 13, 2017 · 6 comments
Closed

no-literals: only check strings #1301

davidyorr opened this issue Jul 13, 2017 · 6 comments

Comments

@davidyorr
Copy link
Contributor

should the no-literals rule check if the node.value is a string? with the new { "noStrings": true } option (#1202) I'm getting errors for explicitly set boolean and number props booleanprop={true} numberprop={100}

@ljharb
Copy link
Member

ljharb commented Jul 13, 2017

With that option turned off, do you still see the errors?

If enabling the option creates new warnings for non-strings, then yes, that's a bug.

@davidyorr
Copy link
Contributor Author

with { "noStrings": false } the errors are not there. i can fix it by adding the type check and submit a PR

@ljharb
Copy link
Member

ljharb commented Jul 13, 2017

Thanks, that'd be great!

@davidyorr
Copy link
Contributor Author

#1302

@davidyorr
Copy link
Contributor Author

oh i put the wrong issue # in the commit message -__-

davidyorr added a commit to davidyorr/eslint-plugin-react that referenced this issue Jul 13, 2017
This rule should only check strings.

Fixes jsx-eslint#1301
@davidyorr
Copy link
Contributor Author

ok i fixed it, let me know if there's anything i need to change

ljharb pushed a commit to davidyorr/eslint-plugin-react that referenced this issue Jul 29, 2017
This rule should only check strings.

Fixes jsx-eslint#1301
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants