eslint-plugin-unicorn icon indicating copy to clipboard operation
eslint-plugin-unicorn copied to clipboard

More than 100 powerful ESLint rules

Results 255 eslint-plugin-unicorn issues
Sort by recently updated
recently updated
newest added

### Description Sometimes when I'm working with error messages, I'll have something like `Failed to add user to _something_`. In some cases it will be more detailed, but not from...

evaluating
new rule

Document the supported Node versions for the node protocol import feature to reduce potential confusion or mistaken adoption of this lint rule. While eslint-plugin-unicorn only supports Node 14.18 and above:...

docs

When using Remix framework, rule `text-encoding-identifier-case` reports error: ```ts import type {MetaFunction} from '@remix-run/node'; /* ... */ export const meta: MetaFunction = () => ({ charset: 'utf-8', //

### Description Large inline type definitions may shadow trailing unions with pre-existing types. I think that there was a similar rule for regular javascript objects (I thought it was [object-shorthand](https://eslint.org/docs/rules/object-shorthand))...

evaluating
new rule

Fixes #1868 I realized that having it as a setting is not a right thing, because linter fixes should be essentially the same code, just restyled. Trimming trailing spaces essentially...

See: http://eslint.org/docs/rules/func-style My personal preference is to prefer `declaration` style, as it allows hoisting (and just looks better to me). The only issue is when you want to reassign: ```...

question

```ts enum Btn { Hello = 123, } const test1 = Btn.Hello let test2: Btn.Hello ``` Gets autofixed to: ```ts enum Button { Hello = 123, } const test1 =...

bug

ESLint with plugin unicorn brakes in a NX monorepo when having packages on a deeper folder level. It works fine in packages like `/libs/first-level` (path `@nx-monorepo/first-level`) but throws this error...

### Description **prefer-array-some** checks for situations in which `Array.filter(...).length > 0` and `Array.find(...) != null` could be better written as `Array.some(...)` It would be useful to also check for a...

enhancement
help wanted

https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1815#issuecomment-1126894101 https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1868