ESLint is a powerful, pluggable tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, enforcing coding standards and catching potential issues. It uses an AST-based parser and is entirely pluggable. The current stable version is v10.2.1. It follows a frequent release cadence for minor features and bug fixes, with major versions introducing breaking changes.
npm install eslintVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to programmatically use the ESLint class to lint a string of JavaScript code with a custom configuration, reporting any found issues.
Upgrade Node.js to a supported version.
Refactor your `eslint.config.js` to use `import` and `export` statements, for example, `export default defineConfig(...)`.
Ensure your project is configured for ESM, and use `import { ESLint } from 'eslint';`.Add `auto-install-peers=true` and `node-linker=hoisted` to your `.npmrc` file and reinstall dependencies.
Ensure your project's `typescript` dependency is at version 5.3 or newer.
Upgrade your Node.js installation to v20.19.0, v22.13.0, or >=24.
Ensure you are using `import { ESLint } from 'eslint';` in an ESM module context.Convert your project or specific file to use ESM `import` statements, and ensure your `eslint.config.js` is also ESM.
Add `auto-install-peers=true` and `node-linker=hoisted` to your `.npmrc` file and reinstall dependencies.
Update TypeScript to version 5.3 or later, or ensure `eslint` is properly installed in your `node_modules`.
No dependency data recorded yet.