An AST-based pattern checker for JavaScript.

npm install eslint


npm version Downloads Build Status FOSSA Status
Open Collective Backers Open Collective Sponsors Follow us on Twitter


Website | Configuring | Rules | Contributing | Reporting Bugs | Code of Conduct | Twitter | Mailing List | Chat Room

ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. In many ways, it is similar to JSLint and JSHint with a few exceptions:

  • ESLint uses Espree for JavaScript parsing.
  • ESLint uses an AST to evaluate patterns in code.
  • ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.

Table of Contents

  1. Installation and Usage
  2. Configuration
  3. Code of Conduct
  4. Filing Issues
  5. Frequently Asked Questions
  6. Releases
  7. Security Policy
  8. Semantic Versioning Policy
  9. Stylistic Rule Updates
  10. License
  11. Team
  12. Sponsors
  13. Technology Sponsors

Installation and Usage

Prerequisites: Node.js (^12.22.0, ^14.17.0, or >=16.0.0) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.)

You can install and configure ESLint using this command:

npm init @eslint/config

After that, you can run ESLint on any file or directory like this:

./node_modules/.bin/eslint yourfile.js


After running npm init @eslint/config, you'll have a .eslintrc file in your directory. In it, you'll see some rules configured like this:

    "rules": {
        "semi": ["error", "always"],
        "quotes": ["error", "double"]

The names "semi" and "quotes" are the names of rules in ESLint. The first value is the error level of the rule and can be one of these values:

  • "off" or 0 - turn the rule off
  • "warn" or 1 - turn the rule on as a warning (doesn't affect exit code)
  • "error" or 2 - turn the rule on as an error (exit code will be 1)

The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the configuration docs).

Code of Conduct

ESLint adheres to the JS Foundation Code of Conduct.

Filing Issues

Before filing an issue, please be sure to read the guidelines for what you're reporting:

Frequently Asked Questions

I'm using JSCS, should I migrate to ESLint?

Yes. JSCS has reached end of life and is no longer supported.

We have prepared a migration guide to help you convert your JSCS settings to an ESLint configuration.

We are now at or near 100% compatibility with JSCS. If you try ESLint and believe we are not yet compatible with a JSCS rule/configuration, please create an issue (mentioning that it is a JSCS compatibility issue) and we will evaluate it as per our normal process.

Does Prettier replace ESLint?

No, ESLint does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions). You can use ESLint for everything, or you can combine both using Prettier to format your code and ESLint to catch possible errors.

Why can't ESLint find my plugins?

  • Make sure your plugins (and ESLint) are both in your project's package.json as devDependencies (or dependencies, if your project uses ESLint at runtime).
  • Make sure you have run npm install and all your dependencies are installed.
  • Make sure your plugins' peerDependencies have been installed as well. You can use npm view eslint-plugin-myplugin peerDependencies to see what peer dependencies eslint-plugin-myplugin has.

Does ESLint support JSX?

Yes, ESLint natively supports parsing JSX syntax (this must be enabled in configuration). Please note that supporting JSX syntax is not the same as supporting React. React applies specific semantics to JSX syntax that ESLint doesn't recognize. We recommend using eslint-plugin-react if you are using React and want React semantics.

What ECMAScript versions does ESLint support?

ESLint has full support for ECMAScript 3, 5 (default), 2015, 2016, 2017, 2018, 2019, 2020, 2021 and 2022. You can set your desired ECMAScript syntax (and other settings, like global variables or your target environments) through configuration.

What about experimental features?

ESLint's parser only officially supports the latest final ECMAScript standard. We will make changes to core rules in order to avoid crashes on stage 3 ECMAScript syntax proposals (as long as they are implemented using the correct experimental ESTree syntax). We may make changes to core rules to better work with language extensions (such as JSX, Flow, and TypeScript) on a case-by-case basis.

In other cases (including if rules need to warn on more or fewer cases due to new syntax, rather than just not crashing), we recommend you use other parsers and/or rule plugins. If you are using Babel, you can use @babel/eslint-parser and @babel/eslint-plugin to use any option available in Babel.

