Skip to content

Commit ac381bc

Browse files
Account for v flag in 2 util methods (#570)
* Account for `v` flag in 2 util methods * Create thin-ears-relax.md
1 parent 7376975 commit ac381bc

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.changeset/thin-ears-relax.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-regexp": patch
3+
---
4+
5+
Account for `v` flag in 2 util methods

lib/utils/regexp-ast/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ export function getJSRegexppAst(
8484

8585
return {
8686
pattern: patternAst,
87-
// FIXME: TS Error
88-
// @ts-expect-error -- FIXME
8987
flags: {
9088
type: "Flags",
9189
raw: flagsString ?? "",
@@ -99,6 +97,7 @@ export function getJSRegexppAst(
9997
multiline: flags.multiline ?? false,
10098
sticky: !ignoreSticky && (flags.sticky ?? false),
10199
unicode: flags.unicode ?? false,
100+
unicodeSets: flags.unicodeSets ?? false,
102101
},
103102
}
104103
}

lib/utils/regexp-ast/is-equals.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ const EQUALS_CHECKER = {
142142
a.global === b.global &&
143143
a.ignoreCase === b.ignoreCase &&
144144
a.multiline === b.multiline &&
145+
a.hasIndices === b.hasIndices &&
145146
a.sticky === b.sticky &&
146-
a.unicode === b.unicode
147+
a.unicode === b.unicode &&
148+
a.unicodeSets === b.unicodeSets
147149
)
148150
},
149151
Group(

0 commit comments

Comments
 (0)