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

Option to Also Detect Potentially Useless Shallow Clone in no-useless-rest-spread #30

Open
FlorianWendelborn opened this issue Aug 21, 2020 · 1 comment

Comments

@FlorianWendelborn
Copy link

Please describe what the rule should do:

  1. Prevent useless rest/spread
  2. Prevent using an implicit shallow clone when a deep clone would be more appropriate and more explicit

What category of rule is this? (place an "X" next to just one item)

[ ] Enforces code style
[x] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)

Provide 2-3 code examples that this rule will warn about:

// bad

const options = {
	params: { ...payload }
)

// good


const options = {
	params: payload
)

const options = {
	params: cloneDeep(payload)
)

Why should this rule be included in ESLint-plugin (instead of a Eslint)?

N/A it’s an addition to @mysticatea/no-useless-rest-spread

@MichaelDeBoey
Copy link

Hi @FlorianWendelborn!

Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/eslint-plugin-mysticatea

For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org

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

No branches or pull requests

2 participants