Skip to content

Commit

Permalink
fix(eslint-plugin): [no-empty-function] add missed node types (#1271)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk authored and bradzacher committed Nov 27, 2019
1 parent 3b931ac commit e9d44f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.js
Expand Up @@ -32,6 +32,12 @@ module.exports = {
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/unbound-method': 'off',

'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': [
'error',
{ allow: ['arrowFunctions'] },
],

//
// eslint base
//
Expand Down
4 changes: 1 addition & 3 deletions packages/eslint-plugin/src/rules/no-empty-function.ts
Expand Up @@ -118,9 +118,7 @@ export default util.createRule<Options, MessageIds>({
}

return {
FunctionDeclaration(node): void {
rules.FunctionDeclaration(node);
},
...rules,
FunctionExpression(node): void {
if (isAllowedEmptyConstructor(node)) {
return;
Expand Down

0 comments on commit e9d44f5

Please sign in to comment.