-
-
Notifications
You must be signed in to change notification settings - Fork 420
Add prefer-text-content rule
#223
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
Add prefer-text-content rule
#223
Conversation
|
Hey, thanks for the pull request 🙌 I have gotten a huge response on the IssueHunt bounty issues and I now have a very long backlog of pull requests to review, so it might take some time until I will be able to review this. However, you can help move this along by helping out and reviewing the other submissions. If everyone helps everyone we can manage this 👌. Some things to look for when reviewing:
|
test/prefer-textcontent.js
Outdated
| valid: [ | ||
| 'innerText;', | ||
| 'node.textContent;', | ||
| 'node[innerText];' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add:
innerText = true;'node['innerText'];'
| output: 'node.textContent;', | ||
| errors: [error] | ||
| } | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add an assignment case: node.innerText = 'foo';
|
I just realized that to be consistent with the naming of the other rules, this rule needs to be named |
046cfbd to
61da4e4
Compare
|
Nice work, @alexzherdev 🙌 |
Resolves #156.