Skip to content

Conversation

@medusalix
Copy link
Contributor

Resolves #213

@sindresorhus
Copy link
Owner

Add the rule to the recommended config, the recommended config in the readme, and the rule listing in the readme (The description should be the same as the heading of the documentation file). - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/new-rule.md#steps

@medusalix
Copy link
Contributor Author

Is there still something you'd want me to change? @sindresorhus

@sindresorhus
Copy link
Owner

I just discovered the other day in a different project that there's something called .parentElement (not node). We should support that too (also needs tests and docs).

Copy link
Contributor

@futpib futpib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the tests I've added

@medusalix
Copy link
Contributor Author

@futpib Checking for computed to be false has the downside of allowing this to pass:

foo.parentNode['removeChild'](foo);

Do you know any better alternative to differentiate between parentNode.removeChild(foo) and parentNode[removeChild](foo)?

@futpib
Copy link
Contributor

futpib commented Feb 4, 2019

@medusalix ignoring foo.parentNode['removeChild'](foo); is okay.

@sindresorhus sindresorhus merged commit fda5517 into sindresorhus:master Feb 4, 2019
@sindresorhus
Copy link
Owner

Nice work, @medusalix 👍

@medusalix medusalix deleted the add-prefer-node-remove-rule branch February 4, 2019 19:28
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.

3 participants