Open JoshuaKGoldberg opened 9 months ago
Unopinionated preset is blocked until eslint-unicorn has fully switched to flat config, ref https://github.com/sindresorhus/eslint-plugin-unicorn/issues/896#issuecomment-1958814311
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.
Ooh yes let's add that in, thanks!
Bug Report Checklist
main
branch of the repository.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 withArray.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:
eslint-plugin-stylistic
to make a preset config that only has the objective logical rules: https://github.com/sindresorhus/eslint-plugin-unicorn/issues/896eslint-plugin-stylistic
to add that preset config: https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2182Additional Info
No response