Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: Make max-len ignoreStrings ignore JSXText (fixes #9954) #9985
What is the purpose of this pull request? (put an "X" next to item)
[ ] Documentation update
What changes did you make? (Give an overview)
Is there anything you'd like reviewers to focus on?
kaicataldo left a comment
Thanks for contributing to ESLint! This looks good to me, but I do have one question.
This change will make it so that text in between tags will also be ignored. Is this the desired behavior? The issue only mentions props, so I just wanted to double check.
var foo = <div className="this is a very long string">this is another very long string</div>;
I am not sure if it is desired behavior but I think
var foo = <div className="this is a very long string"> short </div>;
should be ignored but
var foo = <div>this is another very long string</div>;
should not be ignored (since this case is more avoidable and we usually expect strings to be in quotes)
How about an additional check if the token is surrounded by quotes?
Looked into this a little more, and given the description of the option (
I think we might be able to just check if the