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