You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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: Addunopinionated
preset sindresorhus/eslint-plugin-unicorn#896eslint-plugin-stylistic
to add that preset config: add unopinionated preset sindresorhus/eslint-plugin-unicorn#2182Additional Info
No response
The text was updated successfully, but these errors were encountered: