Skip to content

Commit

Permalink
Add support for d flag (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Jun 24, 2021
1 parent f1af48d commit 6ac574c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 102 deletions.
2 changes: 1 addition & 1 deletion lib/rules/no-non-standard-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { RegExpVisitor } from "regexpp/visitor"
import type { RegExpContext } from "../utils"
import { createRule, defineRegexpVisitor } from "../utils"

const STANDARD_FLAGS = "gimsuy"
const STANDARD_FLAGS = "dgimsuy"

export default createRule("no-non-standard-flag", {
meta: {
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-super-linear-backtracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function getParsedLiteral(context: RegExpContext): ParsedLiteral {
end: NaN,
dotAll: flags.dotAll ?? false,
global: flags.global ?? false,
hasIndices: flags.hasIndices ?? false,
ignoreCase: flags.ignoreCase ?? false,
multiline: flags.multiline ?? false,
sticky: flags.sticky ?? false,
Expand Down
1 change: 1 addition & 0 deletions lib/rules/no-super-linear-move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function getParsedLiteral(
end: NaN,
dotAll: flags.dotAll ?? false,
global: flags.global ?? false,
hasIndices: flags.hasIndices ?? false,
ignoreCase: flags.ignoreCase ?? false,
multiline: flags.multiline ?? false,
sticky: !ignoreSticky && (flags.sticky ?? false),
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"jsdoctypeparser": "^9.0.0",
"refa": "^0.8.0",
"regexp-ast-analysis": "^0.2.2",
"regexpp": "^3.1.0",
"regexpp": "^3.2.0",
"scslre": "^0.1.5"
}
}
97 changes: 0 additions & 97 deletions tests/lib/rules-with-d-flag.ts

This file was deleted.

0 comments on commit 6ac574c

Please sign in to comment.