JoshuaKGoldberg / create-typescript-app

Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. πŸ’
MIT License
915 stars 69 forks source link

πŸš€ Feature: Investigate extending unicorn/recommended (ESLint plugin) #1116

Open JoshuaKGoldberg opened 9 months ago

JoshuaKGoldberg commented 9 months ago

Bug Report Checklist

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 commented 5 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

rubiesonthesky commented 5 months ago

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 commented 5 months ago

Ooh yes let's add that in, thanks!