Skip to content

Commit

Permalink
feat(eslint-plugin): add link to no-empty-fn ops. use optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk committed Nov 26, 2019
1 parent 0f31406 commit 6c39b52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/eslint-plugin/docs/rules/no-empty-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ This rule has an object option:
- `allow` (`string[]`)
- `"protected-constructors"` - Protected class constructors.
- `"private-constructors"` - Private class constructors.
- [See the other options allowed](https://github.com/eslint/eslint/blob/master/docs/rules/no-empty-function.md#options)

#### allow: protected-constructors

Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-plugin/src/rules/no-empty-function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ export default util.createRule<Options, MessageIds>({
const parent = node.parent;
if (
isBodyEmpty(node) &&
parent &&
parent.type === 'MethodDefinition' &&
parent?.type === 'MethodDefinition' &&
parent.kind === 'constructor'
) {
const { accessibility } = parent;
Expand Down

0 comments on commit 6c39b52

Please sign in to comment.