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

Add prefer-node-append rule #201

Merged
merged 6 commits into from
Dec 29, 2018

Conversation

nikhilsaldanha
Copy link
Contributor

  • Created a new entry in index.js for prefer-node-append.

  • Added a test for prefer-node-append.

closes #170

 - Created a new entry in index.js for prefer-node-append.

 - Added a test for prefer-node-append.
@MrHen
Copy link
Contributor

MrHen commented Nov 3, 2018

Need to add the rule to readme.md
https://github.com/sindresorhus/eslint-plugin-unicorn#usage

@sindresorhus
Copy link
Owner

Look at some previous additions to see what's required for a new rule:

Nikhil Saldanha added 3 commits November 4, 2018 01:07
Replace property at node level instead of constructing the fix manually.
 - invalid case of node.appendChild()
 - invalid case of node.appendChild(null)
 - valid case of node.append()
 - valid case of node.append(null)
 - valid case of appending multiple nodes
 - entry in usage section of readme
 - entry in rules section of readme
 - new rule doc for prefer-node-append
@nikhilsaldanha
Copy link
Contributor Author

All changes requested for are done

@sindresorhus sindresorhus changed the title Add rule to prefer append over appendChild Add prefer-node-append rule Dec 29, 2018
@sindresorhus sindresorhus merged commit 9da5e6a into sindresorhus:master Dec 29, 2018
@sindresorhus
Copy link
Owner

Nice work, @nikhilsaldanha :)

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

Successfully merging this pull request may close these issues.

Rule proposal: prefer-node-append
4 participants