-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: sync v8.33.0 * Apply suggestions from code review Co-authored-by: Milos Djermanovic <[email protected]> * chore: update --------- Co-authored-by: Milos Djermanovic <[email protected]>
- Loading branch information
1 parent
c7b77c7
commit c1f5d0b
Showing
51 changed files
with
685 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: 行为准则 | ||
eleventyNavigation: | ||
key: code of conduct | ||
parent: contribute to eslint | ||
title: 行为准则 | ||
order: 0 | ||
--- | ||
|
||
ESLint 欢迎所有遵守 [OpenJS 基金会行为准则](https://eslint.org/conduct)的贡献。我们恳请您在贡献之前仔细阅读此行为准则。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
--- | ||
title: 开发环境 | ||
title: 设置开发环境 | ||
eleventyNavigation: | ||
key: set up a development environment | ||
parent: developer guide | ||
parent: contribute to eslint | ||
title: 设置开发环境 | ||
order: 2 | ||
|
||
order: 6 | ||
--- | ||
|
||
ESLint 有个非常轻量的开发环境,这使得更新代码快速而简单。下面是在给项目提交贡献前,关于建立本地开发环境的分步指南。 | ||
ESLint 的开发环境十分轻量,这使得更新代码快速而简单。下面是在给项目提交贡献前,关于建立本地开发环境的分步指南。 | ||
|
||
## 第一步:安装 Node.js | ||
|
||
|
@@ -20,6 +19,12 @@ ESLint 有个非常轻量的开发环境,这使得更新代码快速而简单 | |
|
||
进入 <https://github.com/eslint/eslint>,点击“Fork”按钮。然后按照 [GitHub 文档](https://help.github.com/articles/fork-a-repo)进行分叉和克隆。 | ||
|
||
克隆自己的分叉: | ||
|
||
```shell | ||
git clone https://github.com/<你的 Github 用户名>/eslint | ||
``` | ||
|
||
在克隆仓库后,需要运行 `npm install` 以获得所有必要的依赖。 | ||
|
||
```shell | ||
|
@@ -29,11 +34,13 @@ npm install | |
|
||
此步骤必须连接网络。它需要下载很多实用程序。 | ||
|
||
**注意**:每次从主仓库拉取代码后都重新运行 `npm install` 有助于确保使用最新的开发依赖。 | ||
|
||
## 第三步:添加上游源码 | ||
|
||
**上游源码**是指 ESLint 的主要仓库,那里有活跃的开发。虽然你没有上游的推送权限,但你会有拉取权限,你可以随时拉取最新的代码。 | ||
**上游源**是指 ESLint 的主要仓库,那里有活跃的开发。虽然你没有上游的推送权限,但你会有拉取权限,你可以随时拉取最新的代码。 | ||
|
||
要添加 ESLint 的上游源码,请在你的仓库中运行以下程序: | ||
要添加 ESLint 的上游源,请在你的仓库中运行以下程序: | ||
|
||
```shell | ||
git remote add upstream [email protected]:eslint/eslint.git | ||
|
@@ -69,9 +76,24 @@ npm test | |
|
||
## 参考信息 | ||
|
||
### 目录结构 | ||
|
||
ESLint 目录和文件结构如下所示: | ||
|
||
* `bin` - 在安装 ESLint 后使用的课执行文件 | ||
* `conf` - 默认配置信息 | ||
* `docs` - 项目文档 | ||
* `lib` - 包括源码 | ||
* `formatters` - 定义格式化工具的所有源码 | ||
* `rules` - 定义规则的所有源码 | ||
* `tests` - 主要的单元测试文件夹 | ||
* `lib` - 源码的测试 | ||
* `formatters` - 格式化工具的测试 | ||
* `rules` - 规则的测试 | ||
|
||
### 工作流程 | ||
|
||
在安装好开发环境后,你就可以对 ESLint 的源文件进行修改并提交。提交时需要认真遵守我们的 [pull-request 提交工作流程](./pull-requests)。 | ||
在安装好开发环境后,你就可以对 ESLint 的源文件进行修改并提交。提交时需要认真遵守我们的[拉取请求提交流程](./pull-requests)。 | ||
|
||
### 构建脚本 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: 报告安全漏洞 | ||
eleventyNavigation: | ||
key: report security vulnerability | ||
parent: contribute to eslint | ||
title: 报告安全漏洞 | ||
order: 11 | ||
--- | ||
|
||
要报告 ESLint 中的安全漏洞,请使用我们在 GitHub 的[创建建议表单](https://github.com/eslint/eslint/security/advisories/new)。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.