An ESLint plugin providing over 100 powerful lint rules focused on best practices, consistency, and code quality. Current stable version is 64.0.0, with regular releases following semantic versioning. Key differentiators: actively maintained by Sindre Sorhus, includes many rules not found in other plugins (e.g., `better-regex`, `prefer-spread`, `no-array-for-each`), ships TypeScript types, and supports ESM-only with ESLint flat config (>=9.20.0). Requires Node ^20.10.0 or >=21.0.0 and ESLint >=9.38.0.
npm install eslint-plugin-unicornVerified import paths — ran on the pinned version, not inferred.
Minimum configuration to enable eslint-plugin-unicorn in flat config with recommended languageOptions and some example rules.
Migrate to eslint.config.js flat config
Update Node.js to ^20.10.0 or >=21.0.0
Update rule names in config
Use import statements; set type: module in package.json
Replace with current rule alternatives or remove from config
Install globals package and include globals.builtin in config
npm install --save-dev eslint-plugin-unicorn
Add plugins: { unicorn: eslintPluginUnicorn } to flat configUse ESM import; set type: module in package.json
Use eslintPluginUnicorn.configs.recommended in flat config array