Skip to content

Commit

Permalink
fix(eslint-plugin): [no-extra-parens] Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed May 9, 2019
1 parent 2d15644 commit 298d66c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/eslint-plugin/src/rules/no-extra-parens.ts
@@ -1,4 +1,5 @@
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/typescript-estree';
import { RuleListener } from 'ts-eslint';
import baseRule from 'eslint/lib/rules/no-extra-parens';
import * as util from '../util';

Expand Down Expand Up @@ -84,7 +85,7 @@ export default util.createRule<Options, MessageIds>({
return rule(node);
}

return Object.assign({}, rules, {
const overrides: RuleListener = {
// ArrayExpression
ArrowFunctionExpression(node) {
if (node.body.type !== AST_NODE_TYPES.TSAsExpression) {
Expand Down Expand Up @@ -222,6 +223,7 @@ export default util.createRule<Options, MessageIds>({
return rules.YieldExpression(node);
}
},
});
};
return Object.assign({}, rules, overrides);
},
});

0 comments on commit 298d66c

Please sign in to comment.