diff --git a/src/rules/no-underscore-dangle.md b/src/rules/no-underscore-dangle.md index e7363eb..5cde871 100644 --- a/src/rules/no-underscore-dangle.md +++ b/src/rules/no-underscore-dangle.md @@ -54,7 +54,6 @@ const foo = (_bar) => {}; 此规则选项为对象: -<<<<<<< HEAD * `"allow"` 允许指定的标识符有悬空的下划线 * `"allowAfterThis": false`(默认值)不允许在 `this` 对象的成员中使用悬空的下划线 * `"allowAfterSuper": false`(默认值)不允许在 `super` 对象的成员中使用悬空的下划线 @@ -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 diff --git a/src/use/getting-started.md b/src/use/getting-started.md index 68b8ec4..b6e8cb1 100644 --- a/src/use/getting-started.md +++ b/src/use/getting-started.md @@ -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 不会检查你的代码。 ## 全局安装 @@ -191,7 +138,6 @@ yarn run eslint yourfile.js ``` 更多关于可用命令行选项的信息,参见[命令行文档](./command-line-interface)。 ->>>>>>> 3ffc6a1 (docs: IA Update page URL move) ---