diff --git a/.eslintrc.js b/.eslintrc.js index 8f04af21654..42d8a09253b 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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 // diff --git a/packages/eslint-plugin/src/rules/no-empty-function.ts b/packages/eslint-plugin/src/rules/no-empty-function.ts index b0c88342a49..17f238abec1 100644 --- a/packages/eslint-plugin/src/rules/no-empty-function.ts +++ b/packages/eslint-plugin/src/rules/no-empty-function.ts @@ -118,9 +118,7 @@ export default util.createRule({ } return { - FunctionDeclaration(node): void { - rules.FunctionDeclaration(node); - }, + ...rules, FunctionExpression(node): void { if (isAllowedEmptyConstructor(node)) { return;