Skip to content
Permalink
Browse files

fix(eslint-plugin): [no-empty-function] add missed node types (#1271)

  • Loading branch information
a-tarasyuk authored and bradzacher committed Nov 27, 2019
1 parent 3b931ac commit e9d44f51efcede276ba45462c10f93cea91ae2f0
Showing with 7 additions and 3 deletions.
  1. +6 −0 .eslintrc.js
  2. +1 −3 packages/eslint-plugin/src/rules/no-empty-function.ts
@@ -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
//
@@ -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;

0 comments on commit e9d44f5

Please sign in to comment.
You can’t perform that action at this time.