Skip to content

Commit 0bf7612

Browse files
committed
fix: use unicode flag
1 parent 5f6f9aa commit 0bf7612

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,11 +1882,11 @@ The following patterns are considered problems:
18821882
18831883
```js
18841884
interface foo{};
1885-
// Message: Interface identifier 'foo' does not match pattern '/^([A-Z][a-z0-9]*)+Type$/'.
1885+
// Message: Interface identifier 'foo' does not match pattern '/^([A-Z][a-z0-9]*)+Type$/u'.
18861886

18871887
// Options: ["^foo$"]
18881888
interface FooType{};
1889-
// Message: Interface identifier 'FooType' does not match pattern '/^foo$/'.
1889+
// Message: Interface identifier 'FooType' does not match pattern '/^foo$/u'.
18901890
```
18911891
18921892
The following patterns are not considered problems:
@@ -2222,12 +2222,12 @@ const text = 'HELLO';
22222222
// Options: ["TODO [0-9]+"]
22232223
// $FlowFixMe I am doing something evil here
22242224
const text = 'HELLO';
2225-
// Message: $FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/`.
2225+
// Message: $FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/u`.
22262226

22272227
// Options: ["TODO [0-9]+"]
22282228
// $FlowFixMe TODO abc 47 I am doing something evil here
22292229
const text = 'HELLO';
2230-
// Message: $FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/`.
2230+
// Message: $FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/u`.
22312231

22322232
// $$FlowFixMeProps I am doing something evil here
22332233
const text = 'HELLO';
@@ -2236,7 +2236,7 @@ const text = 'HELLO';
22362236
// Options: ["TODO [0-9]+"]
22372237
// $FlowFixMeProps I am doing something evil here
22382238
const text = 'HELLO';
2239-
// Message: $FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/`.
2239+
// Message: $FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/u`.
22402240
```
22412241
22422242
The following patterns are not considered problems:
@@ -6687,14 +6687,14 @@ The following patterns are considered problems:
66876687

66886688
```js
66896689
opaque type foo = {};
6690-
// Message: Type identifier 'foo' does not match pattern '/^([A-Z][a-z0-9]*)+Type$/'.
6690+
// Message: Type identifier 'foo' does not match pattern '/^([A-Z][a-z0-9]*)+Type$/u'.
66916691
66926692
type foo = {};
6693-
// Message: Type identifier 'foo' does not match pattern '/^([A-Z][a-z0-9]*)+Type$/'.
6693+
// Message: Type identifier 'foo' does not match pattern '/^([A-Z][a-z0-9]*)+Type$/u'.
66946694
66956695
// Options: ["^foo$"]
66966696
type FooType = {};
6697-
// Message: Type identifier 'FooType' does not match pattern '/^foo$/'.
6697+
// Message: Type identifier 'FooType' does not match pattern '/^foo$/u'.
66986698
```
66996699

67006700
The following patterns are not considered problems:

tests/rules/assertions/interfaceIdMatch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ export default {
44
code: 'interface foo{};',
55
errors: [
66
{
7-
message: 'Interface identifier \'foo\' does not match pattern \'/^([A-Z][a-z0-9]*)+Type$/\'.',
7+
message: 'Interface identifier \'foo\' does not match pattern \'/^([A-Z][a-z0-9]*)+Type$/u\'.',
88
},
99
],
1010
},
1111
{
1212
code: 'interface FooType{};',
1313
errors: [
1414
{
15-
message: 'Interface identifier \'FooType\' does not match pattern \'/^foo$/\'.',
15+
message: 'Interface identifier \'FooType\' does not match pattern \'/^foo$/u\'.',
1616
},
1717
],
1818
options: [

tests/rules/assertions/noFlowFixMeComments.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
code: '// $FlowFixMe I am doing something evil here\nconst text = \'HELLO\';',
1313
errors: [
1414
{
15-
message: '$FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/`.',
15+
message: '$FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/u`.',
1616
},
1717
],
1818
options: [
@@ -23,7 +23,7 @@ export default {
2323
code: '// $FlowFixMe TODO abc 47 I am doing something evil here\nconst text = \'HELLO\';',
2424
errors: [
2525
{
26-
message: '$FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/`.',
26+
message: '$FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/u`.',
2727
},
2828
],
2929
options: [
@@ -42,7 +42,7 @@ export default {
4242
code: '// $FlowFixMeProps I am doing something evil here\nconst text = \'HELLO\';',
4343
errors: [
4444
{
45-
message: '$FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/`.',
45+
message: '$FlowFixMe is treated as `any` and must be fixed. Fix it or match `/TODO [0-9]+/u`.',
4646
},
4747
],
4848
options: [

tests/rules/assertions/typeIdMatch.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ export default {
44
code: 'opaque type foo = {};',
55
errors: [
66
{
7-
message: 'Type identifier \'foo\' does not match pattern \'/^([A-Z][a-z0-9]*)+Type$/\'.',
7+
message: 'Type identifier \'foo\' does not match pattern \'/^([A-Z][a-z0-9]*)+Type$/u\'.',
88
},
99
],
1010
},
1111
{
1212
code: 'type foo = {};',
1313
errors: [
1414
{
15-
message: 'Type identifier \'foo\' does not match pattern \'/^([A-Z][a-z0-9]*)+Type$/\'.',
15+
message: 'Type identifier \'foo\' does not match pattern \'/^([A-Z][a-z0-9]*)+Type$/u\'.',
1616
},
1717
],
1818
},
1919
{
2020
code: 'type FooType = {};',
2121
errors: [
2222
{
23-
message: 'Type identifier \'FooType\' does not match pattern \'/^foo$/\'.',
23+
message: 'Type identifier \'FooType\' does not match pattern \'/^foo$/u\'.',
2424
},
2525
],
2626
options: [

0 commit comments

Comments
 (0)