Once a language feature has been adopted into the ECMAScript standard (stage 4 according to the TC39 process), we will accept issues and pull requests related to the new feature, subject to our contributing guidelines. Until then, please use the appropriate parser and plugin(s) for your experimental feature.

Where to ask for help?

Join our Mailing List or Chatroom.

Why doesn't ESLint lock dependency versions?

Lock files like package-lock.json are helpful for deployed applications. They ensure that dependencies are consistent between environments and across deployments.

Packages like eslint that get published to the npm registry do not include lock files. npm install eslint as a user will respect version constraints in ESLint's package.json. ESLint and its dependencies will be included in the user's lock file if one exists, but ESLint's own lock file would not be used.

We intentionally don't lock dependency versions so that we have the latest compatible dependency versions in development and CI that our users get when installing ESLint in a project.

The Twilio blog has a deeper dive to learn more.


We have scheduled releases every two weeks on Friday or Saturday. You can follow a release issue for updates about the scheduling of any particular release.

Security Policy

ESLint takes security seriously. We work hard to ensure that ESLint is safe for everyone and that security issues are addressed quickly and responsibly. Read the full security policy.

Semantic Versioning Policy

ESLint follows semantic versioning. However, due to the nature of ESLint as a code quality tool, it's not always clear when a minor or major version bump occurs. To help clarify this for everyone, we've defined the following semantic versioning policy for ESLint:

  • Patch release (intended to not break your lint build)
    • A bug fix in a rule that results in ESLint reporting fewer linting errors.
    • A bug fix to the CLI or core (including formatters).
    • Improvements to documentation.
    • Non-user-facing changes such as refactoring code, adding, deleting, or modifying tests, and increasing test coverage.
    • Re-releasing after a failed release (i.e., publishing a release that doesn't work for anyone).
  • Minor release (might break your lint build)
    • A bug fix in a rule that results in ESLint reporting more linting errors.
    • A new rule is created.
    • A new option to an existing rule that does not result in ESLint reporting more linting errors by default.
    • A new addition to an existing rule to support a newly-added language feature (within the last 12 months) that will result in ESLint reporting more linting errors by default.
    • An existing rule is deprecated.
    • A new CLI capability is created.
    • New capabilities to the public API are added (new classes, new methods, new arguments to existing methods, etc.).
    • A new formatter is created.
    • eslint:recommended is updated and will result in strictly fewer linting errors (e.g., rule removals).
  • Major release (likely to break your lint build)
    • eslint:recommended is updated and may result in new linting errors (e.g., rule additions, most rule option updates).
    • A new option to an existing rule that results in ESLint reporting more linting errors by default.
    • An existing formatter is removed.
    • Part of the public API is removed or changed in an incompatible way. The public API includes:
      • Rule schemas
      • Configuration schema
      • Command-line options
      • Node.js API
      • Rule, formatter, parser, plugin APIs

According to our policy, any minor update may report more linting errors than the previous release (ex: from a bug fix). As such, we recommend using the tilde (~) in package.json e.g. "eslint": "~3.1.0" to guarantee the results of your builds.

Stylistic Rule Updates

Stylistic rules are frozen according to our policy on how we evaluate new rules and rule changes. This means:

  • Bug fixes: We will still fix bugs in stylistic rules.
  • New ECMAScript features: We will also make sure stylistic rules are compatible with new ECMAScript features.
  • New options: We will not add any new options to stylistic rules unless an option is the only way to fix a bug or support a newly-added ECMAScript feature.


FOSSA Status


These folks keep the project moving and are resources for help.

Technical Steering Committee (TSC)

The people who manage releases, review feature requests, and meet regularly to ensure ESLint is properly maintained.

technical steering committee (tsc)
Nicholas C. Zakas
technical steering committee (tsc)
Brandon Mills
technical steering committee (tsc)
Milos Djermanovic


The people who review and implement new features.

Nitin Kumar


The people who review and fix bugs and help triage issues.

Brett Zamir
Bryan Mishkin
Sara Soueidan
Pig Fang


The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.

Platinum Sponsors


Gold Sponsors

Salesforce Airbnb American Express

Silver Sponsors


Bronze Sponsors

launchdarkly Nx (by Nrwl) Anagram Solver VPS Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Ignition HeroCoders

Technology Sponsors

Release Notes

By ESLint Bot • Published on August 1, 2022


  • 7b43ea1 feat: Implement FlatESLint (#16149) (Nicholas C. Zakas)
  • 92bf49a feat: improve the key width calculation in key-spacing rule (#16154) (Nitin Kumar)
  • c461542 feat: add new allowLineSeparatedGroups option to the sort-keys rule (#16138) (Nitin Kumar)
  • 1cdcbca feat: add deprecation warnings for legacy API in RuleTester (#16063) (Nitin Kumar)

Bug Fixes

  • 0396775 fix: lines-around-comment apply allowBlockStart for switch statements (#16153) (Nitin Kumar)


  • 2aadc93 docs: add anchors to headings inside docs content (#16134) (Strek)


  • 8892511 chore: Upgrade to Espree 9.3.3 (#16173) (Brandon Mills)
  • 1233bee chore: switch to eslint-plugin-node's maintained fork (#16150) (唯然)
  • 97b95c0 chore: upgrade puppeteer v13 (#16151) (唯然)
By ESLint Bot • Published on July 16, 2022


  • ca83178 feat: catch preprocess errors (#16105) (JounQin)

Bug Fixes

  • 30be0ed fix: no-warning-comments rule escapes special RegEx characters in terms (#16090) (Lachlan Hunt)
  • bfe5e88 fix: ignore spacing before ] and } in comma-spacing (#16113) (Milos Djermanovic)


  • 845c4f4 docs: Add website team details (#16115) (Nicholas C. Zakas)
  • 5a0dfdb docs: Link to blog post in no-constant-binary-expression (#16112) (Jordan Eldredge)
  • bc692a9 docs: remove install command (#16084) (Strek)
  • 49ca3f0 docs: don't show toc when content not found (#16095) (Amaresh S M)
  • ba19e3f docs: enhance 404 page UI (#16097) (Amaresh S M)
  • a75d3b4 docs: remove unused meta.docs.category field in working-with-rules page (#16109) (Brandon Scott)
  • cdc0206 docs: add formatters page edit link (#16094) (Amaresh S M)
  • 4d1ed22 docs: preselect default theme (#16098) (Strek)
  • 4b79612 docs: add missing correct/incorrect containers (#16087) (Milos Djermanovic)
  • 09f6acb docs: fix UI bug on rules index and details pages (#16082) (Deepshika S)
  • f5db264 docs: remove remaining duplicate rule descriptions (#16093) (Milos Djermanovic)
  • 32a6b2a docs: Add scroll behaviour smooth (#16056) (Amaresh S M)


  • bbf8df4 chore: Mark autogenerated release blog post as draft (#16130) (Nicholas C. Zakas)
  • eee4306 chore: update internal lint dependencies (#16088) (Bryan Mishkin)
  • 9615a42 chore: update formatter examples template to avoid markdown lint error (#16085) (Milos Djermanovic)
  • 62541ed chore: fix markdown linting error (#16083) (唯然)
By ESLint Bot • Published on July 2, 2022


  • 7023628 feat: add importNames support for patterns in no-restricted-imports (#16059) (Brandon Scott)
  • 472c368 feat: fix handling of blockless with statements in indent rule (#16068) (Milos Djermanovic)

Bug Fixes

  • fc81848 fix: throw helpful exception when rule has wrong return type (#16075) (Bryan Mishkin)


  • 3ae0574 docs: Remove duplicate rule descriptions (#16052) (Amaresh S M)
  • f50cf43 docs: Add base href to each page to fix relative URLs (#16046) (Nicholas C. Zakas)
  • ae4b449 docs: make logo link clickable on small width screens (#16058) (Milos Djermanovic)
  • 280f898 docs: use only fenced code blocks (#16044) (Milos Djermanovic)
  • f5d63b9 docs: add listener only if element exists (#16045) (Amaresh S M)
  • 8b639cc docs: add missing migrating-to-8.0.0 in the user guide (#16048) (唯然)
  • b8e68c1 docs: Update release process (#16036) (Nicholas C. Zakas)
  • 6d0cb11 docs: remove table of contents from markdown text (#15999) (Nitin Kumar)


  • e884933 chore: use github-slugger for markdown anchors (#16067) (Strek)
  • 02e9cb0 chore: revamp carbon ad style (#16078) (Amaresh S M)
  • b6aee95 chore: remove unwanted comments from rules markdown (#16054) (Strek)
  • 6840940 chore: correctly use .markdownlintignore in Makefile (#16060) (Bryan Mishkin)
  • 48904fb chore: add missing images (#16017) (Amaresh S M)
  • 910f741 chore: add architecture to nav (#16039) (Strek)
  • 9bb24c1 chore: add correct incorrect in all rules doc (#16021) (Deepshika S)
  • 5a96af8 chore: prepare versions data file (#16035) (Nicholas C. Zakas)
  • 50afe6f chore: Included githubactions in the dependabot config (#15985) (Naveen)
  • 473411e chore: add deploy workflow for playground (#16034) (Milos Djermanovic)
  • a30b66c chore: fix print style (#16025) (Amaresh S M)
  • f4dad59 chore: add noindex meta tag (#16016) (Milos Djermanovic)
  • db387a8 chore: fix sitemap (#16026) (Milos Djermanovic)
  • 285fbc5 chore: remove TOC from printable (#16020) (Strek)
  • 8e84c21 chore: remove ligatures from fonts (#16019) (Strek)
By ESLint Bot • Published on June 17, 2022


  • a6273b8 feat: account for rule creation time in performance reports (#15982) (Nitin Kumar)

Bug Fixes

  • f364d47 fix: Make no-unused-vars treat for..of loops same as for..in loops (#15868) (Alex Bass)


  • 4871047 docs: Update analytics, canonical URL, ads (#15996) (Nicholas C. Zakas)
  • cddad14 docs: Add correct/incorrect containers (#15998) (Nicholas C. Zakas)
  • b04bc6f docs: Add rules meta info to rule pages (#15902) (Nicholas C. Zakas)
  • 1324f10 docs: unify the wording referring to optional exception (#15893) (Abdelrahman Elkady)
  • ad54d02 docs: add missing trailing slash to some internal links (#15991) (Milos Djermanovic)
  • df7768e docs: Switch to version-relative URLs (#15978) (Nicholas C. Zakas)
  • 21d6479 docs: change some absolute links to relative (#15970) (Milos Djermanovic)
  • f31216a docs: Update README team and sponsors (ESLint Jenkins)
  • ed49f15 build: remove unwanted parallel and image-min for dev server (#15986) (Strek)


  • f6e2e63 chore: fix 'replaced by' rule list (#16007) (Milos Djermanovic)
  • d94dc84 chore: remove unused deprecation warnings (#15994) (Francesco Trotta)
  • cdcf11e chore: fix versions link (#15995) (Milos Djermanovic)
  • d2a8715 chore: add trailing slash to pathPrefix (#15993) (Milos Djermanovic)
  • 58a1bf0 chore: tweak URL rewriting for local previews (#15992) (Milos Djermanovic)
  • 80404d2 chore: remove docs deploy workflow (#15984) (Nicholas C. Zakas)
  • 71bc750 chore: Set permissions for GitHub actions (#15971) (Naveen)
  • 90ff647 chore: avoid generating subdirectories for each page on new docs site (#15967) (Milos Djermanovic)
By ESLint Bot • Published on June 3, 2022


  • 55319e1 feat: fix indent bug with semicolon-first style (#15951) (Milos Djermanovic)
  • f6d7920 feat: add allowNamedExports option to no-use-before-define (#15953) (Milos Djermanovic)

Bug Fixes

  • 54c0953 fix: cleanup typos (#15939) (Nick Schonning)
  • 845a7af fix: typo ocatal -> octal (#15940) (Nick Schonning)


  • b915018 docs: Update website UI to latest (#15944) (Nicholas C. Zakas)
  • f0bb609 docs: Update Exponentiation operator MDN link (#15960) (Pranjal Jain)
  • baa0153 docs: Use correct past tense "left" instead of "leaved" (#15950) (Frederik Braun)
  • 1351a9b docs: Add Resources section to rule pages (#15901) (Nicholas C. Zakas)
  • 68cf0fb docs: cleanup typos (#15936) (Nick Schonning)
  • 13b62ae docs: use-dart-sass instead of node-sass (#15912) (Deepshika S)
  • c81c5d6 docs: add social media links (#15920) (Deepshika S)
  • 0d6a50b docs: fix openjs link (#15917) (Amaresh S M)
  • 54910f5 docs: display version in mobile view (#15909) (Amaresh S M)


  • da694b9 chore: avoid theme flashes (#15927) (Strek)
  • f836743 chore: Use build hook for docs deploy (#15945) (Nicholas C. Zakas)
  • ce035e5 test: cleanup typos (#15937) (Nick Schonning)
  • 10249ad chore: use addEventListener instead of addListener (#15923) (Amaresh S M)
  • 5f5c1fb chore: lint eleventy config file (#15904) (Milos Djermanovic)
  • 8513d37 chore: update Rule typedefs (#15915) (Milos Djermanovic)
  • 55534f1 test: ensure no-restricted-imports works with NodeJS imports (#15907) (Nick Mazuk)
By ESLint Bot • Published on May 20, 2022


  • cab0c22 feat: add Unicode flag suggestion in no-misleading-character-class (#15867) (Milos Djermanovic)
  • 38ae956 feat: check Unicode code point escapes in no-control-regex (#15862) (Milos Djermanovic)
  • ee69cd3 feat: Update global variables (#15871) (Sébastien Règne)

Bug Fixes

  • 3f09aab fix: function-paren-newline crash on "new new Foo();" (#15850) (coderaiser)


  • 050d5f4 docs: Static further reading links (#15890) (Nicholas C. Zakas)
  • 36287c0 docs: fix absolute paths in related rules shortcode to work from /docs (#15892) (Milos Djermanovic)
  • 90b6990 docs: fix absolute links in rule macro to work from /docs (#15891) (Milos Djermanovic)
  • f437249 docs: Adjust docs site path prefix (#15889) (Nicholas C. Zakas)
  • 6e16025 docs: update 'Related Rules' and 'Further Reading' in remaining rules (#15884) (Milos Djermanovic)
  • 1d39f69 docs: remove confusing examples for no-mixed-operators (#15875) (Milos Djermanovic)
  • 3071d76 docs: Fix some grammar issues (#15837) (byodian)


  • 1768d0d chore: upgrade @eslint/[email protected] (#15903) (Milos Djermanovic)
  • c686e4c chore: Add deploy workflow for docs site (#15894) (Nicholas C. Zakas)
  • c7894cd chore: enable some rules from eslint-plugin-unicorn internally (#15878) (Bryan Mishkin)
  • ea65cb5 chore: upgrade [email protected]^4.2.0 (#15882) (唯然)
  • cc29c69 chore: Upgrade official GitHub actions to latest versions (#15880) (Darius Dzien)
  • 5891c75 chore: Refactor rule docs format (#15869) (Nicholas C. Zakas)
By ESLint Bot • Published on May 6, 2022


  • ab37d3b feat: add enforceInClassFields option to no-underscore-dangle (#15818) (Roberto Cestari)

Bug Fixes

  • 8bf9440 fix: "use strict" should not trigger strict mode in ES3 (#15846) (Milos Djermanovic)


  • 28116cc docs: update AST node names link in no-restricted-syntax (#15843) (Milos Djermanovic)
  • 272965f docs: fix h1 heading on formatters page (#15834) (Milos Djermanovic)
  • a798166 docs: update example for running individual rule tests (#15833) (Milos Djermanovic)
  • 57e732b docs: mark SourceCode#getJSDocComment deprecated in working-with-rules (#15829) (Milos Djermanovic)
  • 9a90abf docs: update docs directory in working-with-rules (#15830) (Milos Djermanovic)
  • 810adda docs: add more examples for prefer-object-spread (#15831) (coderaiser)
  • 06b1edb docs: clarify no-control-regex rule (#15808) (Milos Djermanovic)
  • 9ecd42f docs: Fixed typo in code comment (#15812) (Addison G)
  • de992b7 docs: remove links to 2fa document (#15804) (Milos Djermanovic)
  • 5222659 docs: fix 'Related Rules' heading in no-constant-binary-expression (#15799) (Milos Djermanovic)
  • e70ae81 docs: Update README team and sponsors (ESLint Jenkins)


  • 1ba6a92 chore: upgrade @eslint/[email protected] (#15847) (Milos Djermanovic)
  • 8167aa7 chore: bump version of minimatch due to security issue PRISMA-2022-0039 (#15774) (Jan Opravil)
  • b8995a4 chore: Implement docs site (#15815) (Nicholas C. Zakas)
  • 6494e3e chore: update link in codeql-analysis.yml (#15817) (Milos Djermanovic)
  • 36503ec chore: enable no-constant-binary-expression in eslint-config-eslint (#15807) (唯然)
By ESLint Bot • Published on April 22, 2022


  • ab6363d feat: Add rule no-constant-binary-expression (#15296) (Jordan Eldredge)

Bug Fixes

  • 35fa1dd fix: allow project paths to have URL-encoded characters (#15795) (Milos Djermanovic)
  • 413f1d5 fix: update astUtils.isDirectiveComment with globals and exported (#15775) (Milos Djermanovic)
  • c2407e8 build: add node v18 (#15791) (唯然)


  • 735458c chore: add static frontmatter to no-constant-binary-expression docs (#15798) (Milos Djermanovic)
  • db28f2c chore: Add static frontmatter to docs (#15782) (Nicholas C. Zakas)
  • 3bca59e chore: markdownlint autofix on commit (#15783) (Nicholas C. Zakas)
By ESLint Bot • Published on April 8, 2022


  • 274acbd feat: fix no-eval logic for this in arrow functions (#15755) (Milos Djermanovic)

Bug Fixes

  • 97b57ae fix: invalid operator in operator-assignment messages (#15759) (Milos Djermanovic)


  • c32482e docs: Typo in space-infix-ops docs (#15754) (kmin-jeong)
  • f2c2d35 docs: disambiguate types FormatterFunction and LoadedFormatter (#15727) (Francesco Trotta)


  • bb4c0d5 chore: Refactor docs to work with docs.eslint.org (#15744) (Nicholas C. Zakas)
  • d36f12f chore: remove lib/init from eslint config (#15748) (Milos Djermanovic)
  • a59a4e6 chore: replace trimLeft/trimRight with trimStart/trimEnd (#15750) (Milos Djermanovic)
By ESLint Bot • Published on March 25, 2022


  • 685a67a feat: fix logic for top-level this in no-invalid-this and no-eval (#15712) (Milos Djermanovic)


  • 18f5e05 chore: padding-line-between-statements remove useless additionalItems (#15706) (Martin Sadovy)


Typescript Types


GitHub Stargazers
Community Interest
Number of Forks


Last Commit
Open Issues
Closed Issues
Open Pull Requests
Closed Pull Requests


Versions Released
Latest Version Released
Aug 1, 2022
Current Tags


Commits: 790
Commits: 510
Commits: 335
Commits: 297
Commits: 231
Commits: 182
Commits: 161
Commits: 156
Commits: 149
Commits: 139
Commits: 135
Commits: 112
Commits: 82
Commits: 71
Commits: 69