Index

在你的项目中使用 ESLint

本指南适用于希望将 ESLint 用作终端用户的人。如果你想了解如何扩展 ESLint 或使用 ESLint 源代码,请参阅 扩展 ESLint 文档

🌐 This guide is intended for those who wish to use ESLint as an end-user. If you’re looking for how to extend ESLint or work with the ESLint source code, please see the Extend ESLint documentation.

入门

🌐 Getting Started

想直接跳过前面的内容并开始使用 ESLint 吗?本节概述了安装、设置和配置选项。

🌐 Want to skip ahead and just start using ESLint? This section gives a high-level overview of installation, setup, and configuration options.

核心概念

🌐 Core Concepts

了解 ESLint 的主要组件以及如何在你的项目中使用它们。

🌐 Understand the main components of ESLint and how to use them in your project.

配置 ESLint

🌐 Configure ESLint

一旦你让 ESLint 运行起来,你可能会想调整配置以更好地适应你的项目。本节解释了配置 ESLint 的各种不同方法。

🌐 Once you’ve got ESLint running, you’ll probably want to adjust the configuration to better suit your project. This section explains all the different ways you can configure ESLint.

命令行接口参考

🌐 Command Line Interface Reference

ESLint 有很多命令行标志,本节将解释它们的作用。

🌐 There are a lot of command line flags for ESLint and this section explains what they do.

规则参考

🌐 Rules Reference

ESLint 有许多规则,你可以配置这些规则以微调适合你的项目。本节是每条规则的详尽列表,并提供每条规则文档的链接。

🌐 ESLint has a lot of rules that you can configure to fine-tune it to your project. This section is an exhaustive list of every rule and link to each rule’s documentation.

格式化参考

🌐 Formatters Reference

使用格式化程序控制代码检查结果的显示。在此页面查看所有内置格式化程序。

🌐 Control the appearance of the linting results with formatters. View all built-in formatters on this page.

集成

🌐 Integrations

想知道 ESLint 是否适用于你最喜欢的编辑器或构建系统?此页面列出了集成列表(由其作者提交)。

🌐 Wondering if ESLint will work with your favorite editor or build system? This page has a list of integrations (submitted by their authors).

规则弃用

🌐 Rule Deprecation

ESLint 团队致力于使升级尽可能简单和无痛。本节概述了团队为未来版本中规则的废弃所制定的指南。

🌐 The ESLint team is committed to making upgrading as easy and painless as possible. This section outlines the guidelines the team has set in place for the deprecation of rules in future releases.

迁移

🌐 Migrating

如果你使用的是早期版本的 ESLint,你可以通过阅读以下内容获得转换方面的帮助:

🌐 If you were using a prior version of ESLint, you can get help with the transition by reading: