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

Currently, configs/all.js and configs/recommended.js do not follow the esilnt's new config system. I think new modules should be created and exported along with the legacy. Thanks :)

Supporting eslint's new config system of eslint. Note that legacy config system always has `require()`d plugins and sharable configs, while the system is ESM. Thus [conditional export](https://nodejs.org/api/packages.html#conditional-exports) is great to...

Less code written ## Fail ```js typeof foo === 'undefined' ``` ## Pass ```js foo === undefined ```

help wanted
new rule

```ts function isDefined(argument: T | undefined): argument is T { return typeof argument !== 'undefined' } const items = [1, 2, undefined] items.filter(isDefined).map((number) => { // number is now type...

bug
help wanted
types

Turns out `eslint-scope` has this reassign info, let's use it.

### Description Forbid assign `name`, `stack` (maybe also `cause`) to error. It's common to assign values to error for debug. ```js throw Object.assign(new Error('message'), {someUsefulInfomationCantDisplayInMessage}) ``` Normally it's fine, but...

evaluating
new rule

Eslint announced a new config spec. https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new It'd be better to be guided in README, along with the legacy config example. Thanks.

I get false-positives for the rule **no-array-method-this-argument** if using [find from cypress](https://docs.cypress.io/api/commands/find). Strangely this only occurs if the argument for find is a separate variable, see example: ```js const selector...

bug

There is the https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v43.0.2/docs/rules/no-unsafe-regex.md rule which uses [safe-regex](https://github.com/substack/safe-regex) under the hood. I had a short look at `safe-regex` and there haven't been any new releases since years. It would be...