Skip to content

Commit

Permalink
docs: add options to check destructuring in no-underscore-dangle
Browse files Browse the repository at this point in the history
  • Loading branch information
kecrily committed Feb 28, 2023
1 parent 00cb6f6 commit 2968593
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/rules/no-underscore-dangle.md
Expand Up @@ -27,6 +27,7 @@ var _foo;
var foo_;
var __proto__ = {};
foo._bar();
const [_foo, ..._bar] = list;
```

:::
Expand All @@ -53,6 +54,7 @@ const foo = (_bar) => {};

此规则选项为对象:

<<<<<<< HEAD
* `"allow"` 允许指定的标识符有悬空的下划线
* `"allowAfterThis": false`(默认值)不允许在 `this` 对象的成员中使用悬空的下划线
* `"allowAfterSuper": false`(默认值)不允许在 `super` 对象的成员中使用悬空的下划线
Expand All @@ -62,6 +64,25 @@ 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

0 comments on commit 2968593

Please sign in to comment.