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

I think this idea has been raised before, but I'm not sure it has with this specific restriction: For a todo written like ```js // todo [#1234] until we refactor...

enhancement
help wanted

In class definitions top-level-await is not available but this rule still marks the code as wrong The rule: [unicorn/prefer-top-level-await](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v43.0.0/docs/rules/prefer-top-level-await.md) ```js class Example { property = Promise // Can't await here...

bug
help wanted

Added `prefer-object-define-properties` rule, resolves #1729 Might need more test cases and better description And unsure if fixer can be improved (formatting the output etc)

eslint unicorn v42.0.0 https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md Fails when null is used as function argument, even though this should pass. In fact this is even an example given in the "Pass" section: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-null.md#pass...

enhancement
help wanted

Added `prefer-error-cause` rule, Fixes #1342. I'm trying to create many tests as possible I can. https://github.com/sindresorhus/eslint-plugin-unicorn/issues/1342#issuecomment-1085527190 this rule is not implemented yet in this PR, but I made this PR...

`prefer-native-coercion-functions` is used to simplify methods like `filter` that are simply trying to find truthy values. However the native type castings do not provide any typescript assertions, so the resulting...

bug
types

Aren't `no-array-callback-reference` and `prefer-native-coercion-functions` contradictory in their intent? Consider the following: ```ts const idsAsNumber = idsAsString.map(id => Number(id)); ``` According to `prefer-native-coercion-functions` I should do: ```ts const idsAsNumber = idsAsString.map(Number);...

add `no-duplicate-literal-elements` rule to fixes #1559

Fixes #1460. One thing to note is that I couldn't run `npm run integration` to completion as my computer only has 4GB RAM.