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

remap eslint/prefer-spread to unicorn/prefer-spread #7948

Open
Sysix opened this issue Dec 16, 2024 · 4 comments
Open

remap eslint/prefer-spread to unicorn/prefer-spread #7948

Sysix opened this issue Dec 16, 2024 · 4 comments
Assignees
Labels
A-linter Area - Linter C-bug Category - Bug

Comments

@Sysix
Copy link
Contributor

Sysix commented Dec 16, 2024

In this PR, unicorn/prefer-spread rule was migrated to eslint:prefer-spread.
So should we update status of unicorn/prefer-spread? (It seems to be not implemented status)

Originally posted by @tbashiyy in #684 (comment)

Needs the same mapping like jest ot vitest

and then update the doc tasks too:

https://github.com/oxc-project/oxc/blob/main/tasks/lint_rules/src/oxlint-rules.cjs#L181-L198

@Sysix Sysix added C-bug Category - Bug A-linter Area - Linter labels Dec 16, 2024
@camc314
Copy link
Contributor

camc314 commented Dec 16, 2024

imo, it would be easiest just to split the rules.
rules are now allowed to be the same name, which bypasses the original reason for why it was merged

@Sysix
Copy link
Contributor Author

Sysix commented Dec 16, 2024

imo, it would be easiest just to split the rules.

Should we do the same for all remapped rules in https://github.com/oxc-project/oxc/blob/main/crates/oxc_linter/src/utils/mod.rs ?

@camc314
Copy link
Contributor

camc314 commented Dec 16, 2024

so my reasoning for spliting them is, iirc, eslint/prefer-spread and unicorn/prefer-spread are completly differnt rules

Whereas the typescript ones as usually (i haven't checked this) the same as the eslint rule just with TS support

Vitest is basically the same - its 99% the same code across jest/vitest for rules such as no identical title so no need to split

I'm happy to be disagreed with though 🙂

@Boshen
Copy link
Member

Boshen commented Dec 17, 2024

This is my fault. You're correct that these are completely different rules.

Let's revert that decision and separate these two rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

No branches or pull requests

3 participants