Skip to content

Commit

Permalink
fix(typescript): Flesh out no-empty-function allow list
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Sep 29, 2020
1 parent 6249318 commit 1d9438a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/eslint-config-zillow-typescript/rules/recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 41,23 @@ module.exports = {

// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-function.md
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 'error',
'@typescript-eslint/no-empty-function': [
'error',
{
allow: [
// built-in: https://eslint.org/docs/rules/no-empty-function
'arrowFunctions',
'functions',
'methods',
// this plugin
/*
'private-constructors',
'protected-constructors',
'decoratedFunctions',
*/
],
},
],

// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-empty-interface.md
'@typescript-eslint/no-empty-interface': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3238,6 3238,13 @@ Object {
],
"zillow/@typescript-eslint/no-empty-function": Array [
"error",
Object {
"allow": Array [
"arrowFunctions",
"functions",
"methods",
],
},
],
"zillow/@typescript-eslint/no-empty-interface": Array [
"error",
Expand Down

0 comments on commit 1d9438a

Please sign in to comment.