Skip to content

Commit

Permalink
fix: Tighten RegExp.
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Oct 31, 2019
1 parent fe3d476 commit c3cbb93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/rules/rxjsNoRedundantNotifyRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class Rule extends Lint.Rules.TypedRule {
program: ts.Program
): Lint.RuleFailure[] {
const failures: Lint.RuleFailure[] = [];
const query = `ExpressionStatement[expression.expression.name.text=/(complete|error)/] ~ ExpressionStatement[expression.expression.name.text=/(next|complete|error)/]`;
const query = `ExpressionStatement[expression.expression.name.text=/^(complete|error)$/] ~ ExpressionStatement[expression.expression.name.text=/^(next|complete|error)$/]`;
const expressionStatements = tsquery(sourceFile, query);
expressionStatements.forEach(node => {
const expressionStatement = node as ts.ExpressionStatement;
Expand Down

0 comments on commit c3cbb93

Please sign in to comment.