-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4b99be
commit b60733d
Showing
6 changed files
with
25 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"root": true, | ||
"extends": ["standard"] | ||
} |
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,3 +1,18 @@ | ||
# MIP 2 | ||
|
||
这个项目包含 mip 核心代码和 mip-cli 的代码,位于 packages 目录下 | ||
|
||
## JavaScript 代码规范 | ||
|
||
使用 [eslint](https://eslint.org/) 代码规范检查工具,使用 JavaScript Standard Style [[CN](https://standardjs.com/rules-zhcn.html)/[EN](https://standardjs.com/rules-en.html)] 代码规范。 | ||
|
||
```sh | ||
# 在项目下运行检查所有文件 | ||
$ npm run lint | ||
|
||
# or 检查单独文件 | ||
$ npx eslint filename.js | ||
``` | ||
|
||
> **注意**:这里 `eslint-config-standard` 作为 eslint 的规范配置引入,在 `.eslintrc.json` 的 extends 配置项中使用,不需要安装 standard 工具,编辑器也不需要安装 standard 插件,只需要安装 eslint 的代码检查插件即可。 | ||
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