Skip to content

Commit 0ae3aef

Browse files
committed
fix: update the snapshots
1 parent fad7f29 commit 0ae3aef

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

crates/oxc_linter/src/rules/unicorn/no_invalid_fetch_options.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use oxc_span::Span;
1414
use crate::{ast_util::is_new_expression, rule::Rule, LintContext};
1515

1616
fn no_invalid_fetch_options_diagnostic(span: Span, method: &str) -> OxcDiagnostic {
17-
let message = format!("The `body` is not allowed when method is `{method}`");
17+
let message = format!(r#""body" is not allowed when method is "{method}""#);
1818

1919
OxcDiagnostic::warn(message).with_label(span)
2020
}

crates/oxc_linter/src/snapshots/unicorn_no_invalid_fetch_options.snap

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,103 @@
11
---
22
source: crates/oxc_linter/src/tester.rs
33
---
4-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
4+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
55
╭─[no_invalid_fetch_options.tsx:1:13]
66
1fetch(url, {body})
77
· ────
88
╰────
99

10-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
10+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
1111
╭─[no_invalid_fetch_options.tsx:1:19]
1212
1new Request(url, {body})
1313
· ────
1414
╰────
1515

16-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
16+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
1717
╭─[no_invalid_fetch_options.tsx:1:28]
1818
1fetch(url, {method: "GET", body})
1919
· ────
2020
╰────
2121

22-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
22+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
2323
╭─[no_invalid_fetch_options.tsx:1:34]
2424
1new Request(url, {method: "GET", body})
2525
· ────
2626
╰────
2727

28-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
28+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
2929
╭─[no_invalid_fetch_options.tsx:1:29]
3030
1fetch(url, {method: "HEAD", body})
3131
· ────
3232
╰────
3333

34-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
34+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
3535
╭─[no_invalid_fetch_options.tsx:1:35]
3636
1new Request(url, {method: "HEAD", body})
3737
· ────
3838
╰────
3939

40-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
40+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
4141
╭─[no_invalid_fetch_options.tsx:1:29]
4242
1fetch(url, {method: "head", body})
4343
· ────
4444
╰────
4545

46-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
46+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
4747
╭─[no_invalid_fetch_options.tsx:1:35]
4848
1new Request(url, {method: "head", body})
4949
· ────
5050
╰────
5151

52-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
52+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
5353
╭─[no_invalid_fetch_options.tsx:1:50]
5454
1const method = "head"; new Request(url, {method, body: "foo=bar"})
5555
· ────
5656
╰────
5757

58-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
58+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
5959
╭─[no_invalid_fetch_options.tsx:1:44]
6060
1const method = "head"; fetch(url, {method, body: "foo=bar"})
6161
· ────
6262
╰────
6363

64-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
64+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
6565
╭─[no_invalid_fetch_options.tsx:1:13]
6666
1fetch(url, {body}, extraArgument)
6767
· ────
6868
╰────
6969

70-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
70+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
7171
╭─[no_invalid_fetch_options.tsx:1:19]
7272
1new Request(url, {body}, extraArgument)
7373
· ────
7474
╰────
7575

76-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
76+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
7777
╭─[no_invalid_fetch_options.tsx:1:30]
7878
1fetch(url, {body: undefined, body: "foo=bar"});
7979
· ────
8080
╰────
8181

82-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
82+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
8383
╭─[no_invalid_fetch_options.tsx:1:36]
8484
1new Request(url, {body: undefined, body: "foo=bar"});
8585
· ────
8686
╰────
8787

88-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
88+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
8989
╭─[no_invalid_fetch_options.tsx:1:29]
9090
1fetch(url, {method: "post", body: "foo=bar", method: "HEAD"});
9191
· ────
9292
╰────
9393

94-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `HEAD`
94+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "HEAD"
9595
╭─[no_invalid_fetch_options.tsx:1:35]
9696
1new Request(url, {method: "post", body: "foo=bar", method: "HEAD"});
9797
· ────
9898
╰────
9999

100-
eslint-plugin-unicorn(no-invalid-fetch-options): The `body` is not allowed when method is `GET`
100+
eslint-plugin-unicorn(no-invalid-fetch-options): "body" is not allowed when method is "GET"
101101
╭─[no_invalid_fetch_options.tsx:1:13]
102102
1fetch('/', {body: new URLSearchParams({ data: "test" })})
103103
· ────

0 commit comments

Comments
 (0)