mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
feat(semantic): add TS1499 code to diagnostic (#18557)
https://github.com/microsoft/typescript/blob/7affa9e5403035b6d281616e6651529e7387f253/src/compiler/diagnosticMessages.json#L1659-L1662
This commit is contained in:
1 parent
8b4618f371
commit
0a02026502
3 files changed
+10
-10
No files matched your search
@@ -197,7 +197,7 @@ pub fn unterminated_string(span: Span) -> OxcDiagnostic {
|
||||
|
||||
#[cold]
|
||||
pub fn reg_exp_flag(x0: char, span1: Span) -> OxcDiagnostic {
|
||||
OxcDiagnostic::error(format!("Unexpected flag {x0} in regular expression literal"))
|
||||
ts_error("1499", format!("Unexpected flag {x0} in regular expression literal"))
|
||||
.with_label(span1)
|
||||
.with_help(format!("The allowed flags are `{REGEXP_FLAGS_LIST}`"))
|
||||
}
|
||||
|
||||
@@ -23220,7 +23220,7 @@ Negative Passed: 4581/4581 (100.00%)
|
||||
╰────
|
||||
help: Valid modifiers are: i, m, s
|
||||
|
||||
× Unexpected flag G in regular expression literal
|
||||
× TS(1499): Unexpected flag G in regular expression literal
|
||||
╭─[test262/test/language/literals/regexp/early-err-bad-flag.js:19:4]
|
||||
18 │
|
||||
19 │ /./G;
|
||||
|
||||
@@ -9993,7 +9993,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: Valid group names are: foo
|
||||
|
||||
× Unexpected flag a in regular expression literal
|
||||
× TS(1499): Unexpected flag a in regular expression literal
|
||||
╭─[typescript/tests/cases/compiler/regularExpressionScanning.ts:3:11]
|
||||
2 │ // Flags
|
||||
3 │ /foo/visualstudiocode,
|
||||
@@ -10002,7 +10002,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: The allowed flags are `gimsuydv`
|
||||
|
||||
× Unexpected flag l in regular expression literal
|
||||
× TS(1499): Unexpected flag l in regular expression literal
|
||||
╭─[typescript/tests/cases/compiler/regularExpressionScanning.ts:3:12]
|
||||
2 │ // Flags
|
||||
3 │ /foo/visualstudiocode,
|
||||
@@ -10020,7 +10020,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: Remove the duplicated flag here
|
||||
|
||||
× Unexpected flag t in regular expression literal
|
||||
× TS(1499): Unexpected flag t in regular expression literal
|
||||
╭─[typescript/tests/cases/compiler/regularExpressionScanning.ts:3:14]
|
||||
2 │ // Flags
|
||||
3 │ /foo/visualstudiocode,
|
||||
@@ -10047,7 +10047,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: Remove the duplicated flag here
|
||||
|
||||
× Unexpected flag o in regular expression literal
|
||||
× TS(1499): Unexpected flag o in regular expression literal
|
||||
╭─[typescript/tests/cases/compiler/regularExpressionScanning.ts:3:18]
|
||||
2 │ // Flags
|
||||
3 │ /foo/visualstudiocode,
|
||||
@@ -10056,7 +10056,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: The allowed flags are `gimsuydv`
|
||||
|
||||
× Unexpected flag c in regular expression literal
|
||||
× TS(1499): Unexpected flag c in regular expression literal
|
||||
╭─[typescript/tests/cases/compiler/regularExpressionScanning.ts:3:19]
|
||||
2 │ // Flags
|
||||
3 │ /foo/visualstudiocode,
|
||||
@@ -10065,7 +10065,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: The allowed flags are `gimsuydv`
|
||||
|
||||
× Unexpected flag o in regular expression literal
|
||||
× TS(1499): Unexpected flag o in regular expression literal
|
||||
╭─[typescript/tests/cases/compiler/regularExpressionScanning.ts:3:20]
|
||||
2 │ // Flags
|
||||
3 │ /foo/visualstudiocode,
|
||||
@@ -10083,7 +10083,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: Remove the duplicated flag here
|
||||
|
||||
× Unexpected flag e in regular expression literal
|
||||
× TS(1499): Unexpected flag e in regular expression literal
|
||||
╭─[typescript/tests/cases/compiler/regularExpressionScanning.ts:3:22]
|
||||
2 │ // Flags
|
||||
3 │ /foo/visualstudiocode,
|
||||
@@ -23009,7 +23009,7 @@ Expect to Parse: tasks/coverage/typescript/tests/cases/conformance/statements/Va
|
||||
╰────
|
||||
help: Try inserting a semicolon here
|
||||
|
||||
× Unexpected flag a in regular expression literal
|
||||
× TS(1499): Unexpected flag a in regular expression literal
|
||||
╭─[typescript/tests/cases/conformance/parser/ecmascript5/RegularExpressions/parserRegularExpressionDivideAmbiguity3.ts:1:16]
|
||||
1 │ if (1) /regexp/a.foo();
|
||||
· ─
|
||||
|
||||
Reference in new issue
Block a user