Skip to content

Commit

Permalink
fix: Fix text errors caused by eslint#95 merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
GaliMu committed Apr 11, 2023
1 parent d8d4b58 commit 132a3fb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 74 deletions.
20 changes: 0 additions & 20 deletions src/rules/no-underscore-dangle.md
Expand Up @@ -54,7 +54,6 @@ const foo = (_bar) => {};

此规则选项为对象:

<<<<<<< HEAD
* `"allow"` 允许指定的标识符有悬空的下划线
* `"allowAfterThis": false`(默认值)不允许在 `this` 对象的成员中使用悬空的下划线
* `"allowAfterSuper": false`(默认值)不允许在 `super` 对象的成员中使用悬空的下划线
Expand All @@ -64,25 +63,6 @@ const foo = (_bar) => {};
* `"allowInArrayDestructuring": true`(默认值)允许在由数组解构分配的变量名称中使用悬空的下划线
* `"allowInObjectDestructuring": true`(默认值)允许在对象解构分配的变量名称中使用悬空的下划线
* `"allowFunctionParams": true`(默认值)允许在函数参数名称中使用悬空的下划线
||||||| parent of c89c5dc (docs: add options to check destructuring in no-underscore-dangle)
* `"allow"` 允许指定的标识符有悬空的下划线。
* `"allowAfterThis": false`(默认值)不允许在 `this` 对象的成员中使用悬空的下划线。
* `"allowAfterSuper": false`(默认值)不允许在 `super` 对象的成员中使用悬空的下划线。
* `"allowAfterThisConstructor": false`(默认值)不允许在 `this.constructor` 对象的成员中使用悬空的下划线。
* `"enforceInMethodNames": false`(默认值)允许在方法名称中使用悬空的下划线。
* `"enforceInClassFields": false`(默认值)允许在 es2022 类字段名中使用悬空的下划线。
* `"allowFunctionParams": true`(默认值)允许在函数参数名称中使用悬空的下划线。
=======
* `"allow"` 允许指定的标识符有悬空的下划线
* `"allowAfterThis": false`(默认值)不允许在 `this` 对象的成员中使用悬空的下划线
* `"allowAfterSuper": false`(默认值)不允许在 `super` 对象的成员中使用悬空的下划线
* `"allowAfterThisConstructor": false`(默认值)不允许在 `this.constructor` 对象的成员中使用悬空的下划线
* `"enforceInMethodNames": false`(默认值)允许在方法名称中使用悬空的下划线
* `"enforceInClassFields": false`(默认值)允许在 es2022 类字段名中使用悬空的下划线
* `"allowInArrayDestructuring": true`(默认值)允许在由数组解构分配的变量名称中使用悬空的下划线
* `"allowInObjectDestructuring": true`(默认值)允许在对象解构分配的变量名称中使用悬空的下划线
* `"allowFunctionParams": true`(默认值)允许在函数参数名称中使用悬空的下划线
>>>>>>> c89c5dc (docs: add options to check destructuring in no-underscore-dangle)

### allow

Expand Down
54 changes: 0 additions & 54 deletions src/use/getting-started.md
Expand Up @@ -89,59 +89,6 @@ yarn run eslint yourfile.js
}
```

<<<<<<< HEAD
这一行将启用[所有标记为“推荐”的规则](../rules/)。另外,你也可以通过在 [npmjs.com](https://www.npmjs.com/search?q=eslint-config) 上搜索“eslint-config”并使用别人创建的配置。在没有扩展别人的可共享配置或在配置中明确启用规则时,ESLint 不会限制你的代码。
||||||| parent of 3ffc6a1 (docs: IA Update page URL move)
这一行将启用[所有标记为“推荐”的规则](../rules)。另外,你也可以通过在 [npmjs.com](https://www.npmjs.com/search?q=eslint-config) 上搜索“eslint-config”并使用别人创建的配置。在没有使用别人的可共享配置或在配置中明确启用规则时,ESLint 不会检查你的代码。

## 全局安装

也可以全局安装 ESLint 而不仅限于羡慕本地(使用 `npm install eslint --global`)。但并不推荐这样做,因为即使全局安装 ESLint,你仍需要在本地安装插件和可共享配置。

## 手动设置

你也可以在项目中手动设置 ESLint.

在开始前你必须确保存在 `package.json` 文件。如果不存在,请优先运行 `npm init``yarn init` 来创建此文件。

1. 在项目中安装 ESLint 包:

```shell
npm install --save-dev eslint
```

1. 添加任一[支持的配置文件格式](./configuring/configuration-files#配置文件格式)`.eslintrc` 文件。

```shell
# 创建 JavaScript 配置文件
touch .eslintrc.js
```

1.`.eslintrc` 文件中添加配置。阅读[配置 ESLint 文档](configuring/)学习如何添加规则、环境、自定义配置、插件以及其他内容。

```js
// .eslintrc.js 示例
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
}
```

1. 使用 ESLint 命令行检查代码:

```shell
npx eslint project-dir/ file1.js
```

更多关于可用命令行选项的信息,参见[命令行文档](./command-line-interface)
=======
这一行将启用[所有标记为“推荐”的规则](../rules)。另外,你也可以通过在 [npmjs.com](https://www.npmjs.com/search?q=eslint-config) 上搜索“eslint-config”并使用别人创建的配置。在没有使用别人的可共享配置或在配置中明确启用规则时,ESLint 不会检查你的代码。

## 全局安装
Expand Down Expand Up @@ -191,7 +138,6 @@ yarn run eslint yourfile.js
```

更多关于可用命令行选项的信息,参见[命令行文档](./command-line-interface)
>>>>>>> 3ffc6a1 (docs: IA Update page URL move)

---

Expand Down

0 comments on commit 132a3fb

Please sign in to comment.