在你的项目中使用 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

使用格式化程序控制 linting 结果的外观。查看此页面上的所有内置格式化程序。

¥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:

ESLint 中文网
粤ICP备13048890号