Skip to content

Commit

Permalink
fix(check-examples): auto-disable no-empty-function rule for expr…
Browse files Browse the repository at this point in the history
…ession checking; clear it is a no-op in this context
  • Loading branch information
brettz9 committed Jul 9, 2021
1 parent e1b64fb commit 5a928db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .README/rules/check-examples.md
Expand Up @@ -156,10 +156,12 @@ For `checkDefaults`, `checkParams`, and `checkProperties`, the following
expression-oriented rules will be used by default as well:

* `quotes` - Will insist on "double".
* `semi` - Will insist on "never"
* `semi` - Will insist on "never".
* `strict` - Disabled.
* `no-empty-function` - Disabled.
* `no-new` - Disabled.
* `no-unused-expressions` - Disabled.
* `chai-friendly/no-unused-expressions` - Disabled.

##### Options for checking other than `@example` (`checkDefaults`, `checkParams`, or `checkProperties`)

Expand Down
4 changes: 3 additions & 1 deletion README.md
Expand Up @@ -1108,10 +1108,12 @@ For `checkDefaults`, `checkParams`, and `checkProperties`, the following
expression-oriented rules will be used by default as well:

* `quotes` - Will insist on "double".
* `semi` - Will insist on "never"
* `semi` - Will insist on "never".
* `strict` - Disabled.
* `no-empty-function` - Disabled.
* `no-new` - Disabled.
* `no-unused-expressions` - Disabled.
* `chai-friendly/no-unused-expressions` - Disabled.

<a name="eslint-plugin-jsdoc-rules-check-examples-options-for-determining-eslint-rule-applicability-allowinlineconfig-nodefaultexamplerules-matchingfilename-configfile-checkeslintrc-and-baseconfig-options-for-checking-other-than-example-checkdefaults-checkparams-or-checkproperties"></a>
##### Options for checking other than <code>@example</code> (<code>checkDefaults</code>, <code>checkParams</code>, or <code>checkProperties</code>)
Expand Down
1 change: 1 addition & 0 deletions src/rules/checkExamples.js
Expand Up @@ -61,6 +61,7 @@ const defaultMdRules = {
const defaultExpressionRules = {
...defaultMdRules,
'chai-friendly/no-unused-expressions': 'off',
'no-empty-function': 'off',
'no-new': 'off',
'no-unused-expressions': 'off',
quotes: ['error', 'double'],
Expand Down

0 comments on commit 5a928db

Please sign in to comment.