talira

eslint-plugin-unicorn

More than 300 powerful ESLint rules

open sourceMITfree

eslint-plugin-unicorn adds more than 300 ESLint rules, mostly for JavaScript and TypeScript, with some that also lint CSS, HTML, JSON, Markdown, TOML and YAML when used with ESLint's language plugins. It requires ESLint 10.4 or later, flat config and ESM, and is included in the XO linter. It's by Sindre Sorhus.

Problems it solves

  • add a large set of best-practice lint rules to a JavaScript project
  • enforce modern JavaScript idioms with ESLint
  • lint TypeScript code with stricter rules

Features

  • 300+ ESLint rules
  • JavaScript and TypeScript rules
  • some rules for CSS, HTML, JSON, Markdown, TOML and YAML
  • flat config presets

Limitations

  • The maintainers don't accept pull requests; new rules are proposed through issues.1

Alternatives

The same job

These do what eslint-plugin-unicorn does.

  1. ESLint Find and fix problems in your JavaScript code.
  2. typescript-eslint The tooling that lets ESLint and Prettier lint and read TypeScript
  3. Airbnb JavaScript Style Guide Airbnb's JavaScript style guide and the ESLint configs that enforce it
  4. Oxc The JavaScript Oxidation Compiler: high-performance JavaScript and TypeScript tools in Rust
  5. Biome One fast toolchain that formats and lints JavaScript, TypeScript, JSON, CSS, HTML, GraphQL, YAML and Markdown.
  6. eslint-plugin-jsdoc JSDoc linting rules for ESLint.

Compare eslint-plugin-unicorn with the top 3