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

🚀 Feature: Investigate extending unicorn/recommended (ESLint plugin) #1116

Open
5 of 7 tasks
JoshuaKGoldberg opened this issue Dec 26, 2023 · 3 comments
Open
5 of 7 tasks
Labels
status: blocked Waiting for something else to be resolved type: feature New enhancement or request

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Dec 26, 2023

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

https://github.com/sindresorhus/eslint-plugin-unicorn has a lot of great rules in it. The plugin:unicorn/recommended plugin in particular has a non-zero density of rules that catch dangerous bugs.

Example of a good objective logical rule: unicorn/no-instanceof-array flags dangerous uses of ... instanceof Array that should be replaced with Array.isArray(...).

However! Not every rule in plugin:unicorn/recommended is purely logical. Some are opinionated stylistic ones - which I wouldn't want to enable in this plugin.

Example of an opinionated logical rule: unicorn/expiring-todo-comments. It's a good idea and I like that folks are enabling it. But I think it'd be too opinionated for a general-purpose template like this one. Even the --base everything / stylistic-enabled options.

Let's:

Additional Info

No response

@rubiesonthesky
Copy link
Contributor

Unopinionated preset is blocked until eslint-unicorn has fully switched to flat config, ref sindresorhus/eslint-plugin-unicorn#896 (comment)

@rubiesonthesky
Copy link
Contributor

Eslint-plugin-n has now rule for node prefix https://github.com/eslint-community/eslint-plugin-n/blob/master/docs/rules/prefer-node-protocol.md - I’m commenting this to here, since this is one nice rule from unicorn that I like to use. But since node plugin is already enabled in this repo, it would make sense to enable it from node plugin.

There are other good lints from unicorn still. :)

—-

Should I create own issue about proposing enabling that rule? I think it needs to wait at least few days that the new major version is rolled into use.

@JoshuaKGoldberg
Copy link
Owner Author

Ooh yes let's add that in, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked Waiting for something else to be resolved type: feature New enhancement or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants