🔧
Build Tool35M+/wkMIT

eslint

ESLint is the standard linting tool for JavaScript and TypeScript that analyzes your code to find and fix problems, enforce coding conventions, and catch potent

Installation

npm
npm install -D eslint
yarn
yarn add -D eslint
pnpm
pnpm add -D eslint

Import

ESM
// eslint.config.js

Quick Example

usage
// eslint.config.js
import js from '@eslint/js';
import tseslint from 'typescript-eslint';

export default [
  js.configs.recommended,
  ...tseslint.configs.recommended,
  {
    rules: {
      'no-unused-vars': 'warn',
    },
  },
];

About eslint

ESLint is the standard linting tool for JavaScript and TypeScript that analyzes your code to find and fix problems, enforce coding conventions, and catch potential bugs before they reach production. ESLint uses a pluggable architecture where rules are individually configurable — each rule can be turned off, set to warn, or set to error, and many rules accept additional configuration options. The tool parses source code into an AST and applies rules that check for patterns, with auto-fix capabilities for many common issues. ESLint's flat config system (eslint.config.js) provides a simpler, more powerful configuration model. The ecosystem includes thousands of rules through plugins like @typescript-eslint for TypeScript-specific rules, eslint-plugin-react for React patterns, eslint-plugin-import for module import conventions, eslint-plugin-jsx-a11y for accessibility checks, and eslint-plugin-security for security anti-patterns. ESLint integrates with all major editors for real-time feedback, with CI pipelines for enforcing standards, and with Git hooks through lint-staged and Husky for pre-commit checks. ESLint has become an indispensable part of modern JavaScript development workflows.

Quick Facts

Packageeslint
CategoryBuild Tool
Weekly Downloads35M+
LicenseMIT
Installnpm install -D eslint

Related Packages

Browse npm Packages by Category

Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.