chore: Update miette (#9137)

Co-authored-by: 강동윤 (Donny) <kdy1997.dev@gmail.com>
This commit is contained in:
LongYinan 2024-07-05 14:19:35 +08:00 committed by GitHub
parent 59f2a345fa
commit 17915d9e22
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5465 changed files with 91870 additions and 186354 deletions

88
Cargo.lock generated
View File

@ -566,8 +566,8 @@ dependencies = [
"once_cell",
"strsim",
"termcolor",
"terminal_size 0.2.6",
"textwrap 0.16.0",
"terminal_size",
"textwrap",
]
[[package]]
@ -1863,12 +1863,6 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "is_ci"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "616cde7c720bb2bb5824a224687d8f77bfd38922027f01d825cd7453be5099fb"
[[package]]
name = "itertools"
version = "0.10.5"
@ -2147,33 +2141,27 @@ dependencies = [
[[package]]
name = "miette"
version = "4.7.1"
version = "7.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c90329e44f9208b55f45711f9558cec15d7ef8295cc65ecd6d4188ae8edc58c"
checksum = "4edc8853320c2a0dab800fbda86253c8938f6ea88510dc92c5f1ed20e794afc1"
dependencies = [
"atty",
"backtrace",
"cfg-if",
"miette-derive",
"once_cell",
"owo-colors",
"supports-color",
"supports-hyperlinks",
"supports-unicode",
"terminal_size 0.1.17",
"textwrap 0.15.2",
"textwrap",
"thiserror",
"unicode-width",
]
[[package]]
name = "miette-derive"
version = "4.7.1"
version = "7.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b5bc45b761bcf1b5e6e6c4128cd93b84c218721a8d9b894aa0aff4ed180174c"
checksum = "dcf09caffaac8068c346b6df2a7fc27a177fd20b39421a39ce0a211bde679a6c"
dependencies = [
"proc-macro2",
"quote",
"syn 1.0.109",
"syn 2.0.55",
]
[[package]]
@ -2535,9 +2523,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "owo-colors"
version = "3.5.0"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f"
checksum = "caff54706df99d2a78a5a4e3455ff45448d81ef1bb63c22cd14052ca0e993a3f"
[[package]]
name = "parking_lot"
@ -3610,34 +3598,6 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "supports-color"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ba6faf2ca7ee42fdd458f4347ae0a9bd6bcc445ad7cb57ad82b383f18870d6f"
dependencies = [
"atty",
"is_ci",
]
[[package]]
name = "supports-hyperlinks"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "590b34f7c5f01ecc9d78dba4b3f445f31df750a67621cf31626f3b7441ce6406"
dependencies = [
"atty",
]
[[package]]
name = "supports-unicode"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8b945e45b417b125a8ec51f1b7df2f8df7920367700d1f98aedd21e5735f8b2"
dependencies = [
"atty",
]
[[package]]
name = "swc"
version = "0.279.0"
@ -5444,16 +5404,6 @@ dependencies = [
"winapi-util",
]
[[package]]
name = "terminal_size"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "terminal_size"
version = "0.2.6"
@ -5512,24 +5462,16 @@ dependencies = [
"syn 2.0.55",
]
[[package]]
name = "textwrap"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7b3e525a49ec206798b40326a44121291b530c963cfb01018f63e135bac543d"
dependencies = [
"smawk",
"unicode-linebreak",
"unicode-width",
]
[[package]]
name = "textwrap"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
dependencies = [
"terminal_size 0.2.6",
"smawk",
"terminal_size",
"unicode-linebreak",
"unicode-width",
]
[[package]]

View File

@ -74,7 +74,7 @@ resolver = "2"
lexical = "6.1.0"
lru = "0.10.0"
memchr = "2.6.1"
miette = "4.2.1"
miette = "7.2.0"
napi = { version = "2.0.0", default-features = false }
napi-derive = { version = "2.0.0", default-features = false }
new_debug_unreachable = "1.0.6"

View File

@ -1,4 +1,3 @@
x cannot reassign to a variable declared with `const`
,-[1:1]
1 | const a = 100,
@ -15,9 +14,8 @@
8 | b++;
9 | c--;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[2:1]
1 | const a = 100,
2 | [b] = [200],
: |
@ -34,9 +32,8 @@
10 |
11 | ++d;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[3:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -54,9 +51,8 @@
11 | ++d;
12 | --a;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[4:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -76,7 +72,6 @@
13 |
14 | b += 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
1 | const a = 100,
@ -99,9 +94,8 @@
14 | b += 10;
15 | c -= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[2:1]
1 | const a = 100,
2 | [b] = [200],
: |
@ -124,9 +118,8 @@
16 | d *= 10;
17 | a /= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[3:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -150,9 +143,8 @@
17 | a /= 10;
18 | b %= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[4:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -176,7 +168,6 @@
17 | a /= 10;
18 | b %= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
1 | const a = 100,
@ -204,9 +195,8 @@
19 |
20 | c <<= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[2:1]
1 | const a = 100,
2 | [b] = [200],
: |
@ -233,9 +223,8 @@
20 | c <<= 10;
21 | d >>= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[3:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -264,9 +253,8 @@
22 |
23 | a >>>= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[4:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -295,7 +283,6 @@
22 |
23 | a >>>= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
1 | const a = 100,
@ -329,9 +316,8 @@
25 | b |= 10;
26 | c ^= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[2:1]
1 | const a = 100,
2 | [b] = [200],
: |
@ -365,9 +351,8 @@
27 | d &= 10;
28 | a **= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[3:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -401,9 +386,8 @@
27 | d &= 10;
28 | a **= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[4:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -439,7 +423,6 @@
29 |
30 | b &&= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
1 | const a = 100,
@ -478,9 +461,8 @@
30 | b &&= 10;
31 | c ||= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[2:1]
1 | const a = 100,
2 | [b] = [200],
: |
@ -519,9 +501,8 @@
32 |
33 | d ??= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[3:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -560,9 +541,8 @@
32 |
33 | d ??= 10;
`----
x cannot reassign to a variable declared with `const`
,-[1:1]
,-[4:1]
1 | const a = 100,
2 | [b] = [200],
3 | { c } = { c: 300 },
@ -604,9 +584,8 @@
35 | const fn = () => {
36 | const e = 100;
`----
x cannot reassign to a variable declared with `const`
,-[33:1]
,-[36:1]
33 | d ??= 10;
34 |
35 | const fn = () => {

View File

@ -1,4 +1,3 @@
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -12,9 +11,8 @@
6 | bar = 2;
7 | baz = 3;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -28,9 +26,8 @@
8 |
9 | foo++;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[3:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
3 | import * as baz from "baz";
@ -45,7 +42,6 @@
9 | foo++;
10 | foo--;
`----
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -64,7 +60,6 @@
11 |
12 | ++bar;
`----
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -84,9 +79,8 @@
12 | ++bar;
13 | --bar;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -105,9 +99,8 @@
13 | --bar;
14 |
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -128,7 +121,6 @@
15 |
16 | foo += 10;
`----
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -154,9 +146,8 @@
18 | baz *= 10;
19 | foo /= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -181,9 +172,8 @@
19 | foo /= 10;
20 | bar %= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[3:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
3 | import * as baz from "baz";
@ -208,7 +198,6 @@
19 | foo /= 10;
20 | bar %= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -237,9 +226,8 @@
21 |
22 | baz <<= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -267,9 +255,8 @@
22 | baz <<= 10;
23 | foo >>= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[3:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
3 | import * as baz from "baz";
@ -299,7 +286,6 @@
24 |
25 | bar >>>= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -331,9 +317,8 @@
24 |
25 | bar >>>= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -366,9 +351,8 @@
27 | baz |= 10;
28 | foo ^= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[3:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
3 | import * as baz from "baz";
@ -403,7 +387,6 @@
29 | bar &= 10;
30 | baz **= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -440,9 +423,8 @@
29 | bar &= 10;
30 | baz **= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -479,9 +461,8 @@
31 |
32 | foo &&= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[3:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
3 | import * as baz from "baz";
@ -519,7 +500,6 @@
32 | foo &&= 10;
33 | bar ||= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
1 | import { foo } from "foo";
@ -561,9 +541,8 @@
34 |
35 | baz ??= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[2:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
: ^|^
@ -603,9 +582,8 @@
34 |
35 | baz ??= 10;
`----
x cannot reassign to an imported binding
,-[1:1]
,-[3:1]
1 | import { foo } from "foo";
2 | import bar from "bar";
3 | import * as baz from "baz";

View File

@ -1,6 +1,5 @@
x the name `A30` is defined multiple times
,-[26:1]
,-[29:1]
26 | class A27 { constructor() { for (let i = 0; i < a.length; i++) { super(); } super(); } }
27 | class A28 extends B { constructor() { return; super(); } }
28 | class A29 extends B { constructor() { try { super(); } catch (e) { } } }
@ -15,9 +14,8 @@
33 |
34 | // valid
`----
x the name `A9` is defined multiple times
,-[6:1]
,-[9:1]
6 | class A6 extends (B && 5) { constructor() { super(); } }
7 | class A7 extends (B &&= 5) { constructor() { super(); } }
8 | class A8 extends (B += C) { constructor() { super(); } }
@ -61,7 +59,6 @@
: ^|
: `-- `A9` redefined here
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[1:1]
1 | class A1 extends null { constructor() { super(); } }
@ -70,9 +67,8 @@
3 | class A3 extends 100 { constructor() { super(); } }
4 | class A4 extends 'test' { constructor() { super(); } }
`----
x Expected to call 'super()'
,-[1:1]
,-[2:1]
1 | class A1 extends null { constructor() { super(); } }
2 | class A2 extends null { constructor() { } }
: ^^^^^^^^^^^^^^^^^
@ -80,9 +76,8 @@
4 | class A4 extends 'test' { constructor() { super(); } }
5 | class A5 extends (B = 5) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[1:1]
,-[3:1]
1 | class A1 extends null { constructor() { super(); } }
2 | class A2 extends null { constructor() { } }
3 | class A3 extends 100 { constructor() { super(); } }
@ -91,9 +86,8 @@
5 | class A5 extends (B = 5) { constructor() { super(); } }
6 | class A6 extends (B && 5) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[1:1]
,-[4:1]
1 | class A1 extends null { constructor() { super(); } }
2 | class A2 extends null { constructor() { } }
3 | class A3 extends 100 { constructor() { super(); } }
@ -103,9 +97,8 @@
6 | class A6 extends (B && 5) { constructor() { super(); } }
7 | class A7 extends (B &&= 5) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[2:1]
,-[5:1]
2 | class A2 extends null { constructor() { } }
3 | class A3 extends 100 { constructor() { super(); } }
4 | class A4 extends 'test' { constructor() { super(); } }
@ -115,9 +108,8 @@
7 | class A7 extends (B &&= 5) { constructor() { super(); } }
8 | class A8 extends (B += C) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[3:1]
,-[6:1]
3 | class A3 extends 100 { constructor() { super(); } }
4 | class A4 extends 'test' { constructor() { super(); } }
5 | class A5 extends (B = 5) { constructor() { super(); } }
@ -127,9 +119,8 @@
8 | class A8 extends (B += C) { constructor() { super(); } }
9 | class A9 extends (B -= C) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[4:1]
,-[7:1]
4 | class A4 extends 'test' { constructor() { super(); } }
5 | class A5 extends (B = 5) { constructor() { super(); } }
6 | class A6 extends (B && 5) { constructor() { super(); } }
@ -139,9 +130,8 @@
9 | class A9 extends (B -= C) { constructor() { super(); } }
10 | class A10 extends (B **= C) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[5:1]
,-[8:1]
5 | class A5 extends (B = 5) { constructor() { super(); } }
6 | class A6 extends (B && 5) { constructor() { super(); } }
7 | class A7 extends (B &&= 5) { constructor() { super(); } }
@ -151,9 +141,8 @@
10 | class A10 extends (B **= C) { constructor() { super(); } }
11 | class A11 extends (B |= C) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[6:1]
,-[9:1]
6 | class A6 extends (B && 5) { constructor() { super(); } }
7 | class A7 extends (B &&= 5) { constructor() { super(); } }
8 | class A8 extends (B += C) { constructor() { super(); } }
@ -163,9 +152,8 @@
11 | class A11 extends (B |= C) { constructor() { super(); } }
12 | class A12 extends (B &= C) { constructor() { super(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[7:1]
,-[10:1]
7 | class A7 extends (B &&= 5) { constructor() { super(); } }
8 | class A8 extends (B += C) { constructor() { super(); } }
9 | class A9 extends (B -= C) { constructor() { super(); } }
@ -175,9 +163,8 @@
12 | class A12 extends (B &= C) { constructor() { super(); } }
13 | class A13 extends B { constructor() { } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[8:1]
,-[11:1]
8 | class A8 extends (B += C) { constructor() { super(); } }
9 | class A9 extends (B -= C) { constructor() { super(); } }
10 | class A10 extends (B **= C) { constructor() { super(); } }
@ -187,9 +174,8 @@
13 | class A13 extends B { constructor() { } }
14 | class A14 extends B { constructor() { for (var a of b) super.foo(); } }
`----
x Unexpected 'super()' because 'super' is not a constructor
,-[9:1]
,-[12:1]
9 | class A9 extends (B -= C) { constructor() { super(); } }
10 | class A10 extends (B **= C) { constructor() { super(); } }
11 | class A11 extends (B |= C) { constructor() { super(); } }
@ -199,9 +185,8 @@
14 | class A14 extends B { constructor() { for (var a of b) super.foo(); } }
15 | class A15 extends B { constructor() { class C extends D { constructor() { super(); } } } }
`----
x Expected to call 'super()'
,-[10:1]
,-[13:1]
10 | class A10 extends (B **= C) { constructor() { super(); } }
11 | class A11 extends (B |= C) { constructor() { super(); } }
12 | class A12 extends (B &= C) { constructor() { super(); } }
@ -211,9 +196,8 @@
15 | class A15 extends B { constructor() { class C extends D { constructor() { super(); } } } }
16 | class A16 extends B { constructor() { var c = class extends D { constructor() { super(); } } } }
`----
x Expected to call 'super()'
,-[11:1]
,-[14:1]
11 | class A11 extends (B |= C) { constructor() { super(); } }
12 | class A12 extends (B &= C) { constructor() { super(); } }
13 | class A13 extends B { constructor() { } }
@ -223,9 +207,8 @@
16 | class A16 extends B { constructor() { var c = class extends D { constructor() { super(); } } } }
17 | class A17 extends B { constructor() { var c = () => super(); } }
`----
x Expected to call 'super()'
,-[12:1]
,-[15:1]
12 | class A12 extends (B &= C) { constructor() { super(); } }
13 | class A13 extends B { constructor() { } }
14 | class A14 extends B { constructor() { for (var a of b) super.foo(); } }
@ -235,9 +218,8 @@
17 | class A17 extends B { constructor() { var c = () => super(); } }
18 | class A18 extends B { constructor() { class C extends D { constructor() { super(); } } } }
`----
x Expected to call 'super()'
,-[13:1]
,-[16:1]
13 | class A13 extends B { constructor() { } }
14 | class A14 extends B { constructor() { for (var a of b) super.foo(); } }
15 | class A15 extends B { constructor() { class C extends D { constructor() { super(); } } } }
@ -247,9 +229,8 @@
18 | class A18 extends B { constructor() { class C extends D { constructor() { super(); } } } }
19 | class A19 extends B { constructor() { var C = class extends D { constructor() { super(); } } } }
`----
x Expected to call 'super()'
,-[14:1]
,-[17:1]
14 | class A14 extends B { constructor() { for (var a of b) super.foo(); } }
15 | class A15 extends B { constructor() { class C extends D { constructor() { super(); } } } }
16 | class A16 extends B { constructor() { var c = class extends D { constructor() { super(); } } } }
@ -259,9 +240,8 @@
19 | class A19 extends B { constructor() { var C = class extends D { constructor() { super(); } } } }
20 | class A20 extends B { constructor() { super(); class C extends D { constructor() { } } } }
`----
x Expected to call 'super()'
,-[15:1]
,-[18:1]
15 | class A15 extends B { constructor() { class C extends D { constructor() { super(); } } } }
16 | class A16 extends B { constructor() { var c = class extends D { constructor() { super(); } } } }
17 | class A17 extends B { constructor() { var c = () => super(); } }
@ -271,9 +251,8 @@
20 | class A20 extends B { constructor() { super(); class C extends D { constructor() { } } } }
21 | class A21 extends B { constructor() { super(); var C = class extends D { constructor() { } } } }
`----
x Expected to call 'super()'
,-[16:1]
,-[19:1]
16 | class A16 extends B { constructor() { var c = class extends D { constructor() { super(); } } } }
17 | class A17 extends B { constructor() { var c = () => super(); } }
18 | class A18 extends B { constructor() { class C extends D { constructor() { super(); } } } }
@ -283,9 +262,8 @@
21 | class A21 extends B { constructor() { super(); var C = class extends D { constructor() { } } } }
22 | class A23 extends B { constructor() { if (a) super(); } }
`----
x Expected to call 'super()'
,-[17:1]
,-[20:1]
17 | class A17 extends B { constructor() { var c = () => super(); } }
18 | class A18 extends B { constructor() { class C extends D { constructor() { super(); } } } }
19 | class A19 extends B { constructor() { var C = class extends D { constructor() { super(); } } } }
@ -295,9 +273,8 @@
22 | class A23 extends B { constructor() { if (a) super(); } }
23 | class A24 extends B { constructor() { x ? super() : null; } }
`----
x Expected to call 'super()'
,-[18:1]
,-[21:1]
18 | class A18 extends B { constructor() { class C extends D { constructor() { super(); } } } }
19 | class A19 extends B { constructor() { var C = class extends D { constructor() { super(); } } } }
20 | class A20 extends B { constructor() { super(); class C extends D { constructor() { } } } }
@ -307,9 +284,8 @@
23 | class A24 extends B { constructor() { x ? super() : null; } }
24 | class A25 extends B { constructor() { switch (x) { case 'a': super(); } } }
`----
x Lacked a call of 'super()' in some code path
,-[19:1]
,-[22:1]
19 | class A19 extends B { constructor() { var C = class extends D { constructor() { super(); } } } }
20 | class A20 extends B { constructor() { super(); class C extends D { constructor() { } } } }
21 | class A21 extends B { constructor() { super(); var C = class extends D { constructor() { } } } }
@ -319,9 +295,8 @@
24 | class A25 extends B { constructor() { switch (x) { case 'a': super(); } } }
25 | class A26 { constructor() { for (let i = 0; i < a.length; i++) { super(); } } }
`----
x Lacked a call of 'super()' in some code path
,-[20:1]
,-[23:1]
20 | class A20 extends B { constructor() { super(); class C extends D { constructor() { } } } }
21 | class A21 extends B { constructor() { super(); var C = class extends D { constructor() { } } } }
22 | class A23 extends B { constructor() { if (a) super(); } }
@ -331,9 +306,8 @@
25 | class A26 { constructor() { for (let i = 0; i < a.length; i++) { super(); } } }
26 | class A27 { constructor() { for (let i = 0; i < a.length; i++) { super(); } super(); } }
`----
x More than one call 'super()' possible into loop
,-[22:1]
,-[25:1]
22 | class A23 extends B { constructor() { if (a) super(); } }
23 | class A24 extends B { constructor() { x ? super() : null; } }
24 | class A25 extends B { constructor() { switch (x) { case 'a': super(); } } }
@ -343,9 +317,8 @@
27 | class A28 extends B { constructor() { return; super(); } }
28 | class A29 extends B { constructor() { try { super(); } catch (e) { } } }
`----
x More than one call 'super()' possible into loop
,-[23:1]
,-[26:1]
23 | class A24 extends B { constructor() { x ? super() : null; } }
24 | class A25 extends B { constructor() { switch (x) { case 'a': super(); } } }
25 | class A26 { constructor() { for (let i = 0; i < a.length; i++) { super(); } } }
@ -355,9 +328,8 @@
28 | class A29 extends B { constructor() { try { super(); } catch (e) { } } }
29 | class A30 extends B { constructor() { try { } catch (e) { super(); } } }
`----
x Unexpected duplicate 'super()'
,-[23:1]
,-[26:1]
23 | class A24 extends B { constructor() { x ? super() : null; } }
24 | class A25 extends B { constructor() { switch (x) { case 'a': super(); } } }
25 | class A26 { constructor() { for (let i = 0; i < a.length; i++) { super(); } } }
@ -367,9 +339,8 @@
28 | class A29 extends B { constructor() { try { super(); } catch (e) { } } }
29 | class A30 extends B { constructor() { try { } catch (e) { super(); } } }
`----
x Expected to call 'super()'
,-[24:1]
,-[27:1]
24 | class A25 extends B { constructor() { switch (x) { case 'a': super(); } } }
25 | class A26 { constructor() { for (let i = 0; i < a.length; i++) { super(); } } }
26 | class A27 { constructor() { for (let i = 0; i < a.length; i++) { super(); } super(); } }
@ -379,9 +350,8 @@
29 | class A30 extends B { constructor() { try { } catch (e) { super(); } } }
30 | class A31 extends B { constructor() { try { } catch (e) { super(); } super(); } }
`----
x Lacked a call of 'super()' in some code path
,-[25:1]
,-[28:1]
25 | class A26 { constructor() { for (let i = 0; i < a.length; i++) { super(); } } }
26 | class A27 { constructor() { for (let i = 0; i < a.length; i++) { super(); } super(); } }
27 | class A28 extends B { constructor() { return; super(); } }
@ -391,9 +361,8 @@
30 | class A31 extends B { constructor() { try { } catch (e) { super(); } super(); } }
31 | class A30 extends B { constructor() { try { super(); } catch (e) { } finally { super() } } }
`----
x Lacked a call of 'super()' in some code path
,-[26:1]
,-[29:1]
26 | class A27 { constructor() { for (let i = 0; i < a.length; i++) { super(); } super(); } }
27 | class A28 extends B { constructor() { return; super(); } }
28 | class A29 extends B { constructor() { try { super(); } catch (e) { } } }
@ -402,9 +371,8 @@
30 | class A31 extends B { constructor() { try { } catch (e) { super(); } super(); } }
31 | class A30 extends B { constructor() { try { super(); } catch (e) { } finally { super() } } }
`----
x Unexpected duplicate 'super()'
,-[27:1]
,-[30:1]
27 | class A28 extends B { constructor() { return; super(); } }
28 | class A29 extends B { constructor() { try { super(); } catch (e) { } } }
29 | class A30 extends B { constructor() { try { } catch (e) { super(); } } }
@ -413,9 +381,8 @@
31 | class A30 extends B { constructor() { try { super(); } catch (e) { } finally { super() } } }
32 |
`----
x Unexpected duplicate 'super()'
,-[28:1]
,-[31:1]
28 | class A29 extends B { constructor() { try { super(); } catch (e) { } } }
29 | class A30 extends B { constructor() { try { } catch (e) { super(); } } }
30 | class A31 extends B { constructor() { try { } catch (e) { super(); } super(); } }

View File

@ -1,4 +1,3 @@
x Default clause should be the last clause
,-[1:1]
1 | switch (foo) { default: bar(); break; case 1: baz(); break; }
@ -7,9 +6,8 @@
3 | switch (foo) { default: break; case 1: }
4 | switch (foo) { default: case 1: break; }
`----
x Default clause should be the last clause
,-[1:1]
,-[2:1]
1 | switch (foo) { default: bar(); break; case 1: baz(); break; }
2 | switch (foo) { default: break; case 1: break; }
: ^^^^^^^^^^^^^^^
@ -17,9 +15,8 @@
4 | switch (foo) { default: case 1: break; }
5 | switch (foo) { default: case 1: }
`----
x Default clause should be the last clause
,-[1:1]
,-[3:1]
1 | switch (foo) { default: bar(); break; case 1: baz(); break; }
2 | switch (foo) { default: break; case 1: break; }
3 | switch (foo) { default: break; case 1: }
@ -28,9 +25,8 @@
5 | switch (foo) { default: case 1: }
6 | switch (foo) { default: break; case 1: break; case 2: break; }
`----
x Default clause should be the last clause
,-[1:1]
,-[4:1]
1 | switch (foo) { default: bar(); break; case 1: baz(); break; }
2 | switch (foo) { default: break; case 1: break; }
3 | switch (foo) { default: break; case 1: }
@ -40,9 +36,8 @@
6 | switch (foo) { default: break; case 1: break; case 2: break; }
7 | switch (foo) { default: case 1: break; case 2: break; }
`----
x Default clause should be the last clause
,-[2:1]
,-[5:1]
2 | switch (foo) { default: break; case 1: break; }
3 | switch (foo) { default: break; case 1: }
4 | switch (foo) { default: case 1: break; }
@ -52,9 +47,8 @@
7 | switch (foo) { default: case 1: break; case 2: break; }
8 | switch (foo) { default: case 1: case 2: break; }
`----
x Default clause should be the last clause
,-[3:1]
,-[6:1]
3 | switch (foo) { default: break; case 1: }
4 | switch (foo) { default: case 1: break; }
5 | switch (foo) { default: case 1: }
@ -64,9 +58,8 @@
8 | switch (foo) { default: case 1: case 2: break; }
9 | switch (foo) { default: case 1: case 2: }
`----
x Default clause should be the last clause
,-[4:1]
,-[7:1]
4 | switch (foo) { default: case 1: break; }
5 | switch (foo) { default: case 1: }
6 | switch (foo) { default: break; case 1: break; case 2: break; }
@ -76,9 +69,8 @@
9 | switch (foo) { default: case 1: case 2: }
10 | switch (foo) { case 1: break; default: break; case 2: break; }
`----
x Default clause should be the last clause
,-[5:1]
,-[8:1]
5 | switch (foo) { default: case 1: }
6 | switch (foo) { default: break; case 1: break; case 2: break; }
7 | switch (foo) { default: case 1: break; case 2: break; }
@ -88,9 +80,8 @@
10 | switch (foo) { case 1: break; default: break; case 2: break; }
11 | switch (foo) { case 1: default: break; case 2: break; }
`----
x Default clause should be the last clause
,-[6:1]
,-[9:1]
6 | switch (foo) { default: break; case 1: break; case 2: break; }
7 | switch (foo) { default: case 1: break; case 2: break; }
8 | switch (foo) { default: case 1: case 2: break; }
@ -100,9 +91,8 @@
11 | switch (foo) { case 1: default: break; case 2: break; }
12 | switch (foo) { case 1: break; default: case 2: break; }
`----
x Default clause should be the last clause
,-[7:1]
,-[10:1]
7 | switch (foo) { default: case 1: break; case 2: break; }
8 | switch (foo) { default: case 1: case 2: break; }
9 | switch (foo) { default: case 1: case 2: }
@ -112,9 +102,8 @@
12 | switch (foo) { case 1: break; default: case 2: break; }
13 | switch (foo) { case 1: default: case 2: break; }
`----
x Default clause should be the last clause
,-[8:1]
,-[11:1]
8 | switch (foo) { default: case 1: case 2: break; }
9 | switch (foo) { default: case 1: case 2: }
10 | switch (foo) { case 1: break; default: break; case 2: break; }
@ -124,9 +113,8 @@
13 | switch (foo) { case 1: default: case 2: break; }
14 | switch (foo) { case 1: default: case 2: }
`----
x Default clause should be the last clause
,-[9:1]
,-[12:1]
9 | switch (foo) { default: case 1: case 2: }
10 | switch (foo) { case 1: break; default: break; case 2: break; }
11 | switch (foo) { case 1: default: break; case 2: break; }
@ -135,9 +123,8 @@
13 | switch (foo) { case 1: default: case 2: break; }
14 | switch (foo) { case 1: default: case 2: }
`----
x Default clause should be the last clause
,-[10:1]
,-[13:1]
10 | switch (foo) { case 1: break; default: break; case 2: break; }
11 | switch (foo) { case 1: default: break; case 2: break; }
12 | switch (foo) { case 1: break; default: case 2: break; }
@ -147,9 +134,8 @@
15 |
16 | // valid
`----
x Default clause should be the last clause
,-[11:1]
,-[14:1]
11 | switch (foo) { case 1: default: break; case 2: break; }
12 | switch (foo) { case 1: break; default: case 2: break; }
13 | switch (foo) { case 1: default: case 2: break; }

View File

@ -1,4 +1,3 @@
x Default parameters should be last.
,-[1:1]
1 | function f1(a = 5, b = 6, c) {}
@ -6,9 +5,8 @@
2 |
3 | function f2(a = 5, b, c = 5) {}
`----
x Default parameters should be last.
,-[1:1]
,-[3:1]
1 | function f1(a = 5, b = 6, c) {}
2 |
3 | function f2(a = 5, b, c = 5) {}
@ -16,9 +14,8 @@
4 |
5 | const f3 = (a = 5, b, ...c) => {};
`----
x Default parameters should be last.
,-[2:1]
,-[5:1]
2 |
3 | function f2(a = 5, b, c = 5) {}
4 |
@ -27,9 +24,8 @@
6 |
7 | const f4 = function f(a, b = 5, c) {};
`----
x Default parameters should be last.
,-[4:1]
,-[7:1]
4 |
5 | const f3 = (a = 5, b, ...c) => {};
6 |
@ -38,9 +34,8 @@
8 |
9 | const f5 = (a = 5, { b }) => {};
`----
x Default parameters should be last.
,-[6:1]
,-[9:1]
6 |
7 | const f4 = function f(a, b = 5, c) {};
8 |
@ -50,9 +45,8 @@
11 | class C {
12 | constructor({ a } = {}, b) {}
`----
x Default parameters should be last.
,-[9:1]
,-[12:1]
9 | const f5 = (a = 5, { b }) => {};
10 |
11 | class C {
@ -62,9 +56,8 @@
14 | f([a, b] = [1, 2], c) {}
15 | }
`----
x Default parameters should be last.
,-[11:1]
,-[14:1]
11 | class C {
12 | constructor({ a } = {}, b) {}
13 |

View File

@ -1,6 +1,5 @@
x Default parameters should be last.
,-[1:1]
,-[2:1]
1 | class C1 {
2 | constructor({ a } = {}, public b) {}
: ^^^^^^^^

View File

@ -1,6 +1,5 @@
x ['a'] is better written in dot notation
,-[1:1]
,-[3:1]
1 | obj['prefix_a'];
2 |
3 | obj['a'];

View File

@ -1,4 +1,3 @@
x ['break'] is better written in dot notation
,----
1 | obj['break'];

View File

@ -1,4 +1,3 @@
x ["a"] is better written in dot notation
,-[1:1]
1 | obj["a"];
@ -6,9 +5,8 @@
2 |
3 | obj[obj2["b"]];
`----
x ["b"] is better written in dot notation
,-[1:1]
,-[3:1]
1 | obj["a"];
2 |
3 | obj[obj2["b"]];
@ -16,9 +14,8 @@
4 |
5 | obj.key;
`----
x ['c'] is better written in dot notation
,-[6:1]
,-[9:1]
6 |
7 | obj[prop];
8 |
@ -27,9 +24,8 @@
10 |
11 | obj?.['d'];
`----
x ['d'] is better written in dot notation
,-[8:1]
,-[11:1]
8 |
9 | obj['c'];
10 |
@ -38,9 +34,8 @@
12 |
13 | (obj)['e'];
`----
x ['e'] is better written in dot notation
,-[10:1]
,-[13:1]
10 |
11 | obj?.['d'];
12 |
@ -49,9 +44,8 @@
14 |
15 | foo[call(my["x"])]
`----
x ["x"] is better written in dot notation
,-[12:1]
,-[15:1]
12 |
13 | (obj)['e'];
14 |

View File

@ -1,6 +1,5 @@
x the name `foo` is defined multiple times
,-[1:1]
,-[2:1]
1 | try {
2 | } catch (foo) {
: ^|^

View File

@ -1,6 +1,5 @@
x the name `fx` is defined multiple times
,-[1:1]
,-[2:1]
1 | try {
2 | var fx
: ^|

View File

@ -1,6 +1,5 @@
x the name `foo` is defined multiple times
,-[1:1]
,-[3:1]
1 | switch (a) {
2 | case 'a':
3 | var foo

View File

@ -1,4 +1,3 @@
x the name `foo` is defined multiple times
,-[1:1]
1 | export function foo() {}
@ -10,7 +9,6 @@
3 |
4 | function foo() {}
`----
x the name `foo` is defined multiple times
,-[1:1]
1 | export function foo() {}

View File

@ -1,4 +1,3 @@
x the name `hi` is defined multiple times
,-[1:1]
1 | import { hi } from 'foo';

View File

@ -1,6 +1,5 @@
x the name `x` is defined multiple times
,-[6:1]
,-[9:1]
6 | import type _ = require("lodash");
7 |
8 | // error
@ -14,9 +13,8 @@
12 | export import y = require("y");
13 | import y from "y";
`----
x the name `y` is defined multiple times
,-[9:1]
,-[12:1]
9 | import x = require("x");
10 | const x = "x";
11 | // error

View File

@ -1,4 +1,3 @@
x the name `Foo` is defined multiple times
,-[1:1]
1 | export default class Foo{}

View File

@ -1,4 +1,3 @@
x the name `foo` is defined multiple times
,-[1:1]
1 | export default function foo(){}

View File

@ -1,4 +1,3 @@
x the name `foo` is defined multiple times
,-[1:1]
1 | function foo() {}
@ -11,9 +10,8 @@
4 | function bar() {}
5 | var bar; // error
`----
x the name `bar` is defined multiple times
,-[1:1]
,-[4:1]
1 | function foo() {}
2 | const foo = 1; // error
3 |
@ -27,9 +25,8 @@
7 | function baz() {}
8 | function baz() {} // error
`----
x the name `baz` is defined multiple times
,-[4:1]
,-[7:1]
4 | function bar() {}
5 | var bar; // error
6 |

View File

@ -1,6 +1,5 @@
x the name `foo` is defined multiple times
,-[1:1]
,-[3:1]
1 | import { hi } from "foo";
2 |
3 | function foo() {}

View File

@ -1,4 +1,3 @@
x the name `a` is defined multiple times
,-[1:1]
1 | function foo(a) {

View File

@ -1,4 +1,3 @@
x the name `a` is defined multiple times
,-[1:1]
1 | const a = 5;
@ -11,9 +10,8 @@
4 | const b = 1;
5 | var b = 2; // error
`----
x the name `b` is defined multiple times
,-[1:1]
,-[4:1]
1 | const a = 5;
2 | let a = 2; // error
3 |
@ -27,9 +25,8 @@
7 | let c = 3;
8 | var c = 4; // error
`----
x the name `c` is defined multiple times
,-[4:1]
,-[7:1]
4 | const b = 1;
5 | var b = 2; // error
6 |

View File

@ -1,4 +1,3 @@
x the name `foo` is defined multiple times
,-[1:1]
1 | function foo() {}

View File

@ -1,4 +1,3 @@
x the name `default` is exported multiple times
,-[1:1]
1 | ,-> export default () => {
@ -12,5 +11,4 @@
: `---- exported more than once
`----
Error:
> Exported identifiers must be unique
Advice: > Exported identifiers must be unique

View File

@ -1,11 +1,10 @@
x the name `default` is exported multiple times
,-[1:1]
,-[3:1]
1 | const { a } = 1;
2 |
3 | ,-> export { a as default };
: | ^^^|^^^
: | `-- previous exported here
3 | export { a as default };
: ^^^|^^^
: `-- previous exported here
4 |
5 | ,-> export default () => {
6 | | let b = 2;
@ -13,5 +12,4 @@
: `---- exported more than once
`----
Error:
> Exported identifiers must be unique
Advice: > Exported identifiers must be unique

View File

@ -1,6 +1,5 @@
x the name `b` is exported multiple times
,-[5:1]
,-[8:1]
5 |
6 | }
7 |
@ -12,5 +11,4 @@
: `-- exported more than once
`----
Error:
> Exported identifiers must be unique
Advice: > Exported identifiers must be unique

View File

@ -1,6 +1,5 @@
x An export assignment cannot be used in a module with other exported elements.
,-[1:1]
,-[3:1]
1 | export default 1;
2 |
3 | export = {};

View File

@ -1,4 +1,3 @@
x multiple `export =` found
,-[1:1]
1 | export = 1;
@ -8,9 +7,8 @@
: ^^^^^^^^^^^
3 | export = 3;
`----
x multiple `export =` found
,-[1:1]
,-[2:1]
1 | export = 1;
2 | export = 2;
: ^^^^^|^^^^^

View File

@ -1,4 +1,3 @@
x the name `_` is exported multiple times
,-[1:1]
1 | export import _ = require("lodash");
@ -12,5 +11,4 @@
: `-- exported more than once
`----
Error:
> Exported identifiers must be unique
Advice: > Exported identifiers must be unique

View File

@ -1,4 +1,3 @@
x Use '===' instead of '=='
,-[1:1]
1 | if (x == y || z != (a || b)) {}
@ -6,7 +5,6 @@
2 |
3 | if (x === y || z !== (a || b)) {}
`----
x Use '!==' instead of '!='
,-[1:1]
1 | if (x == y || z != (a || b)) {}

View File

@ -1,14 +1,12 @@
x Use '==' instead of '==='
,-[1:1]
,-[3:1]
1 | if (x == y || z != (a || b)) {}
2 |
3 | if (x === y || z !== (a || b)) {}
: ^^^^^^^
`----
x Use '!=' instead of '!=='
,-[1:1]
,-[3:1]
1 | if (x == y || z != (a || b)) {}
2 |
3 | if (x === y || z !== (a || b)) {}

View File

@ -1,4 +1,3 @@
x Use '===' instead of '=='
,-[1:1]
1 | if (x == y || z != (a || b)) {}
@ -6,7 +5,6 @@
2 |
3 | if (x === y || z !== (a || b)) {}
`----
x Use '!==' instead of '!='
,-[1:1]
1 | if (x == y || z != (a || b)) {}

View File

@ -1,6 +1,5 @@
x Unexpected alert
,-[2:1]
,-[5:1]
2 |
3 | const alert = () => {};
4 |

View File

@ -1,6 +1,5 @@
x Unexpected alert
,-[1:1]
,-[4:1]
1 | // Test cases taken form https://github.com/eslint/eslint/blob/5769cc23eca7197bb5993a0201cc269a056d4dfd/tests/lib/rules/no-alert.js
2 |
3 | function alert() {}

View File

@ -1,6 +1,5 @@
x Unexpected alert
,-[1:1]
,-[3:1]
1 | // Test cases taken form https://github.com/eslint/eslint/blob/5769cc23eca7197bb5993a0201cc269a056d4dfd/tests/lib/rules/no-alert.js
2 |
3 | globalThis.alert();
@ -9,9 +8,8 @@
5 | var globalThis = bar;
6 | globalThis.alert();
`----
x Unexpected alert
,-[5:1]
,-[8:1]
5 | var globalThis = bar;
6 | globalThis.alert();
7 | }
@ -20,9 +18,8 @@
9 | window?.alert(foo);
10 | (window?.alert)(foo);
`----
x Unexpected alert
,-[7:1]
,-[10:1]
7 | }
8 | globalThis.alert();
9 | window?.alert(foo);

View File

@ -1,6 +1,5 @@
x Unexpected alert
,-[1:1]
,-[3:1]
1 | // Test cases taken form https://github.com/eslint/eslint/blob/5769cc23eca7197bb5993a0201cc269a056d4dfd/tests/lib/rules/no-alert.js
2 |
3 | alert();
@ -9,9 +8,8 @@
5 | window["alert"]();
6 | confirm();
`----
x Unexpected alert
,-[1:1]
,-[4:1]
1 | // Test cases taken form https://github.com/eslint/eslint/blob/5769cc23eca7197bb5993a0201cc269a056d4dfd/tests/lib/rules/no-alert.js
2 |
3 | alert();
@ -21,9 +19,8 @@
6 | confirm();
7 | window.confirm();
`----
x Unexpected alert
,-[2:1]
,-[5:1]
2 |
3 | alert();
4 | window.alert();
@ -33,9 +30,8 @@
7 | window.confirm();
8 | window["confirm"]();
`----
x Unexpected confirm
,-[3:1]
,-[6:1]
3 | alert();
4 | window.alert();
5 | window["alert"]();
@ -45,9 +41,8 @@
8 | window["confirm"]();
9 | prompt();
`----
x Unexpected confirm
,-[4:1]
,-[7:1]
4 | window.alert();
5 | window["alert"]();
6 | confirm();
@ -57,9 +52,8 @@
9 | prompt();
10 | window.prompt();
`----
x Unexpected confirm
,-[5:1]
,-[8:1]
5 | window["alert"]();
6 | confirm();
7 | window.confirm();
@ -69,9 +63,8 @@
10 | window.prompt();
11 | window["prompt"]();
`----
x Unexpected prompt
,-[6:1]
,-[9:1]
6 | confirm();
7 | window.confirm();
8 | window["confirm"]();
@ -81,9 +74,8 @@
11 | window["prompt"]();
12 | function foo1(alert) {
`----
x Unexpected prompt
,-[7:1]
,-[10:1]
7 | window.confirm();
8 | window["confirm"]();
9 | prompt();
@ -93,9 +85,8 @@
12 | function foo1(alert) {
13 | window.alert();
`----
x Unexpected prompt
,-[8:1]
,-[11:1]
8 | window["confirm"]();
9 | prompt();
10 | window.prompt();
@ -105,9 +96,8 @@
13 | window.alert();
14 | }
`----
x Unexpected alert
,-[10:1]
,-[13:1]
10 | window.prompt();
11 | window["prompt"]();
12 | function foo1(alert) {
@ -117,9 +107,8 @@
15 | function foo2() {
16 | alert();
`----
x Unexpected alert
,-[13:1]
,-[16:1]
13 | window.alert();
14 | }
15 | function foo2() {
@ -129,9 +118,8 @@
18 | function foo3() {
19 | var alert = function () {};
`----
x Unexpected alert
,-[18:1]
,-[21:1]
18 | function foo3() {
19 | var alert = function () {};
20 | }
@ -141,9 +129,8 @@
23 | // currently unsupported
24 | // this.alert(foo)
`----
x Unexpected alert
,-[28:1]
,-[31:1]
28 | var window = bar;
29 | window.alert();
30 | }
@ -153,9 +140,8 @@
33 | function foo5() {
34 | alert();
`----
x Unexpected alert
,-[35:1]
,-[38:1]
35 | const alert = () => {};
36 | }
37 |
@ -165,9 +151,8 @@
40 | (() => {
41 | const obj = {
`----
x Unexpected alert
,-[35:1]
,-[38:1]
35 | const alert = () => {};
36 | }
37 |
@ -177,9 +162,8 @@
40 | (() => {
41 | const obj = {
`----
x Unexpected alert
,-[51:1]
,-[54:1]
51 | console.log(alert);
52 | })();
53 |

View File

@ -1,4 +1,3 @@
x Unexpected alert
,-[1:1]
1 | this.alert();
@ -7,9 +6,8 @@
3 | class X {
4 | constructor(x) {
`----
x Unexpected alert
,-[30:1]
,-[33:1]
30 | },
31 | c: () => {
32 | // should fail
@ -19,9 +17,8 @@
35 | e: {
36 | a() {
`----
x Unexpected alert
,-[45:1]
,-[48:1]
45 | function f1() {
46 | const x = () => {
47 | // should fail

View File

@ -1,4 +1,3 @@
x Unexpected `await` inside a loop
,-[1:1]
1 | async function foo() { while (baz) { await bar; } }
@ -7,9 +6,8 @@
3 | async function foo() { while (baz) { for await (x of xs); } }
4 | async function foo() { for (var bar of baz) { await bar; } }
`----
x Unexpected `await` inside a loop
,-[1:1]
,-[2:1]
1 | async function foo() { while (baz) { await bar; } }
2 | async function foo() { while (await foo()) { } }
: ^^^^^^^^^^^
@ -17,9 +15,8 @@
4 | async function foo() { for (var bar of baz) { await bar; } }
5 | async function foo() { for (var bar of baz) await bar; }
`----
x Unexpected `await` inside a loop
,-[1:1]
,-[3:1]
1 | async function foo() { while (baz) { await bar; } }
2 | async function foo() { while (await foo()) { } }
3 | async function foo() { while (baz) { for await (x of xs); } }
@ -28,9 +25,8 @@
5 | async function foo() { for (var bar of baz) await bar; }
6 | async function foo() { for (var bar in baz) { await bar; } }
`----
x Unexpected `await` inside a loop
,-[1:1]
,-[4:1]
1 | async function foo() { while (baz) { await bar; } }
2 | async function foo() { while (await foo()) { } }
3 | async function foo() { while (baz) { for await (x of xs); } }
@ -40,9 +36,8 @@
6 | async function foo() { for (var bar in baz) { await bar; } }
7 | async function foo() { for (var i; i < n; i++) { await bar; } }
`----
x Unexpected `await` inside a loop
,-[2:1]
,-[5:1]
2 | async function foo() { while (await foo()) { } }
3 | async function foo() { while (baz) { for await (x of xs); } }
4 | async function foo() { for (var bar of baz) { await bar; } }
@ -52,9 +47,8 @@
7 | async function foo() { for (var i; i < n; i++) { await bar; } }
8 | async function foo() { for (var i; await foo(i); i++) { } }
`----
x Unexpected `await` inside a loop
,-[3:1]
,-[6:1]
3 | async function foo() { while (baz) { for await (x of xs); } }
4 | async function foo() { for (var bar of baz) { await bar; } }
5 | async function foo() { for (var bar of baz) await bar; }
@ -64,9 +58,8 @@
8 | async function foo() { for (var i; await foo(i); i++) { } }
9 | async function foo() { for (var i; i < n; i = await bar) { } }
`----
x Unexpected `await` inside a loop
,-[4:1]
,-[7:1]
4 | async function foo() { for (var bar of baz) { await bar; } }
5 | async function foo() { for (var bar of baz) await bar; }
6 | async function foo() { for (var bar in baz) { await bar; } }
@ -76,9 +69,8 @@
9 | async function foo() { for (var i; i < n; i = await bar) { } }
10 | async function foo() { do { await bar; } while (baz); }
`----
x Unexpected `await` inside a loop
,-[5:1]
,-[8:1]
5 | async function foo() { for (var bar of baz) await bar; }
6 | async function foo() { for (var bar in baz) { await bar; } }
7 | async function foo() { for (var i; i < n; i++) { await bar; } }
@ -88,9 +80,8 @@
10 | async function foo() { do { await bar; } while (baz); }
11 | async function foo() { do { } while (await bar); }
`----
x Unexpected `await` inside a loop
,-[6:1]
,-[9:1]
6 | async function foo() { for (var bar in baz) { await bar; } }
7 | async function foo() { for (var i; i < n; i++) { await bar; } }
8 | async function foo() { for (var i; await foo(i); i++) { } }
@ -100,9 +91,8 @@
11 | async function foo() { do { } while (await bar); }
12 | async function foo() { while (true) { if (bar) { foo(await bar); } } }
`----
x Unexpected `await` inside a loop
,-[7:1]
,-[10:1]
7 | async function foo() { for (var i; i < n; i++) { await bar; } }
8 | async function foo() { for (var i; await foo(i); i++) { } }
9 | async function foo() { for (var i; i < n; i = await bar) { } }
@ -112,9 +102,8 @@
12 | async function foo() { while (true) { if (bar) { foo(await bar); } } }
13 | async function foo() { while (xyz || 5 > await x) { } }
`----
x Unexpected `await` inside a loop
,-[8:1]
,-[11:1]
8 | async function foo() { for (var i; await foo(i); i++) { } }
9 | async function foo() { for (var i; i < n; i = await bar) { } }
10 | async function foo() { do { await bar; } while (baz); }
@ -124,9 +113,8 @@
13 | async function foo() { while (xyz || 5 > await x) { } }
14 | async function foo() { for await (var x of xs) { while (1) await f(x) } }
`----
x Unexpected `await` inside a loop
,-[9:1]
,-[12:1]
9 | async function foo() { for (var i; i < n; i = await bar) { } }
10 | async function foo() { do { await bar; } while (baz); }
11 | async function foo() { do { } while (await bar); }
@ -135,9 +123,8 @@
13 | async function foo() { while (xyz || 5 > await x) { } }
14 | async function foo() { for await (var x of xs) { while (1) await f(x) } }
`----
x Unexpected `await` inside a loop
,-[10:1]
,-[13:1]
10 | async function foo() { do { await bar; } while (baz); }
11 | async function foo() { do { } while (await bar); }
12 | async function foo() { while (true) { if (bar) { foo(await bar); } } }
@ -147,9 +134,8 @@
15 |
16 | // valid
`----
x Unexpected `await` inside a loop
,-[11:1]
,-[14:1]
11 | async function foo() { do { } while (await bar); }
12 | async function foo() { while (true) { if (bar) { foo(await bar); } } }
13 | async function foo() { while (xyz || 5 > await x) { } }

View File

@ -1,4 +1,3 @@
x Unexpected use of '&'
,-[1:1]
1 | a & b;

View File

@ -1,4 +1,3 @@
x Unexpected use of '|'
,-[1:1]
1 | var x = y | z;
@ -6,9 +5,8 @@
2 |
3 | var x = y & z;
`----
x Unexpected use of '&'
,-[1:1]
,-[3:1]
1 | var x = y | z;
2 |
3 | var x = y & z;
@ -16,9 +14,8 @@
4 |
5 | var x = y ^ z;
`----
x Unexpected use of '^'
,-[2:1]
,-[5:1]
2 |
3 | var x = y & z;
4 |
@ -27,9 +24,8 @@
6 |
7 | var x = ~ z;
`----
x Unexpected use of '~'
,-[4:1]
,-[7:1]
4 |
5 | var x = y ^ z;
6 |
@ -38,9 +34,8 @@
8 |
9 | var x = y << z;
`----
x Unexpected use of '<<'
,-[6:1]
,-[9:1]
6 |
7 | var x = ~ z;
8 |
@ -49,9 +44,8 @@
10 |
11 | var x = y >> z;
`----
x Unexpected use of '>>'
,-[8:1]
,-[11:1]
8 |
9 | var x = y << z;
10 |
@ -60,9 +54,8 @@
12 |
13 | var x = y >>> z;
`----
x Unexpected use of '>>>'
,-[10:1]
,-[13:1]
10 |
11 | var x = y >> z;
12 |
@ -71,9 +64,8 @@
14 |
15 | x |= y;
`----
x Unexpected use of '|='
,-[12:1]
,-[15:1]
12 |
13 | var x = y >>> z;
14 |
@ -82,9 +74,8 @@
16 |
17 | x &= y;
`----
x Unexpected use of '&='
,-[14:1]
,-[17:1]
14 |
15 | x |= y;
16 |
@ -93,9 +84,8 @@
18 |
19 | x ^= y;
`----
x Unexpected use of '^='
,-[16:1]
,-[19:1]
16 |
17 | x &= y;
18 |
@ -104,9 +94,8 @@
20 |
21 | x <<= y;
`----
x Unexpected use of '<<='
,-[18:1]
,-[21:1]
18 |
19 | x ^= y;
20 |
@ -115,9 +104,8 @@
22 |
23 | x >>= y;
`----
x Unexpected use of '>>='
,-[20:1]
,-[23:1]
20 |
21 | x <<= y;
22 |
@ -126,9 +114,8 @@
24 |
25 | x >>>= y;
`----
x Unexpected use of '>>>='
,-[22:1]
,-[25:1]
22 |
23 | x >>= y;
24 |
@ -137,9 +124,8 @@
26 |
27 | if (a ^ b) {}
`----
x Unexpected use of '^'
,-[24:1]
,-[27:1]
24 |
25 | x >>>= y;
26 |
@ -148,9 +134,8 @@
28 |
29 | var a = x ^ y;
`----
x Unexpected use of '^'
,-[26:1]
,-[29:1]
26 |
27 | if (a ^ b) {}
28 |
@ -160,9 +145,8 @@
31 | var {
32 | a = x ^ y
`----
x Unexpected use of '^'
,-[29:1]
,-[32:1]
29 | var a = x ^ y;
30 |
31 | var {

View File

@ -1,4 +1,3 @@
x Do not use the '===' to compare against -0
,-[1:1]
1 | x === -0;
@ -7,9 +6,8 @@
3 | x == -0;
4 | -0 == x;
`----
x Do not use the '===' to compare against -0
,-[1:1]
,-[2:1]
1 | x === -0;
2 | -0 === x;
: ^^^^^^^^
@ -17,9 +15,8 @@
4 | -0 == x;
5 | x > -0;
`----
x Do not use the '==' to compare against -0
,-[1:1]
,-[3:1]
1 | x === -0;
2 | -0 === x;
3 | x == -0;
@ -28,9 +25,8 @@
5 | x > -0;
6 | -0 > x;
`----
x Do not use the '==' to compare against -0
,-[1:1]
,-[4:1]
1 | x === -0;
2 | -0 === x;
3 | x == -0;
@ -40,9 +36,8 @@
6 | -0 > x;
7 | x >= -0;
`----
x Do not use the '>' to compare against -0
,-[2:1]
,-[5:1]
2 | -0 === x;
3 | x == -0;
4 | -0 == x;
@ -52,9 +47,8 @@
7 | x >= -0;
8 | -0 >= x;
`----
x Do not use the '>' to compare against -0
,-[3:1]
,-[6:1]
3 | x == -0;
4 | -0 == x;
5 | x > -0;
@ -64,9 +58,8 @@
8 | -0 >= x;
9 | x < -0;
`----
x Do not use the '>=' to compare against -0
,-[4:1]
,-[7:1]
4 | -0 == x;
5 | x > -0;
6 | -0 > x;
@ -76,9 +69,8 @@
9 | x < -0;
10 | -0 < x;
`----
x Do not use the '>=' to compare against -0
,-[5:1]
,-[8:1]
5 | x > -0;
6 | -0 > x;
7 | x >= -0;
@ -88,9 +80,8 @@
10 | -0 < x;
11 | x <= -0;
`----
x Do not use the '<' to compare against -0
,-[6:1]
,-[9:1]
6 | -0 > x;
7 | x >= -0;
8 | -0 >= x;
@ -100,9 +91,8 @@
11 | x <= -0;
12 | -0 <= x;
`----
x Do not use the '<' to compare against -0
,-[7:1]
,-[10:1]
7 | x >= -0;
8 | -0 >= x;
9 | x < -0;
@ -112,9 +102,8 @@
12 | -0 <= x;
13 | -0 === -0
`----
x Do not use the '<=' to compare against -0
,-[8:1]
,-[11:1]
8 | -0 >= x;
9 | x < -0;
10 | -0 < x;
@ -123,9 +112,8 @@
12 | -0 <= x;
13 | -0 === -0
`----
x Do not use the '<=' to compare against -0
,-[9:1]
,-[12:1]
9 | x < -0;
10 | -0 < x;
11 | x <= -0;
@ -135,9 +123,8 @@
14 |
15 | x == '-0'
`----
x Do not use the '===' to compare against -0
,-[10:1]
,-[13:1]
10 | -0 < x;
11 | x <= -0;
12 | -0 <= x;

View File

@ -1,4 +1,3 @@
x Expected a conditional expression and instead saw an assignment
,-[1:1]
1 | var x; if (x = 0) { var b = 1; }
@ -6,9 +5,8 @@
2 |
3 | var x; while (x = 0) { var b = 1; }
`----
x Expected a conditional expression and instead saw an assignment
,-[1:1]
,-[3:1]
1 | var x; if (x = 0) { var b = 1; }
2 |
3 | var x; while (x = 0) { var b = 1; }
@ -16,9 +14,8 @@
4 |
5 | var x = 0, y; do { y = x; } while (x = x + 1);
`----
x Expected a conditional expression and instead saw an assignment
,-[2:1]
,-[5:1]
2 |
3 | var x; while (x = 0) { var b = 1; }
4 |
@ -27,9 +24,8 @@
6 |
7 | var x; for(; x+=1 ;){};
`----
x Expected a conditional expression and instead saw an assignment
,-[4:1]
,-[7:1]
4 |
5 | var x = 0, y; do { y = x; } while (x = x + 1);
6 |
@ -38,9 +34,8 @@
8 |
9 | var x; if ((x) = (0));
`----
x Expected a conditional expression and instead saw an assignment
,-[6:1]
,-[9:1]
6 |
7 | var x; for(; x+=1 ;){};
8 |
@ -49,9 +44,8 @@
10 |
11 | if (someNode || (someNode = parentNode)) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[8:1]
,-[11:1]
8 |
9 | var x; if ((x) = (0));
10 |
@ -60,9 +54,8 @@
12 |
13 | while (someNode || (someNode = parentNode)) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[10:1]
,-[13:1]
10 |
11 | if (someNode || (someNode = parentNode)) { }
12 |
@ -71,9 +64,8 @@
14 |
15 | do { } while (someNode || (someNode = parentNode));
`----
x Expected a conditional expression and instead saw an assignment
,-[12:1]
,-[15:1]
12 |
13 | while (someNode || (someNode = parentNode)) { }
14 |
@ -82,9 +74,8 @@
16 |
17 | for (; (typeof l === 'undefined' ? (l = 0) : l); i++) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[14:1]
,-[17:1]
14 |
15 | do { } while (someNode || (someNode = parentNode));
16 |
@ -93,9 +84,8 @@
18 |
19 | if (x = 0) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[16:1]
,-[19:1]
16 |
17 | for (; (typeof l === 'undefined' ? (l = 0) : l); i++) { }
18 |
@ -104,9 +94,8 @@
20 |
21 | while (x = 0) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[18:1]
,-[21:1]
18 |
19 | if (x = 0) { }
20 |
@ -115,9 +104,8 @@
22 |
23 | do { } while (x = x + 1);
`----
x Expected a conditional expression and instead saw an assignment
,-[20:1]
,-[23:1]
20 |
21 | while (x = 0) { }
22 |
@ -126,9 +114,8 @@
24 |
25 | for(; x = y; ) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[22:1]
,-[25:1]
22 |
23 | do { } while (x = x + 1);
24 |
@ -137,9 +124,8 @@
26 |
27 | if ((x = 0)) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[24:1]
,-[27:1]
24 |
25 | for(; x = y; ) { }
26 |
@ -148,9 +134,8 @@
28 |
29 | while ((x = 0)) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[26:1]
,-[29:1]
26 |
27 | if ((x = 0)) { }
28 |
@ -159,9 +144,8 @@
30 |
31 | do { } while ((x = x + 1));
`----
x Expected a conditional expression and instead saw an assignment
,-[28:1]
,-[31:1]
28 |
29 | while ((x = 0)) { }
30 |
@ -170,9 +154,8 @@
32 |
33 | for(; (x = y); ) { }
`----
x Expected a conditional expression and instead saw an assignment
,-[30:1]
,-[33:1]
30 |
31 | do { } while ((x = x + 1));
32 |
@ -181,9 +164,8 @@
34 |
35 | var x; var b = (x = 0) ? 1 : 0;
`----
x Expected a conditional expression and instead saw an assignment
,-[32:1]
,-[35:1]
32 |
33 | for(; (x = y); ) { }
34 |
@ -192,9 +174,8 @@
36 |
37 | var x; var b = x && (y = 0) ? 1 : 0;
`----
x Expected a conditional expression and instead saw an assignment
,-[34:1]
,-[37:1]
34 |
35 | var x; var b = (x = 0) ? 1 : 0;
36 |
@ -203,9 +184,8 @@
38 |
39 | (((3496.29)).bkufyydt = 2e308) ? foo : bar;
`----
x Expected a conditional expression and instead saw an assignment
,-[36:1]
,-[39:1]
36 |
37 | var x; var b = x && (y = 0) ? 1 : 0;
38 |

View File

@ -1,4 +1,3 @@
x Unexpected console statement
,-[1:1]
1 | console.log('restricted');

View File

@ -1,6 +1,5 @@
x Unexpected console statement
,-[4:1]
,-[7:1]
4 | console.log("message");
5 | };
6 |

View File

@ -1,6 +1,5 @@
x Unexpected 'debugger' statement
,-[1:1]
,-[2:1]
1 | function f() {
2 | debugger;
: ^^^^^^^^^
@ -8,9 +7,8 @@
4 |
5 | debugger;
`----
x Unexpected 'debugger' statement
,-[2:1]
,-[5:1]
2 | debugger;
3 | }
4 |

View File

@ -1,4 +1,3 @@
x the name `b` is bound more than once in this parameter list
,-[1:1]
1 | function a(a, b, b) {}
@ -9,9 +8,8 @@
3 | function c(a, b, a) {}
4 | function d(a, b, a, b) {}
`----
x the name `a` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function a(a, b, b) {}
2 | function b(a, a, a) {}
: | |
@ -21,9 +19,8 @@
4 | function d(a, b, a, b) {}
5 | var e = function (a, b, b) {};
`----
x the name `a` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function a(a, b, b) {}
2 | function b(a, a, a) {}
: | |
@ -33,9 +30,8 @@
4 | function d(a, b, a, b) {}
5 | var e = function (a, b, b) {};
`----
x the name `a` is bound more than once in this parameter list
,-[1:1]
,-[3:1]
1 | function a(a, b, b) {}
2 | function b(a, a, a) {}
3 | function c(a, b, a) {}
@ -46,9 +42,8 @@
5 | var e = function (a, b, b) {};
6 | var f = function (a, a, a) {};
`----
x the name `a` is bound more than once in this parameter list
,-[1:1]
,-[4:1]
1 | function a(a, b, b) {}
2 | function b(a, a, a) {}
3 | function c(a, b, a) {}
@ -60,9 +55,8 @@
6 | var f = function (a, a, a) {};
7 | var g = function (a, b, a) {};
`----
x the name `b` is bound more than once in this parameter list
,-[1:1]
,-[4:1]
1 | function a(a, b, b) {}
2 | function b(a, a, a) {}
3 | function c(a, b, a) {}
@ -74,9 +68,8 @@
6 | var f = function (a, a, a) {};
7 | var g = function (a, b, a) {};
`----
x the name `b` is bound more than once in this parameter list
,-[2:1]
,-[5:1]
2 | function b(a, a, a) {}
3 | function c(a, b, a) {}
4 | function d(a, b, a, b) {}
@ -88,9 +81,8 @@
7 | var g = function (a, b, a) {};
8 | var h = function (a, b, a, b) {};
`----
x the name `a` is bound more than once in this parameter list
,-[3:1]
,-[6:1]
3 | function c(a, b, a) {}
4 | function d(a, b, a, b) {}
5 | var e = function (a, b, b) {};
@ -101,9 +93,8 @@
7 | var g = function (a, b, a) {};
8 | var h = function (a, b, a, b) {};
`----
x the name `a` is bound more than once in this parameter list
,-[3:1]
,-[6:1]
3 | function c(a, b, a) {}
4 | function d(a, b, a, b) {}
5 | var e = function (a, b, b) {};
@ -114,9 +105,8 @@
7 | var g = function (a, b, a) {};
8 | var h = function (a, b, a, b) {};
`----
x the name `a` is bound more than once in this parameter list
,-[4:1]
,-[7:1]
4 | function d(a, b, a, b) {}
5 | var e = function (a, b, b) {};
6 | var f = function (a, a, a) {};
@ -126,9 +116,8 @@
: `-- previous definition here
8 | var h = function (a, b, a, b) {};
`----
x the name `a` is bound more than once in this parameter list
,-[5:1]
,-[8:1]
5 | var e = function (a, b, b) {};
6 | var f = function (a, a, a) {};
7 | var g = function (a, b, a) {};
@ -137,9 +126,8 @@
: | `-- used as parameter more than once
: `-- previous definition here
`----
x the name `b` is bound more than once in this parameter list
,-[5:1]
,-[8:1]
5 | var e = function (a, b, b) {};
6 | var f = function (a, a, a) {};
7 | var g = function (a, b, a) {};

View File

@ -1,4 +1,3 @@
x the name `b` is bound more than once in this parameter list
,-[1:1]
1 | const foo = (a, b, b) => {};
@ -8,9 +7,8 @@
2 | (a, b, b) => {};
3 | ((a, b, b) => {})();
`----
x the name `b` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | const foo = (a, b, b) => {};
2 | (a, b, b) => {};
: | |
@ -20,9 +18,8 @@
4 |
5 | class Bar {
`----
x the name `b` is bound more than once in this parameter list
,-[1:1]
,-[3:1]
1 | const foo = (a, b, b) => {};
2 | (a, b, b) => {};
3 | ((a, b, b) => {})();
@ -33,9 +30,8 @@
5 | class Bar {
6 | constructor(a, b, b) {}
`----
x the name `b` is bound more than once in this parameter list
,-[3:1]
,-[6:1]
3 | ((a, b, b) => {})();
4 |
5 | class Bar {
@ -46,9 +42,8 @@
7 |
8 | foo = (a, b, b) => {};
`----
x the name `b` is bound more than once in this parameter list
,-[5:1]
,-[8:1]
5 | class Bar {
6 | constructor(a, b, b) {}
7 |
@ -60,9 +55,8 @@
10 | bar(a, b, b) {}
11 | }
`----
x the name `b` is bound more than once in this parameter list
,-[7:1]
,-[10:1]
7 |
8 | foo = (a, b, b) => {};
9 |
@ -74,9 +68,8 @@
12 |
13 | const baz = {
`----
x the name `b` is bound more than once in this parameter list
,-[11:1]
,-[14:1]
11 | }
12 |
13 | const baz = {
@ -87,9 +80,8 @@
15 | bar: function (a, b, b) {},
16 | };
`----
x the name `b` is bound more than once in this parameter list
,-[12:1]
,-[15:1]
12 |
13 | const baz = {
14 | foo(a, b, b) {},

View File

@ -1,4 +1,3 @@
x the name `a` is bound more than once in this parameter list
,-[1:1]
1 | function foo(a, b, [a]) {}
@ -8,9 +7,8 @@
2 | function bar(a, b, ...a) {}
3 | function baz({ a }, b, { c: [a] }) {}
`----
x the name `a` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(a, b, [a]) {}
2 | function bar(a, b, ...a) {}
: | |
@ -18,9 +16,8 @@
: `-- previous definition here
3 | function baz({ a }, b, { c: [a] }) {}
`----
x the name `a` is bound more than once in this parameter list
,-[1:1]
,-[3:1]
1 | function foo(a, b, [a]) {}
2 | function bar(a, b, ...a) {}
3 | function baz({ a }, b, { c: [a] }) {}

View File

@ -1,4 +1,3 @@
x the name `a` is bound more than once in this parameter list
,-[1:1]
1 | function foo(a, b, [a]) {
@ -9,9 +8,8 @@
3 | function baz({ e }, f, { f: [e] }) {}
4 | }
`----
x the name `d` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(a, b, [a]) {
2 | function bar(c, d, ...d) {
: | |
@ -21,9 +19,8 @@
4 | }
5 | }
`----
x the name `e` is bound more than once in this parameter list
,-[1:1]
,-[3:1]
1 | function foo(a, b, [a]) {
2 | function bar(c, d, ...d) {
3 | function baz({ e }, f, { f: [e] }) {}

View File

@ -1,6 +1,5 @@
x the name `a0` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -14,9 +13,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a1` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -30,9 +28,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a2` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -46,9 +43,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a3` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -62,9 +58,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a4` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -78,9 +73,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a5` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -94,9 +88,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a6` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -110,9 +103,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a7` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -126,9 +118,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a8` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -142,9 +133,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a9` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -158,9 +148,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b0` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -174,9 +163,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b1` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -190,9 +178,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b2` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -206,9 +193,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b3` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -222,9 +208,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b4` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -238,9 +223,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b5` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -254,9 +238,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b6` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -270,9 +253,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b7` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -286,9 +268,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b8` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -302,9 +283,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `b9` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -318,9 +298,8 @@
7 | [i0, i1, i2, i3, i4, i5, i6, i7, i8, i9], [j0, j1, j2, j3, j4, j5, j6, j7, j8, j9],
8 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],) {
`----
x the name `a0` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -336,9 +315,8 @@
9 |
10 | }
`----
x the name `a1` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -354,9 +332,8 @@
9 |
10 | }
`----
x the name `a2` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -372,9 +349,8 @@
9 |
10 | }
`----
x the name `a3` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -390,9 +366,8 @@
9 |
10 | }
`----
x the name `a4` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -408,9 +383,8 @@
9 |
10 | }
`----
x the name `a5` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -426,9 +400,8 @@
9 |
10 | }
`----
x the name `a6` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -444,9 +417,8 @@
9 |
10 | }
`----
x the name `a7` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -462,9 +434,8 @@
9 |
10 | }
`----
x the name `a8` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -480,9 +451,8 @@
9 |
10 | }
`----
x the name `a9` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -498,9 +468,8 @@
9 |
10 | }
`----
x the name `b0` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -516,9 +485,8 @@
9 |
10 | }
`----
x the name `b1` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -534,9 +502,8 @@
9 |
10 | }
`----
x the name `b2` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -552,9 +519,8 @@
9 |
10 | }
`----
x the name `b3` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -570,9 +536,8 @@
9 |
10 | }
`----
x the name `b4` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -588,9 +553,8 @@
9 |
10 | }
`----
x the name `b5` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -606,9 +570,8 @@
9 |
10 | }
`----
x the name `b6` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -624,9 +587,8 @@
9 |
10 | }
`----
x the name `b7` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -642,9 +604,8 @@
9 |
10 | }
`----
x the name `b8` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|
@ -660,9 +621,8 @@
9 |
10 | }
`----
x the name `b9` is bound more than once in this parameter list
,-[1:1]
,-[2:1]
1 | function foo(
2 | [a0, a1, a2, a3, a4, a5, a6, a7, a8, a9], [b0, b1, b2, b3, b4, b5, b6, b7, b8, b9],
: ^|

View File

@ -1,6 +1,5 @@
x Unexpected empty generator function pattern
,-[1:1]
,-[3:1]
1 | function foo1() {}
2 |
3 | function* foo2() {}
@ -9,9 +8,8 @@
5 | class A {
6 | constructor() {}
`----
x Unexpected empty method pattern
,-[7:1]
,-[10:1]
7 |
8 | async method() {}
9 |

View File

@ -1,4 +1,3 @@
x Unexpected empty function pattern
,-[1:1]
1 | function foo1() {}
@ -6,9 +5,8 @@
2 |
3 | var foo2 = function() {};
`----
x Unexpected empty function pattern
,-[1:1]
,-[3:1]
1 | function foo1() {}
2 |
3 | var foo2 = function() {};
@ -17,9 +15,8 @@
5 | var foo3 = () => {
6 | bar();
`----
x Unexpected empty generator function pattern
,-[6:1]
,-[9:1]
6 | bar();
7 | };
8 |
@ -28,9 +25,8 @@
10 |
11 | var foo5 = function*() {};
`----
x Unexpected empty generator function pattern
,-[8:1]
,-[11:1]
8 |
9 | function* foo4() {}
10 |
@ -39,9 +35,8 @@
12 |
13 | var foo6 = () => {};
`----
x Unexpected empty arrow function pattern
,-[10:1]
,-[13:1]
10 |
11 | var foo5 = function*() {};
12 |
@ -50,9 +45,8 @@
14 |
15 | async function foo7() {}
`----
x Unexpected empty async function pattern
,-[12:1]
,-[15:1]
12 |
13 | var foo6 = () => {};
14 |
@ -62,9 +56,8 @@
17 | class A {
18 | constructor() {}
`----
x Unexpected empty constructor pattern
,-[15:1]
,-[18:1]
15 | async function foo7() {}
16 |
17 | class A {
@ -73,9 +66,8 @@
19 |
20 | foo() {}
`----
x Unexpected empty method pattern
,-[17:1]
,-[20:1]
17 | class A {
18 | constructor() {}
19 |
@ -84,9 +76,8 @@
21 |
22 | *foo() {}
`----
x Unexpected empty generator method pattern
,-[19:1]
,-[22:1]
19 |
20 | foo() {}
21 |
@ -95,9 +86,8 @@
23 |
24 | get foo() {}
`----
x Unexpected empty getter method pattern
,-[21:1]
,-[24:1]
21 |
22 | *foo() {}
23 |
@ -106,9 +96,8 @@
25 |
26 | set foo(value) {}
`----
x Unexpected empty setter method pattern
,-[23:1]
,-[26:1]
23 |
24 | get foo() {}
25 |
@ -117,9 +106,8 @@
27 |
28 | static foo() {}
`----
x Unexpected empty method pattern
,-[25:1]
,-[28:1]
25 |
26 | set foo(value) {}
27 |
@ -128,9 +116,8 @@
29 |
30 | static *foo() {}
`----
x Unexpected empty generator method pattern
,-[27:1]
,-[30:1]
27 |
28 | static foo() {}
29 |
@ -139,9 +126,8 @@
31 |
32 | static get foo() {}
`----
x Unexpected empty getter method pattern
,-[29:1]
,-[32:1]
29 |
30 | static *foo() {}
31 |
@ -151,9 +137,8 @@
34 | static set foo(value) {}
35 | }
`----
x Unexpected empty setter method pattern
,-[31:1]
,-[34:1]
31 |
32 | static get foo() {}
33 |
@ -163,9 +148,8 @@
36 |
37 | var obj = {
`----
x Unexpected empty function pattern
,-[35:1]
,-[38:1]
35 | }
36 |
37 | var obj = {
@ -174,9 +158,8 @@
39 |
40 | foo: function*() {},
`----
x Unexpected empty generator function pattern
,-[37:1]
,-[40:1]
37 | var obj = {
38 | foo: function() {},
39 |
@ -185,9 +168,8 @@
41 |
42 | foo() {},
`----
x Unexpected empty function pattern
,-[39:1]
,-[42:1]
39 |
40 | foo: function*() {},
41 |
@ -196,9 +178,8 @@
43 |
44 | *foo() {},
`----
x Unexpected empty generator function pattern
,-[41:1]
,-[44:1]
41 |
42 | foo() {},
43 |
@ -207,9 +188,8 @@
45 |
46 | get foo() {},
`----
x Unexpected empty getter method pattern
,-[43:1]
,-[46:1]
43 |
44 | *foo() {},
45 |
@ -219,9 +199,8 @@
48 | set foo(value) {}
49 | };
`----
x Unexpected empty setter method pattern
,-[45:1]
,-[48:1]
45 |
46 | get foo() {},
47 |

View File

@ -1,15 +1,13 @@
x Unexpected empty private constructor pattern
,-[1:1]
,-[2:1]
1 | class A {
2 | private constructor() {}
: ^^^^^^^^^^^^^^^^^^^^^^^^
3 |
4 | private method1() {}
`----
x Unexpected empty private method pattern
,-[1:1]
,-[4:1]
1 | class A {
2 | private constructor() {}
3 |
@ -18,9 +16,8 @@
5 |
6 | protected method2() {}
`----
x Unexpected empty protected method pattern
,-[3:1]
,-[6:1]
3 |
4 | private method1() {}
5 |
@ -29,9 +26,8 @@
7 |
8 | public method3() {}
`----
x Unexpected empty public method pattern
,-[5:1]
,-[8:1]
5 |
6 | protected method2() {}
7 |
@ -41,9 +37,8 @@
10 | // max markers count
11 | public async *method4() {}
`----
x Unexpected empty public method pattern
,-[8:1]
,-[11:1]
8 | public method3() {}
9 |
10 | // max markers count
@ -53,9 +48,8 @@
13 |
14 | class B {
`----
x Unexpected empty method pattern
,-[14:1]
,-[17:1]
14 | class B {
15 | constructor(params: number) {
16 | class Nested {

View File

@ -1,4 +1,3 @@
x Unexpected empty function pattern
,-[1:1]
1 | ,-> function foo1() {

View File

@ -1,4 +1,3 @@
x Unexpected empty object pattern
,-[1:1]
1 | var {} = foo;
@ -7,9 +6,8 @@
3 | var {a: {}} = foo;
4 | var {a: []} = foo;
`----
x Unexpected empty array pattern
,-[1:1]
,-[2:1]
1 | var {} = foo;
2 | var [] = foo;
: ^^
@ -17,9 +15,8 @@
4 | var {a: []} = foo;
5 | var {a: {a: {}}} = foo;
`----
x Unexpected empty object pattern
,-[1:1]
,-[3:1]
1 | var {} = foo;
2 | var [] = foo;
3 | var {a: {}} = foo;
@ -28,9 +25,8 @@
5 | var {a: {a: {}}} = foo;
6 | var [...[]] = foo;
`----
x Unexpected empty array pattern
,-[1:1]
,-[4:1]
1 | var {} = foo;
2 | var [] = foo;
3 | var {a: {}} = foo;
@ -40,9 +36,8 @@
6 | var [...[]] = foo;
7 | function foo1({}) {}
`----
x Unexpected empty object pattern
,-[2:1]
,-[5:1]
2 | var [] = foo;
3 | var {a: {}} = foo;
4 | var {a: []} = foo;
@ -52,9 +47,8 @@
7 | function foo1({}) {}
8 | function foo2([]) {}
`----
x Unexpected empty array pattern
,-[3:1]
,-[6:1]
3 | var {a: {}} = foo;
4 | var {a: []} = foo;
5 | var {a: {a: {}}} = foo;
@ -64,9 +58,8 @@
8 | function foo2([]) {}
9 | function foo3({a: {}}) {}
`----
x Unexpected empty object pattern
,-[4:1]
,-[7:1]
4 | var {a: []} = foo;
5 | var {a: {a: {}}} = foo;
6 | var [...[]] = foo;
@ -76,9 +69,8 @@
9 | function foo3({a: {}}) {}
10 | function foo4({a: []}) {}
`----
x Unexpected empty array pattern
,-[5:1]
,-[8:1]
5 | var {a: {a: {}}} = foo;
6 | var [...[]] = foo;
7 | function foo1({}) {}
@ -87,9 +79,8 @@
9 | function foo3({a: {}}) {}
10 | function foo4({a: []}) {}
`----
x Unexpected empty object pattern
,-[6:1]
,-[9:1]
6 | var [...[]] = foo;
7 | function foo1({}) {}
8 | function foo2([]) {}
@ -99,9 +90,8 @@
11 |
12 | var {a = {}} = foo;
`----
x Unexpected empty array pattern
,-[7:1]
,-[10:1]
7 | function foo1({}) {}
8 | function foo2([]) {}
9 | function foo3({a: {}}) {}
@ -111,9 +101,8 @@
12 | var {a = {}} = foo;
13 | var {a = []} = foo;
`----
x Unexpected empty object pattern
,-[15:1]
,-[18:1]
15 | function foo5({a = {}}) {}
16 | function foo6({a = []}) {}
17 |
@ -123,9 +112,8 @@
20 | class A {
21 | constructor({}) {}
`----
x Unexpected empty object pattern
,-[18:1]
,-[21:1]
18 | try {} catch ({}) {}
19 |
20 | class A {
@ -135,9 +123,8 @@
23 | method({}) {}
24 | }
`----
x Unexpected empty object pattern
,-[20:1]
,-[23:1]
20 | class A {
21 | constructor({}) {}
22 |

View File

@ -1,6 +1,5 @@
x the name `a` is defined multiple times
,-[33:1]
,-[36:1]
33 | }
34 |
35 | // Not ok
@ -33,9 +32,8 @@
58 | while (true) {
59 | setTimeout(() => {
`----
x Function declared in a loop contains unsafe references to variable i
,-[6:1]
,-[9:1]
6 |
7 | // it's unsafe
8 | for (var i = 0; i < 10; i += 1) {
@ -45,9 +43,8 @@
12 | x();
13 | }
`----
x Function declared in a loop contains unsafe references to variable(s) z, zz
,-[26:1]
,-[29:1]
26 | let zz = 20;
27 |
28 | for (let i = 0; i < 10; i += 1) {
@ -57,9 +54,8 @@
32 | x();
33 | }
`----
x Function declared in a loop contains unsafe references to variable a
,-[33:1]
,-[36:1]
33 | }
34 |
35 | // Not ok
@ -69,9 +65,8 @@
38 | // interview example =)
39 | for (var i = 0; i < 10; i++) {
`----
x Function declared in a loop contains unsafe references to variable i
,-[37:1]
,-[40:1]
37 |
38 | // interview example =)
39 | for (var i = 0; i < 10; i++) {
@ -82,9 +77,8 @@
44 |
45 | // it's ok
`----
x Function declared in a loop contains unsafe references to variable a
,-[56:1]
,-[59:1]
56 | var a = 0;
57 |
58 | while (true) {
@ -94,9 +88,8 @@
62 | }
63 | }
`----
x Function declared in a loop contains unsafe references to variable(s) aa, bb, cc, ee
,-[66:1]
,-[69:1]
66 |
67 | let { aa, bb: { bb }, cc: [cc], ...ee } = obj;
68 | for (const k in obj) {

View File

@ -1,4 +1,3 @@
x The object literal notation {} is preferable
,-[1:1]
1 | var myObject = new Object();
@ -6,9 +5,8 @@
2 |
3 | new Object();
`----
x The object literal notation {} is preferable
,-[1:1]
,-[3:1]
1 | var myObject = new Object();
2 |
3 | new Object();
@ -16,9 +14,8 @@
4 |
5 | var foo = new Object("foo");
`----
x The object literal notation {} is preferable
,-[2:1]
,-[5:1]
2 |
3 | new Object();
4 |

View File

@ -1,4 +1,3 @@
x `Symbol` cannot be called as a constructor
,-[1:1]
1 | new Symbol();
@ -6,9 +5,8 @@
2 |
3 | new A(new Symbol())
`----
x `Symbol` cannot be called as a constructor
,-[1:1]
,-[3:1]
1 | new Symbol();
2 |
3 | new A(new Symbol())

View File

@ -1,4 +1,3 @@
x Do not use 'new' for side effects
,-[1:1]
1 | new A();
@ -6,9 +5,8 @@
2 |
3 | (new A());
`----
x Do not use 'new' for side effects
,-[1:1]
,-[3:1]
1 | new A();
2 |
3 | (new A());
@ -16,9 +14,8 @@
4 |
5 | (0, new A());
`----
x Do not use 'new' for side effects
,-[2:1]
,-[5:1]
2 |
3 | (new A());
4 |
@ -28,9 +25,8 @@
7 | var {
8 | x = () => {
`----
x Do not use 'new' for side effects
,-[6:1]
,-[9:1]
6 |
7 | var {
8 | x = () => {
@ -40,9 +36,8 @@
11 | y: {
12 | z = () => {
`----
x Do not use 'new' for side effects
,-[10:1]
,-[13:1]
10 | },
11 | y: {
12 | z = () => {
@ -52,9 +47,8 @@
15 | }
16 | } = obj;
`----
x Do not use 'new' for side effects
,-[16:1]
,-[19:1]
16 | } = obj;
17 |
18 | var [
@ -63,9 +57,8 @@
20 | [ b = () => { new A() } ]
21 | ] = [];
`----
x Do not use 'new' for side effects
,-[17:1]
,-[20:1]
17 |
18 | var [
19 | a = () => { new A() },
@ -75,9 +68,8 @@
22 |
23 | (0, new A(), 0);
`----
x Do not use 'new' for side effects
,-[20:1]
,-[23:1]
20 | [ b = () => { new A() } ]
21 | ] = [];
22 |
@ -87,9 +79,8 @@
25 | var x = new A(() => {
26 | new B();
`----
x Do not use 'new' for side effects
,-[23:1]
,-[26:1]
23 | (0, new A(), 0);
24 |
25 | var x = new A(() => {
@ -99,9 +90,8 @@
28 |
29 | // should check only outer new expr
`----
x Do not use 'new' for side effects
,-[27:1]
,-[30:1]
27 | })
28 |
29 | // should check only outer new expr
@ -111,9 +101,8 @@
32 | new A(new A(() => {
33 | new B();
`----
x Do not use 'new' for side effects
,-[29:1]
,-[32:1]
29 | // should check only outer new expr
30 | new A(new A());
31 |
@ -123,9 +112,8 @@
35 |
36 | var x = (new A(), 0);
`----
x Do not use 'new' for side effects
,-[30:1]
,-[33:1]
30 | new A(new A());
31 |
32 | new A(new A(() => {
@ -135,9 +123,8 @@
35 |
36 | var x = (new A(), 0);
`----
x Do not use 'new' for side effects
,-[33:1]
,-[36:1]
33 | new B();
34 | }));
35 |
@ -147,9 +134,8 @@
38 | var x = (0, new A(() => {
39 | new B();
`----
x Do not use 'new' for side effects
,-[36:1]
,-[39:1]
36 | var x = (new A(), 0);
37 |
38 | var x = (0, new A(() => {
@ -159,9 +145,8 @@
41 |
42 | var x = {
`----
x Do not use 'new' for side effects
,-[41:1]
,-[44:1]
41 |
42 | var x = {
43 | x: new A(() => {
@ -170,9 +155,8 @@
45 | })
46 | }
`----
x Do not use 'new' for side effects
,-[45:1]
,-[48:1]
45 | })
46 | }
47 |

View File

@ -1,4 +1,3 @@
x Do not use 'new' for side effects
,-[1:1]
1 | new A()
@ -7,9 +6,8 @@
3 | @Decorator(() => {
4 | new A()
`----
x Do not use 'new' for side effects
,-[1:1]
,-[4:1]
1 | new A()
2 |
3 | @Decorator(() => {
@ -19,9 +17,8 @@
6 | class C {
7 | public prop = new A();
`----
x Do not use 'new' for side effects
,-[6:1]
,-[9:1]
6 | class C {
7 | public prop = new A();
8 | public prop2 = () => {

View File

@ -1,4 +1,3 @@
x 'Math' is not a function
,-[1:1]
1 | var math = Math();
@ -6,9 +5,8 @@
2 |
3 | var newMath = new Math();
`----
x 'Math' is not a function
,-[1:1]
,-[3:1]
1 | var math = Math();
2 |
3 | var newMath = new Math();
@ -16,9 +14,8 @@
4 |
5 | var json = JSON();
`----
x 'JSON' is not a function
,-[2:1]
,-[5:1]
2 |
3 | var newMath = new Math();
4 |
@ -27,9 +24,8 @@
6 |
7 | var newJSON = new JSON();
`----
x 'JSON' is not a function
,-[4:1]
,-[7:1]
4 |
5 | var json = JSON();
6 |
@ -38,9 +34,8 @@
8 |
9 | var reflect = Reflect();
`----
x 'Reflect' is not a function
,-[6:1]
,-[9:1]
6 |
7 | var newJSON = new JSON();
8 |
@ -49,9 +44,8 @@
10 |
11 | var newReflect = new Reflect();
`----
x 'Reflect' is not a function
,-[8:1]
,-[11:1]
8 |
9 | var reflect = Reflect();
10 |
@ -60,9 +54,8 @@
12 |
13 | var atomics = Atomics();
`----
x 'Atomics' is not a function
,-[10:1]
,-[13:1]
10 |
11 | var newReflect = new Reflect();
12 |
@ -71,9 +64,8 @@
14 |
15 | var newAtomics = new Atomics();
`----
x 'Atomics' is not a function
,-[12:1]
,-[15:1]
12 |
13 | var atomics = Atomics();
14 |

View File

@ -1,6 +1,5 @@
x Assignment to function parameter 'catchMe'
,-[1:1]
,-[3:1]
1 | function f(ignoreMe, catchMe) {
2 | ignoreMe = 1;
3 | catchMe = 1;

View File

@ -1,6 +1,5 @@
x Assignment to function parameter 'a'
,-[1:1]
,-[2:1]
1 | function f(a, b) {
2 | a = 1;
: ^

View File

@ -1,6 +1,5 @@
x Assignment to function parameter 'a'
,-[1:1]
,-[2:1]
1 | function f(a) {
2 | a = 1;
: ^
@ -8,9 +7,8 @@
4 |
5 | function f(a) {
`----
x Assignment to function parameter 'a'
,-[4:1]
,-[7:1]
4 |
5 | function f(a) {
6 | function f3() {
@ -19,9 +17,8 @@
8 | }
9 | }
`----
x Assignment to function parameter 'a'
,-[19:1]
,-[22:1]
19 | }
20 |
21 | function f(a) {
@ -31,9 +28,8 @@
24 | a.prop++;
25 | ++a.prop;
`----
x Assignment to function parameter 'a'
,-[20:1]
,-[23:1]
20 |
21 | function f(a) {
22 | a++;
@ -43,9 +39,8 @@
25 | ++a.prop;
26 | }
`----
x Assignment to function parameter 'a'
,-[26:1]
,-[29:1]
26 | }
27 |
28 | function f(a) {
@ -55,9 +50,8 @@
31 |
32 | for (a in []) {}
`----
x Assignment to function parameter 'a'
,-[29:1]
,-[32:1]
29 | for (a of []) {}
30 | for (const a of []) {}
31 |
@ -66,9 +60,8 @@
33 | for (const a in []) {}
34 | }
`----
x Assignment to function parameter 'a'
,-[38:1]
,-[41:1]
38 | }
39 |
40 | function f(a, b, c) {
@ -78,9 +71,8 @@
43 | ({ a, b, k: { c } } = {});
44 | ([a] = []);
`----
x Assignment to function parameter 'a'
,-[39:1]
,-[42:1]
39 |
40 | function f(a, b, c) {
41 | ({ a } = {});
@ -90,9 +82,8 @@
44 | ([a] = []);
45 | ([{a}, [b]] = [])
`----
x Assignment to function parameter 'b'
,-[39:1]
,-[42:1]
39 |
40 | function f(a, b, c) {
41 | ({ a } = {});
@ -102,9 +93,8 @@
44 | ([a] = []);
45 | ([{a}, [b]] = [])
`----
x Assignment to function parameter 'a'
,-[40:1]
,-[43:1]
40 | function f(a, b, c) {
41 | ({ a } = {});
42 | ({ a, b } = {});
@ -114,9 +104,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'b'
,-[40:1]
,-[43:1]
40 | function f(a, b, c) {
41 | ({ a } = {});
42 | ({ a, b } = {});
@ -126,9 +115,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'c'
,-[40:1]
,-[43:1]
40 | function f(a, b, c) {
41 | ({ a } = {});
42 | ({ a, b } = {});
@ -138,9 +126,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'a'
,-[41:1]
,-[44:1]
41 | ({ a } = {});
42 | ({ a, b } = {});
43 | ({ a, b, k: { c } } = {});
@ -149,9 +136,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'a'
,-[42:1]
,-[45:1]
42 | ({ a, b } = {});
43 | ({ a, b, k: { c } } = {});
44 | ([a] = []);
@ -161,9 +147,8 @@
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
`----
x Assignment to function parameter 'b'
,-[42:1]
,-[45:1]
42 | ({ a, b } = {});
43 | ({ a, b, k: { c } } = {});
44 | ([a] = []);
@ -173,9 +158,8 @@
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
`----
x Assignment to function parameter 'a'
,-[46:1]
,-[49:1]
46 | }
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
@ -185,9 +169,8 @@
51 | c = 1;
52 | d = 1;
`----
x Assignment to function parameter 'b'
,-[47:1]
,-[50:1]
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
49 | a = 1;
@ -197,9 +180,8 @@
52 | d = 1;
53 | e = 1;
`----
x Assignment to function parameter 'c'
,-[48:1]
,-[51:1]
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
49 | a = 1;
50 | b = 1;
@ -209,9 +191,8 @@
53 | e = 1;
54 | f = 1;
`----
x Assignment to function parameter 'd'
,-[49:1]
,-[52:1]
49 | a = 1;
50 | b = 1;
51 | c = 1;
@ -221,9 +202,8 @@
54 | f = 1;
55 | g = 1;
`----
x Assignment to function parameter 'e'
,-[50:1]
,-[53:1]
50 | b = 1;
51 | c = 1;
52 | d = 1;
@ -233,9 +213,8 @@
55 | g = 1;
56 | }
`----
x Assignment to function parameter 'f'
,-[51:1]
,-[54:1]
51 | c = 1;
52 | d = 1;
53 | e = 1;
@ -244,9 +223,8 @@
55 | g = 1;
56 | }
`----
x Assignment to function parameter 'g'
,-[52:1]
,-[55:1]
52 | d = 1;
53 | e = 1;
54 | f = 1;

View File

@ -1,6 +1,5 @@
x Assignment to function parameter 'a'
,-[1:1]
,-[2:1]
1 | function f(a) {
2 | a = 1;
: ^
@ -8,9 +7,8 @@
4 |
5 | function f(a) {
`----
x Assignment to function parameter 'a'
,-[4:1]
,-[7:1]
4 |
5 | function f(a) {
6 | function f3() {
@ -19,9 +17,8 @@
8 | }
9 | }
`----
x Assignment to function parameter 'a'
,-[9:1]
,-[12:1]
9 | }
10 |
11 | function f(a) {
@ -31,9 +28,8 @@
14 | (((((((a))))))).prop = 1;
15 | (void 0, a).prop = 1;
`----
x Assignment to function parameter 'a'
,-[10:1]
,-[13:1]
10 |
11 | function f(a) {
12 | a.prop = 1;
@ -43,9 +39,8 @@
15 | (void 0, a).prop = 1;
16 | (a.prop = 1);
`----
x Assignment to function parameter 'a'
,-[11:1]
,-[14:1]
11 | function f(a) {
12 | a.prop = 1;
13 | (a).prop = 1;
@ -55,9 +50,8 @@
16 | (a.prop = 1);
17 | (void 0, a.prop = 1, void 0)
`----
x Assignment to function parameter 'a'
,-[12:1]
,-[15:1]
12 | a.prop = 1;
13 | (a).prop = 1;
14 | (((((((a))))))).prop = 1;
@ -67,9 +61,8 @@
17 | (void 0, a.prop = 1, void 0)
18 | a.prop.b = 1;
`----
x Assignment to function parameter 'a'
,-[13:1]
,-[16:1]
13 | (a).prop = 1;
14 | (((((((a))))))).prop = 1;
15 | (void 0, a).prop = 1;
@ -79,9 +72,8 @@
18 | a.prop.b = 1;
19 | }
`----
x Assignment to function parameter 'a'
,-[14:1]
,-[17:1]
14 | (((((((a))))))).prop = 1;
15 | (void 0, a).prop = 1;
16 | (a.prop = 1);
@ -90,9 +82,8 @@
18 | a.prop.b = 1;
19 | }
`----
x Assignment to function parameter 'a'
,-[15:1]
,-[18:1]
15 | (void 0, a).prop = 1;
16 | (a.prop = 1);
17 | (void 0, a.prop = 1, void 0)
@ -102,9 +93,8 @@
20 |
21 | function f(a) {
`----
x Assignment to function parameter 'a'
,-[19:1]
,-[22:1]
19 | }
20 |
21 | function f(a) {
@ -114,9 +104,8 @@
24 | a.prop++;
25 | ++a.prop;
`----
x Assignment to function parameter 'a'
,-[20:1]
,-[23:1]
20 |
21 | function f(a) {
22 | a++;
@ -126,9 +115,8 @@
25 | ++a.prop;
26 | }
`----
x Assignment to function parameter 'a'
,-[21:1]
,-[24:1]
21 | function f(a) {
22 | a++;
23 | ++a;
@ -137,9 +125,8 @@
25 | ++a.prop;
26 | }
`----
x Assignment to function parameter 'a'
,-[22:1]
,-[25:1]
22 | a++;
23 | ++a;
24 | a.prop++;
@ -149,9 +136,8 @@
27 |
28 | function f(a) {
`----
x Assignment to function parameter 'a'
,-[26:1]
,-[29:1]
26 | }
27 |
28 | function f(a) {
@ -161,9 +147,8 @@
31 |
32 | for (a in []) {}
`----
x Assignment to function parameter 'a'
,-[29:1]
,-[32:1]
29 | for (a of []) {}
30 | for (const a of []) {}
31 |
@ -172,9 +157,8 @@
33 | for (const a in []) {}
34 | }
`----
x Assignment to function parameter 'a'
,-[34:1]
,-[37:1]
34 | }
35 |
36 | function f(a) {
@ -184,9 +168,8 @@
39 |
40 | function f(a, b, c) {
`----
x Assignment to function parameter 'a'
,-[38:1]
,-[41:1]
38 | }
39 |
40 | function f(a, b, c) {
@ -196,9 +179,8 @@
43 | ({ a, b, k: { c } } = {});
44 | ([a] = []);
`----
x Assignment to function parameter 'a'
,-[39:1]
,-[42:1]
39 |
40 | function f(a, b, c) {
41 | ({ a } = {});
@ -208,9 +190,8 @@
44 | ([a] = []);
45 | ([{a}, [b]] = [])
`----
x Assignment to function parameter 'b'
,-[39:1]
,-[42:1]
39 |
40 | function f(a, b, c) {
41 | ({ a } = {});
@ -220,9 +201,8 @@
44 | ([a] = []);
45 | ([{a}, [b]] = [])
`----
x Assignment to function parameter 'a'
,-[40:1]
,-[43:1]
40 | function f(a, b, c) {
41 | ({ a } = {});
42 | ({ a, b } = {});
@ -232,9 +212,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'b'
,-[40:1]
,-[43:1]
40 | function f(a, b, c) {
41 | ({ a } = {});
42 | ({ a, b } = {});
@ -244,9 +223,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'c'
,-[40:1]
,-[43:1]
40 | function f(a, b, c) {
41 | ({ a } = {});
42 | ({ a, b } = {});
@ -256,9 +234,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'a'
,-[41:1]
,-[44:1]
41 | ({ a } = {});
42 | ({ a, b } = {});
43 | ({ a, b, k: { c } } = {});
@ -267,9 +244,8 @@
45 | ([{a}, [b]] = [])
46 | }
`----
x Assignment to function parameter 'a'
,-[42:1]
,-[45:1]
42 | ({ a, b } = {});
43 | ({ a, b, k: { c } } = {});
44 | ([a] = []);
@ -279,9 +255,8 @@
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
`----
x Assignment to function parameter 'b'
,-[42:1]
,-[45:1]
42 | ({ a, b } = {});
43 | ({ a, b, k: { c } } = {});
44 | ([a] = []);
@ -291,9 +266,8 @@
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
`----
x Assignment to function parameter 'a'
,-[46:1]
,-[49:1]
46 | }
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
@ -303,9 +277,8 @@
51 | c = 1;
52 | d = 1;
`----
x Assignment to function parameter 'b'
,-[47:1]
,-[50:1]
47 |
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
49 | a = 1;
@ -315,9 +288,8 @@
52 | d = 1;
53 | e = 1;
`----
x Assignment to function parameter 'c'
,-[48:1]
,-[51:1]
48 | function f(a, { b, k: { c }, k2: [ d ] }, [e, [f], { g }]) {
49 | a = 1;
50 | b = 1;
@ -327,9 +299,8 @@
53 | e = 1;
54 | f = 1;
`----
x Assignment to function parameter 'd'
,-[49:1]
,-[52:1]
49 | a = 1;
50 | b = 1;
51 | c = 1;
@ -339,9 +310,8 @@
54 | f = 1;
55 | g = 1;
`----
x Assignment to function parameter 'e'
,-[50:1]
,-[53:1]
50 | b = 1;
51 | c = 1;
52 | d = 1;
@ -351,9 +321,8 @@
55 | g = 1;
56 | }
`----
x Assignment to function parameter 'f'
,-[51:1]
,-[54:1]
51 | c = 1;
52 | d = 1;
53 | e = 1;
@ -362,9 +331,8 @@
55 | g = 1;
56 | }
`----
x Assignment to function parameter 'g'
,-[52:1]
,-[55:1]
52 | d = 1;
53 | e = 1;
54 | f = 1;

View File

@ -1,4 +1,3 @@
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[1:1]
1 | foo.hasOwnProperty('bar');
@ -6,9 +5,8 @@
2 |
3 | foo.isPrototypeOf('bar');
`----
x Do not access Object.prototype method 'isPrototypeOf' from target object
,-[1:1]
,-[3:1]
1 | foo.hasOwnProperty('bar');
2 |
3 | foo.isPrototypeOf('bar');
@ -16,9 +14,8 @@
4 |
5 | foo.propertyIsEnumerable('bar');
`----
x Do not access Object.prototype method 'propertyIsEnumerable' from target object
,-[2:1]
,-[5:1]
2 |
3 | foo.isPrototypeOf('bar');
4 |
@ -27,9 +24,8 @@
6 |
7 | foo.bar.hasOwnProperty('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[4:1]
,-[7:1]
4 |
5 | foo.propertyIsEnumerable('bar');
6 |
@ -38,9 +34,8 @@
8 |
9 | foo.bar.baz.isPrototypeOf('bar');
`----
x Do not access Object.prototype method 'isPrototypeOf' from target object
,-[6:1]
,-[9:1]
6 |
7 | foo.bar.hasOwnProperty('bar');
8 |
@ -49,9 +44,8 @@
10 |
11 | bar?.foo?.hasOwnProperty('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[8:1]
,-[11:1]
8 |
9 | foo.bar.baz.isPrototypeOf('bar');
10 |
@ -60,9 +54,8 @@
12 |
13 | foo?.bar.hasOwnProperty('baz');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[10:1]
,-[13:1]
10 |
11 | bar?.foo?.hasOwnProperty('bar');
12 |
@ -71,9 +64,8 @@
14 |
15 | foo.hasOwnProperty?.('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[12:1]
,-[15:1]
12 |
13 | foo?.bar.hasOwnProperty('baz');
14 |
@ -82,9 +74,8 @@
16 |
17 | foo?.hasOwnProperty('bar').baz;
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[14:1]
,-[17:1]
14 |
15 | foo.hasOwnProperty?.('bar');
16 |
@ -93,9 +84,8 @@
18 |
19 | foo.hasOwnProperty('bar')?.baz;
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[16:1]
,-[19:1]
16 |
17 | foo?.hasOwnProperty('bar').baz;
18 |
@ -104,9 +94,8 @@
20 |
21 | (a,b).hasOwnProperty('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[18:1]
,-[21:1]
18 |
19 | foo.hasOwnProperty('bar')?.baz;
20 |
@ -115,9 +104,8 @@
22 |
23 | (foo?.hasOwnProperty)('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[20:1]
,-[23:1]
20 |
21 | (a,b).hasOwnProperty('bar');
22 |
@ -126,9 +114,8 @@
24 |
25 | (((foo?.hasOwnProperty)))('dlya-tex-kto-dumaet-cho-on-samiy-umniy');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[22:1]
,-[25:1]
22 |
23 | (foo?.hasOwnProperty)('bar');
24 |
@ -137,9 +124,8 @@
26 |
27 | (foo?.anotherProp, foo?.hasOwnProperty)('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[24:1]
,-[27:1]
24 |
25 | (((foo?.hasOwnProperty)))('dlya-tex-kto-dumaet-cho-on-samiy-umniy');
26 |
@ -148,9 +134,8 @@
28 |
29 | (foo.hasOwnProperty('ok'), foo?.hasOwnProperty)('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[26:1]
,-[29:1]
26 |
27 | (foo?.anotherProp, foo?.hasOwnProperty)('bar');
28 |
@ -159,9 +144,8 @@
30 |
31 | foo['hasOwnProperty']('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[26:1]
,-[29:1]
26 |
27 | (foo?.anotherProp, foo?.hasOwnProperty)('bar');
28 |
@ -170,9 +154,8 @@
30 |
31 | foo['hasOwnProperty']('bar');
`----
x Do not access Object.prototype method 'hasOwnProperty' from target object
,-[28:1]
,-[31:1]
28 |
29 | (foo.hasOwnProperty('ok'), foo?.hasOwnProperty)('bar');
30 |
@ -181,9 +164,8 @@
32 |
33 | foo[`isPrototypeOf`]('bar').baz;
`----
x Do not access Object.prototype method 'isPrototypeOf' from target object
,-[30:1]
,-[33:1]
30 |
31 | foo['hasOwnProperty']('bar');
32 |

View File

@ -1,4 +1,3 @@
x no 'in' expression
,-[1:1]
1 | 'a' in { a: 10 };
@ -7,9 +6,8 @@
3 |
4 | () => {
`----
x no 'in' expression
,-[3:1]
,-[6:1]
3 |
4 | () => {
5 | // nested

View File

@ -1,4 +1,3 @@
x no 'for-in' expression
,----
1 | for (var x in {}) {}

View File

@ -1,4 +1,3 @@
x no 'for-of' expression
,----
1 | for (var x of {}) {}

View File

@ -1,4 +1,3 @@
x no label statement
,-[1:1]
1 | ,-> loop1:

View File

@ -1,4 +1,3 @@
x Unexpected comma in middle of array
,-[1:1]
1 | var a = [,];
@ -7,9 +6,8 @@
3 |
4 | var a = [1, 2,];
`----
x Unexpected comma in middle of array
,-[1:1]
,-[2:1]
1 | var a = [,];
2 | var a = [1, , 2];
: ^^^^^^^^

View File

@ -1,4 +1,3 @@
x Expected an error object to be thrown
,-[1:1]
1 | throw 'error';
@ -7,9 +6,8 @@
3 | throw false;
4 | throw null;
`----
x Expected an error object to be thrown
,-[1:1]
,-[2:1]
1 | throw 'error';
2 | throw 0;
: ^^^^^^^^
@ -17,9 +15,8 @@
4 | throw null;
5 | throw {};
`----
x Expected an error object to be thrown
,-[1:1]
,-[3:1]
1 | throw 'error';
2 | throw 0;
3 | throw false;
@ -28,9 +25,8 @@
5 | throw {};
6 | throw undefined;
`----
x Expected an error object to be thrown
,-[1:1]
,-[4:1]
1 | throw 'error';
2 | throw 0;
3 | throw false;
@ -40,9 +36,8 @@
6 | throw undefined;
7 | throw 'a' + 'b';
`----
x Expected an error object to be thrown
,-[2:1]
,-[5:1]
2 | throw 0;
3 | throw false;
4 | throw null;
@ -52,9 +47,8 @@
7 | throw 'a' + 'b';
8 | var b = new Error(); throw 'a' + b;
`----
x Do not throw undefined
,-[3:1]
,-[6:1]
3 | throw false;
4 | throw null;
5 | throw {};
@ -64,9 +58,8 @@
8 | var b = new Error(); throw 'a' + b;
9 | throw foo = 'error';
`----
x Expected an error object to be thrown
,-[4:1]
,-[7:1]
4 | throw null;
5 | throw {};
6 | throw undefined;
@ -76,9 +69,8 @@
9 | throw foo = 'error';
10 | throw foo += new Error();
`----
x Expected an error object to be thrown
,-[6:1]
,-[9:1]
6 | throw undefined;
7 | throw 'a' + 'b';
8 | var b = new Error(); throw 'a' + b;
@ -88,9 +80,8 @@
11 | throw foo &= new Error();
12 | throw foo &&= 'literal'
`----
x Expected an error object to be thrown
,-[7:1]
,-[10:1]
7 | throw 'a' + 'b';
8 | var b = new Error(); throw 'a' + b;
9 | throw foo = 'error';
@ -100,9 +91,8 @@
12 | throw foo &&= 'literal'
13 | throw new Error(), 1, 2, 3;
`----
x Expected an error object to be thrown
,-[8:1]
,-[11:1]
8 | var b = new Error(); throw 'a' + b;
9 | throw foo = 'error';
10 | throw foo += new Error();
@ -112,9 +102,8 @@
13 | throw new Error(), 1, 2, 3;
14 | throw 'literal' && 'not an Error';
`----
x Expected an error object to be thrown
,-[9:1]
,-[12:1]
9 | throw foo = 'error';
10 | throw foo += new Error();
11 | throw foo &= new Error();
@ -124,9 +113,8 @@
14 | throw 'literal' && 'not an Error';
15 | throw foo && 'literal'
`----
x Expected an error object to be thrown
,-[10:1]
,-[13:1]
10 | throw foo += new Error();
11 | throw foo &= new Error();
12 | throw foo &&= 'literal'
@ -136,9 +124,8 @@
15 | throw foo && 'literal'
16 | throw foo ? 'not an Error' : 'literal';
`----
x Expected an error object to be thrown
,-[11:1]
,-[14:1]
11 | throw foo &= new Error();
12 | throw foo &&= 'literal'
13 | throw new Error(), 1, 2, 3;
@ -148,9 +135,8 @@
16 | throw foo ? 'not an Error' : 'literal';
17 | throw `${err}`;
`----
x Expected an error object to be thrown
,-[12:1]
,-[15:1]
12 | throw foo &&= 'literal'
13 | throw new Error(), 1, 2, 3;
14 | throw 'literal' && 'not an Error';
@ -159,9 +145,8 @@
16 | throw foo ? 'not an Error' : 'literal';
17 | throw `${err}`;
`----
x Expected an error object to be thrown
,-[13:1]
,-[16:1]
13 | throw new Error(), 1, 2, 3;
14 | throw 'literal' && 'not an Error';
15 | throw foo && 'literal'
@ -171,9 +156,8 @@
18 |
19 | // valid
`----
x Expected an error object to be thrown
,-[14:1]
,-[17:1]
14 | throw 'literal' && 'not an Error';
15 | throw foo && 'literal'
16 | throw foo ? 'not an Error' : 'literal';

View File

@ -1,4 +1,3 @@
x 'C' was used before it was defined
,-[1:1]
1 | new C();

View File

@ -1,6 +1,5 @@
x 'a' was used before it was defined
,-[7:1]
,-[10:1]
7 |
8 |
9 | // required to got error from test

View File

@ -1,4 +1,3 @@
x 'foo' was used before it was defined
,-[1:1]
1 | foo();

View File

@ -1,4 +1,3 @@
x 'a' was used before it was defined
,-[1:1]
1 | alert(a);
@ -6,9 +5,8 @@
2 |
3 | console.log(a);
`----
x 'a' was used before it was defined
,-[1:1]
,-[3:1]
1 | alert(a);
2 |
3 | console.log(a);
@ -17,9 +15,8 @@
5 | function f1() {
6 | alert(a);
`----
x 'a' was used before it was defined
,-[6:1]
,-[9:1]
6 | alert(a);
7 | }
8 |
@ -28,9 +25,8 @@
10 |
11 | `${a}`;
`----
x 'a' was used before it was defined
,-[8:1]
,-[11:1]
8 |
9 | obj[a];
10 |
@ -39,9 +35,8 @@
12 |
13 | [a];
`----
x 'a' was used before it was defined
,-[10:1]
,-[13:1]
10 |
11 | `${a}`;
12 |
@ -50,9 +45,8 @@
14 |
15 | var x = a + "";
`----
x 'a' was used before it was defined
,-[12:1]
,-[15:1]
12 |
13 | [a];
14 |
@ -62,9 +56,8 @@
17 | var e = {
18 | [a]: "",
`----
x 'a' was used before it was defined
,-[15:1]
,-[18:1]
15 | var x = a + "";
16 |
17 | var e = {
@ -74,9 +67,8 @@
20 |
21 | const a = {};
`----
x 'b' was used before it was defined
,-[22:1]
,-[25:1]
22 |
23 | // ----
24 | function f2() {
@ -85,9 +77,8 @@
26 | const b = {};
27 | }
`----
x 'a1' was used before it was defined
,-[27:1]
,-[30:1]
27 | }
28 |
29 | // ----
@ -96,9 +87,8 @@
31 |
32 | const { a1, a2 } = {};
`----
x 'a3' was used before it was defined
,-[34:1]
,-[37:1]
34 | console.log(a2);
35 |
36 | // ----
@ -107,9 +97,8 @@
38 |
39 | const { a3 = "a" } = {};
`----
x 'a4' was used before it was defined
,-[39:1]
,-[42:1]
39 | const { a3 = "a" } = {};
40 |
41 | // ----
@ -119,9 +108,8 @@
44 | const {
45 | n: { a4 },
`----
x 'a5' was used before it was defined
,-[46:1]
,-[49:1]
46 | } = {};
47 |
48 | // ----
@ -130,9 +118,8 @@
50 |
51 | const { ...a5 } = {};
`----
x 'a6' was used before it was defined
,-[51:1]
,-[54:1]
51 | const { ...a5 } = {};
52 |
53 | // ----
@ -141,9 +128,8 @@
55 |
56 | const [a6] = {};
`----
x 'a7' was used before it was defined
,-[56:1]
,-[59:1]
56 | const [a6] = {};
57 |
58 | // ----

View File

@ -1,4 +1,3 @@
x 'a' was used before it was defined
,-[1:1]
1 | alert(a);

View File

@ -1,4 +1,3 @@
x Unexpected var, use let or const instead
,-[1:1]
1 | var a = 1;

View File

@ -1,15 +1,13 @@
x 'x1' is never reassigned. Use 'const' insted
,-[1:1]
,-[2:1]
1 | () => {
2 | let x1 = 1;
: ^^
3 | foo(x1);
4 | };
`----
x 'i' is never reassigned. Use 'const' insted
,-[4:1]
,-[7:1]
4 | };
5 |
6 | () => {
@ -19,9 +17,8 @@
9 | }
10 | }
`----
x 'x2' is never reassigned. Use 'const' insted
,-[10:1]
,-[13:1]
10 | }
11 |
12 | () => {
@ -30,9 +27,8 @@
14 | y2 = 0;
15 | }
`----
x 'x3' is never reassigned. Use 'const' insted
,-[15:1]
,-[18:1]
15 | }
16 |
17 | () => {
@ -41,9 +37,8 @@
19 | y3 = 0;
20 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[20:1]
,-[23:1]
20 | }
21 |
22 |
@ -52,9 +47,8 @@
24 |
25 | (function () { for (let i in [1, 2, 3]) { foo(i); } })();
`----
x 'i' is never reassigned. Use 'const' insted
,-[22:1]
,-[25:1]
22 |
23 | (function () { let x = 1; foo(x); })();
24 |
@ -63,9 +57,8 @@
26 |
27 | (function () { for (let x of [1, 2, 3]) { foo(x); } })();
`----
x 'x' is never reassigned. Use 'const' insted
,-[24:1]
,-[27:1]
24 |
25 | (function () { for (let i in [1, 2, 3]) { foo(i); } })();
26 |
@ -74,9 +67,8 @@
28 |
29 | (function () { let [x = -1, y] = [1, 2]; y = 0; })();
`----
x 'x' is never reassigned. Use 'const' insted
,-[26:1]
,-[29:1]
26 |
27 | (function () { for (let x of [1, 2, 3]) { foo(x); } })();
28 |
@ -86,9 +78,8 @@
31 | () => {
32 | let f = (function () { let g = x; })();
`----
x 'g' is never reassigned. Use 'const' insted
,-[29:1]
,-[32:1]
29 | (function () { let [x = -1, y] = [1, 2]; y = 0; })();
30 |
31 | () => {
@ -97,9 +88,8 @@
33 | f = 1;
34 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[33:1]
,-[36:1]
33 | f = 1;
34 | }
35 |
@ -109,9 +99,8 @@
38 | () => {
39 | let x = 0;
`----
x 'x' is never reassigned. Use 'const' insted
,-[37:1]
,-[40:1]
37 |
38 | () => {
39 | let x = 0;
@ -120,9 +109,8 @@
41 | x = 0;
42 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[42:1]
,-[45:1]
42 | }
43 |
44 | () => {
@ -132,9 +120,8 @@
47 |
48 | () => {
`----
x 'i' is never reassigned. Use 'const' insted
,-[46:1]
,-[49:1]
46 | }
47 |
48 | () => {
@ -144,9 +131,8 @@
51 |
52 | () => {
`----
x 'x' is never reassigned. Use 'const' insted
,-[46:1]
,-[49:1]
46 | }
47 |
48 | () => {
@ -156,9 +142,8 @@
51 |
52 | () => {
`----
x 'l' is never reassigned. Use 'const' insted
,-[52:1]
,-[55:1]
52 | () => {
53 | var foo = function () {
54 | for (const b5 of c5) {
@ -168,9 +153,8 @@
57 | }
58 | };
`----
x 'a' is never reassigned. Use 'const' insted
,-[62:1]
,-[65:1]
62 | var foo = function () {
63 | for (const b of c) {
64 | let a;
@ -180,9 +164,8 @@
67 | };
68 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[68:1]
,-[71:1]
68 | }
69 |
70 | () => {
@ -191,9 +174,8 @@
72 | x = 0;
73 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[73:1]
,-[76:1]
73 | }
74 |
75 | () => {
@ -203,9 +185,8 @@
78 |
79 | (function () { let x; x = 1; })();
`----
x 'x' is never reassigned. Use 'const' insted
,-[76:1]
,-[79:1]
76 | switch (a) { case 0: let x; x = 0; }
77 | }
78 |
@ -215,9 +196,8 @@
81 | () => {
82 | let { a = 0, b } = obj; b = 0; foo(a, b);
`----
x 'a' is never reassigned. Use 'const' insted
,-[79:1]
,-[82:1]
79 | (function () { let x; x = 1; })();
80 |
81 | () => {
@ -227,9 +207,8 @@
84 |
85 | () => {
`----
x 'c' is never reassigned. Use 'const' insted
,-[83:1]
,-[86:1]
83 | }
84 |
85 | () => {
@ -239,9 +218,8 @@
88 |
89 | () => {
`----
x 'b' is never reassigned. Use 'const' insted
,-[87:1]
,-[90:1]
87 | }
88 |
89 | () => {
@ -251,9 +229,8 @@
92 |
93 | () => {
`----
x 'c' is never reassigned. Use 'const' insted
,-[87:1]
,-[90:1]
87 | }
88 |
89 | () => {
@ -263,9 +240,8 @@
92 |
93 | () => {
`----
x 'a' is never reassigned. Use 'const' insted
,-[91:1]
,-[94:1]
91 | }
92 |
93 | () => {
@ -275,9 +251,8 @@
96 |
97 | () => {
`----
x 'predicate' is never reassigned. Use 'const' insted
,-[96:1]
,-[99:1]
96 |
97 | () => {
98 | let predicate;
@ -287,9 +262,8 @@
101 |
102 | () => {
`----
x 'x' is never reassigned. Use 'const' insted
,-[100:1]
,-[103:1]
100 | }
101 |
102 | () => {
@ -298,9 +272,8 @@
104 | }
105 |
`----
x 'y' is never reassigned. Use 'const' insted
,-[100:1]
,-[103:1]
100 | }
101 |
102 | () => {
@ -309,9 +282,8 @@
104 | }
105 |
`----
x 'timer' is never reassigned. Use 'const' insted
,-[104:1]
,-[107:1]
104 | }
105 |
106 |
@ -321,9 +293,8 @@
109 | if (foo()) {
110 | clearInterval(timer);
`----
x 'rest' is never reassigned. Use 'const' insted
,-[114:1]
,-[117:1]
114 |
115 |
116 | () => {

View File

@ -1,15 +1,13 @@
x 'x1' is never reassigned. Use 'const' insted
,-[1:1]
,-[2:1]
1 | () => {
2 | let x1 = 1;
: ^^
3 | foo(x1);
4 | };
`----
x 'i' is never reassigned. Use 'const' insted
,-[4:1]
,-[7:1]
4 | };
5 |
6 | () => {
@ -19,9 +17,8 @@
9 | }
10 | }
`----
x 'x2' is never reassigned. Use 'const' insted
,-[10:1]
,-[13:1]
10 | }
11 |
12 | () => {
@ -30,9 +27,8 @@
14 | y2 = 0;
15 | }
`----
x 'x3' is never reassigned. Use 'const' insted
,-[15:1]
,-[18:1]
15 | }
16 |
17 | () => {
@ -41,9 +37,8 @@
19 | y3 = 0;
20 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[19:1]
,-[22:1]
19 | y3 = 0;
20 | }
21 |
@ -52,9 +47,8 @@
23 |
24 | (function () { for (let i in [1, 2, 3]) { foo(i); } })();
`----
x 'i' is never reassigned. Use 'const' insted
,-[21:1]
,-[24:1]
21 |
22 | (function () { let x = 1; foo(x); })();
23 |
@ -63,9 +57,8 @@
25 |
26 | (function () { for (let x of [1, 2, 3]) { foo(x); } })();
`----
x 'x' is never reassigned. Use 'const' insted
,-[23:1]
,-[26:1]
23 |
24 | (function () { for (let i in [1, 2, 3]) { foo(i); } })();
25 |
@ -74,9 +67,8 @@
27 |
28 | (function () { let [x = -1, y] = [1, 2]; y = 0; })();
`----
x 'x' is never reassigned. Use 'const' insted
,-[25:1]
,-[28:1]
25 |
26 | (function () { for (let x of [1, 2, 3]) { foo(x); } })();
27 |
@ -86,9 +78,8 @@
30 | () => {
31 | let f = (function () { let g = x; })();
`----
x 'g' is never reassigned. Use 'const' insted
,-[28:1]
,-[31:1]
28 | (function () { let [x = -1, y] = [1, 2]; y = 0; })();
29 |
30 | () => {
@ -97,9 +88,8 @@
32 | f = 1;
33 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[32:1]
,-[35:1]
32 | f = 1;
33 | }
34 |
@ -109,9 +99,8 @@
37 | () => {
38 | let x = 0;
`----
x 'x' is never reassigned. Use 'const' insted
,-[36:1]
,-[39:1]
36 |
37 | () => {
38 | let x = 0;
@ -120,9 +109,8 @@
40 | x = 0;
41 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[41:1]
,-[44:1]
41 | }
42 |
43 | () => {
@ -132,9 +120,8 @@
46 |
47 | () => {
`----
x 'i' is never reassigned. Use 'const' insted
,-[45:1]
,-[48:1]
45 | }
46 |
47 | () => {
@ -144,9 +131,8 @@
50 |
51 | () => {
`----
x 'x' is never reassigned. Use 'const' insted
,-[45:1]
,-[48:1]
45 | }
46 |
47 | () => {
@ -156,9 +142,8 @@
50 |
51 | () => {
`----
x 'l' is never reassigned. Use 'const' insted
,-[51:1]
,-[54:1]
51 | () => {
52 | var foo = function () {
53 | for (const b5 of c5) {
@ -168,9 +153,8 @@
56 | }
57 | };
`----
x 'a' is never reassigned. Use 'const' insted
,-[61:1]
,-[64:1]
61 | var foo = function () {
62 | for (const b of c) {
63 | let a;
@ -180,9 +164,8 @@
66 | };
67 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[67:1]
,-[70:1]
67 | }
68 |
69 | () => {
@ -191,9 +174,8 @@
71 | x = 0;
72 | }
`----
x 'x' is never reassigned. Use 'const' insted
,-[72:1]
,-[75:1]
72 | }
73 |
74 | () => {
@ -203,9 +185,8 @@
77 |
78 | (function () { let x; x = 1; })();
`----
x 'x' is never reassigned. Use 'const' insted
,-[75:1]
,-[78:1]
75 | switch (a) { case 0: let x; x = 0; }
76 | }
77 |
@ -215,9 +196,8 @@
80 | () => {
81 | let { a = 0, b } = obj; b = 0; foo(a, b);
`----
x 'a' is never reassigned. Use 'const' insted
,-[78:1]
,-[81:1]
78 | (function () { let x; x = 1; })();
79 |
80 | () => {
@ -227,9 +207,8 @@
83 |
84 | () => {
`----
x 'c' is never reassigned. Use 'const' insted
,-[82:1]
,-[85:1]
82 | }
83 |
84 | () => {
@ -239,9 +218,8 @@
87 |
88 | () => {
`----
x 'b' is never reassigned. Use 'const' insted
,-[86:1]
,-[89:1]
86 | }
87 |
88 | () => {
@ -251,9 +229,8 @@
91 |
92 | () => {
`----
x 'c' is never reassigned. Use 'const' insted
,-[86:1]
,-[89:1]
86 | }
87 |
88 | () => {
@ -263,9 +240,8 @@
91 |
92 | () => {
`----
x 'a' is never reassigned. Use 'const' insted
,-[90:1]
,-[93:1]
90 | }
91 |
92 | () => {
@ -275,9 +251,8 @@
95 |
96 | () => {
`----
x 'predicate' is never reassigned. Use 'const' insted
,-[95:1]
,-[98:1]
95 |
96 | () => {
97 | let predicate;
@ -287,9 +262,8 @@
100 |
101 | () => {
`----
x 'x' is never reassigned. Use 'const' insted
,-[99:1]
,-[102:1]
99 | }
100 |
101 | () => {
@ -298,9 +272,8 @@
103 | }
104 |
`----
x 'y' is never reassigned. Use 'const' insted
,-[99:1]
,-[102:1]
99 | }
100 |
101 | () => {
@ -309,9 +282,8 @@
103 | }
104 |
`----
x 'rest' is never reassigned. Use 'const' insted
,-[113:1]
,-[116:1]
113 |
114 |
115 | () => {

View File

@ -1,4 +1,3 @@
x "Use an object spread instead of `Object.assign` eg: `{ ...foo }`"
,-[1:1]
1 | Object.assign({}, foo);
@ -6,9 +5,8 @@
2 |
3 | Object.assign({}, { foo: 'bar' });
`----
x "Use an object spread instead of `Object.assign` eg: `{ ...foo }`"
,-[1:1]
,-[3:1]
1 | Object.assign({}, foo);
2 |
3 | Object.assign({}, { foo: 'bar' });
@ -16,9 +14,8 @@
4 |
5 | Object.assign({}, baz, { foo: 'bar' });
`----
x "Use an object spread instead of `Object.assign` eg: `{ ...foo }`"
,-[2:1]
,-[5:1]
2 |
3 | Object.assign({}, { foo: 'bar' });
4 |
@ -27,9 +24,8 @@
6 |
7 | Object.assign({}, { foo: 'bar', baz: 'foo' });
`----
x "Use an object spread instead of `Object.assign` eg: `{ ...foo }`"
,-[4:1]
,-[7:1]
4 |
5 | Object.assign({}, baz, { foo: 'bar' });
6 |
@ -38,9 +34,8 @@
8 |
9 | Object.assign({ foo: 'bar' }, Object.assign({ bar: 'foo' }, baz))
`----
x "Use an object spread instead of `Object.assign` eg: `{ ...foo }`"
,-[6:1]
,-[9:1]
6 |
7 | Object.assign({}, { foo: 'bar', baz: 'foo' });
8 |
@ -49,9 +44,8 @@
10 |
11 | Object.assign({});
`----
x "Use an object spread instead of `Object.assign` eg: `{ ...foo }`"
,-[6:1]
,-[9:1]
6 |
7 | Object.assign({}, { foo: 'bar', baz: 'foo' });
8 |
@ -60,9 +54,8 @@
10 |
11 | Object.assign({});
`----
x "Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`"
,-[8:1]
,-[11:1]
8 |
9 | Object.assign({ foo: 'bar' }, Object.assign({ bar: 'foo' }, baz))
10 |
@ -71,9 +64,8 @@
12 |
13 | Object['assign']({});
`----
x "Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`"
,-[10:1]
,-[13:1]
10 |
11 | Object.assign({});
12 |
@ -82,9 +74,8 @@
14 |
15 | Object[`assign`]({});
`----
x "Use an object literal instead of `Object.assign`. eg: `{ foo: bar }`"
,-[12:1]
,-[15:1]
12 |
13 | Object['assign']({});
14 |

View File

@ -1,4 +1,3 @@
x Regular expression literal is unnecessarily wrapped within a 'RegExp' constructor
,-[1:1]
1 | new RegExp(/redundant/);
@ -6,9 +5,8 @@
2 |
3 | new RegExp(/redundant/, "g");
`----
x Use regular expression literal with flags instead of the 'RegExp' constructor
,-[1:1]
,-[3:1]
1 | new RegExp(/redundant/);
2 |
3 | new RegExp(/redundant/, "g");

View File

@ -1,4 +1,3 @@
x Use a regular expression literal instead of the 'RegExp' constructor
,-[1:1]
1 | new globalThis.RegExp("a", "b");
@ -6,17 +5,15 @@
2 | new globalThis["RegExp"]("a", "b");
3 | globalThis.RegExp("a", "b");
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[1:1]
,-[2:1]
1 | new globalThis.RegExp("a", "b");
2 | new globalThis["RegExp"]("a", "b");
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3 | globalThis.RegExp("a", "b");
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[1:1]
,-[3:1]
1 | new globalThis.RegExp("a", "b");
2 | new globalThis["RegExp"]("a", "b");
3 | globalThis.RegExp("a", "b");

View File

@ -1,4 +1,3 @@
x Use a regular expression literal instead of the 'RegExp' constructor
,-[1:1]
1 | new RegExp("abc");
@ -7,9 +6,8 @@
3 | RegExp("abc");
4 | RegExp("abc", "u");
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[1:1]
,-[2:1]
1 | new RegExp("abc");
2 | new RegExp("abc", "u");
: ^^^^^^^^^^^^^^^^^^^^^^
@ -17,9 +15,8 @@
4 | RegExp("abc", "u");
5 | new RegExp("\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d");
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[1:1]
,-[3:1]
1 | new RegExp("abc");
2 | new RegExp("abc", "u");
3 | RegExp("abc");
@ -28,9 +25,8 @@
5 | new RegExp("\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d");
6 | RegExp(`^\\d\\.$`);
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[1:1]
,-[4:1]
1 | new RegExp("abc");
2 | new RegExp("abc", "u");
3 | RegExp("abc");
@ -40,9 +36,8 @@
6 | RegExp(`^\\d\\.$`);
7 | new RegExp(String.raw`^\d\.$`);
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[2:1]
,-[5:1]
2 | new RegExp("abc", "u");
3 | RegExp("abc");
4 | RegExp("abc", "u");
@ -52,9 +47,8 @@
7 | new RegExp(String.raw`^\d\.$`);
8 | /abc/;
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[3:1]
,-[6:1]
3 | RegExp("abc");
4 | RegExp("abc", "u");
5 | new RegExp("\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d");
@ -64,9 +58,8 @@
8 | /abc/;
9 | /abc/u;
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[4:1]
,-[7:1]
4 | RegExp("abc", "u");
5 | new RegExp("\\d\\d\\.\\d\\d\\.\\d\\d\\d\\d");
6 | RegExp(`^\\d\\.$`);
@ -76,9 +69,8 @@
9 | /abc/u;
10 | /\d\d\.\d\d\.\d\d\d\d/;
`----
x Use a regular expression literal instead of the 'RegExp' constructor
,-[35:1]
,-[38:1]
35 | })("a", "b");
36 |
37 | foo(() => {

View File

@ -1,4 +1,3 @@
x String must use doublequotes
,-[1:1]
1 | var s = `template string`;
@ -7,9 +6,8 @@
3 | var s = `now is ${new Date()}`;
4 | // prettier-ignore
`----
x String must use doublequotes
,-[1:1]
,-[2:1]
1 | var s = `template string`;
2 | var s = `template string with "escape"`;
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -17,9 +15,8 @@
4 | // prettier-ignore
5 | var s = 'single quotes string';
`----
x String must use doublequotes
,-[2:1]
,-[5:1]
2 | var s = `template string with "escape"`;
3 | var s = `now is ${new Date()}`;
4 | // prettier-ignore
@ -29,9 +26,8 @@
7 | var s = 'single quotes string with "escape"';
8 | var s = "double quotes string";
`----
x String must use doublequotes
,-[4:1]
,-[7:1]
4 | // prettier-ignore
5 | var s = 'single quotes string';
6 | // prettier-ignore

View File

@ -1,4 +1,3 @@
x String must use backtick quotes
,-[1:1]
1 | var s = "double quotes string";

View File

@ -1,4 +1,3 @@
x String must use singlequotes
,-[1:1]
1 | var s = `template string`;
@ -7,9 +6,8 @@
3 | var s = `now is ${new Date()}`;
4 | // prettier-ignore
`----
x String must use singlequotes
,-[1:1]
,-[2:1]
1 | var s = `template string`;
2 | var s = `template string with "escape"`;
: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -17,9 +15,8 @@
4 | // prettier-ignore
5 | var s = 'single quotes string';
`----
x String must use singlequotes
,-[5:1]
,-[8:1]
5 | var s = 'single quotes string';
6 | // prettier-ignore
7 | var s = 'single quotes string with "escape"';

View File

@ -1,6 +1,5 @@
x String must use backtick quotes
,-[1:1]
,-[2:1]
1 | "use strict";
2 | var v = "use strict";
: ^^^^^^^^^^^^
@ -8,9 +7,8 @@
4 |
5 | // valid cases
`----
x String must use backtick quotes
,-[1:1]
,-[3:1]
1 | "use strict";
2 | var v = "use strict";
3 | var s = "double quotes string";

View File

@ -1,6 +1,5 @@
x String must use doublequotes
,-[1:1]
,-[2:1]
1 | // prettier-ignore
2 | var s = 'double quotes string';
: ^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,4 +1,3 @@
x String must use singlequotes
,-[1:1]
1 | var s = "double quotes string";
@ -6,9 +5,8 @@
2 |
3 | // valid cases
`----
x String must use singlequotes
,-[22:1]
,-[25:1]
22 | var foo = `bar 'foo' baz` + 'bar';
23 | var foo = `back${x}tick`;
24 | var foo = tag`backtick`;

View File

@ -1,6 +1,5 @@
x Invalid radix parameter, must be an integer between 2 and 36
,-[11:1]
,-[14:1]
11 | Number['parseInt']("12");
12 |
13 | // invalid radix param
@ -10,9 +9,8 @@
16 | // invalid radix param
17 | parseInt("12", 37);
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[14:1]
,-[17:1]
14 | parseInt("12", 1);
15 |
16 | // invalid radix param
@ -22,9 +20,8 @@
19 | // Missing params
20 | parseInt();
`----
x Missing parameters
,-[17:1]
,-[20:1]
17 | parseInt("12", 37);
18 |
19 | // Missing params
@ -34,9 +31,8 @@
22 | // redundant radix
23 | parseInt("12", 10);
`----
x Redundant radix parameter
,-[20:1]
,-[23:1]
20 | parseInt();
21 |
22 | // redundant radix

View File

@ -1,27 +1,24 @@
x Missing radix parameter
,-[1:1]
1 | // requires add radix equals 10
2 | parseInt("12");
: ^^^^^^^^^^^^^^
3 |
4 | // requires add radix equals 10
5 | Number.parseInt("12");
`----
Error:
> Add radix parameter `10` for parsing decimal numbers
,-[1:1]
1 | // requires add radix equals 10
2 | parseInt("12");
: ^^^^^^^^^^^^^^
3 |
4 | // requires add radix equals 10
5 | Number.parseInt("12");
`----
x Missing radix parameter
,-[2:1]
1 | // requires add radix equals 10
2 | parseInt("12");
: ^^^^^^^^^^^^^^
3 |
4 | // requires add radix equals 10
5 | Number.parseInt("12");
`----
Advice: > Add radix parameter `10` for parsing decimal numbers
,-[2:1]
1 | // requires add radix equals 10
2 | parseInt("12");
: ^^^^^^^^^^^^^^
3 |
4 | // requires add radix equals 10
5 | Number.parseInt("12");
`----
x Missing radix parameter
,-[5:1]
2 | parseInt("12");
3 |
4 | // requires add radix equals 10
@ -32,9 +29,8 @@ Error:
8 | globalThis.parseInt("12");
`----
Error:
> Add radix parameter `10` for parsing decimal numbers
,-[2:1]
Advice: > Add radix parameter `10` for parsing decimal numbers
,-[5:1]
2 | parseInt("12");
3 |
4 | // requires add radix equals 10
@ -44,9 +40,8 @@ Error:
7 | // requires add radix equals 10
8 | globalThis.parseInt("12");
`----
x Missing radix parameter
,-[5:1]
,-[8:1]
5 | Number.parseInt("12");
6 |
7 | // requires add radix equals 10
@ -57,9 +52,8 @@ Error:
11 | Number['parseInt']("12");
`----
Error:
> Add radix parameter `10` for parsing decimal numbers
,-[5:1]
Advice: > Add radix parameter `10` for parsing decimal numbers
,-[8:1]
5 | Number.parseInt("12");
6 |
7 | // requires add radix equals 10
@ -69,34 +63,31 @@ Error:
10 | // requires add radix equals 10
11 | Number['parseInt']("12");
`----
x Missing radix parameter
,-[8:1]
8 | globalThis.parseInt("12");
9 |
10 | // requires add radix equals 10
11 | Number['parseInt']("12");
: ^^^^^^^^^^^^^^^^^^^^^^^^
12 |
13 | // invalid radix param
14 | parseInt("12", 1);
`----
Error:
> Add radix parameter `10` for parsing decimal numbers
,-[8:1]
8 | globalThis.parseInt("12");
9 |
10 | // requires add radix equals 10
11 | Number['parseInt']("12");
: ^^^^^^^^^^^^^^^^^^^^^^^^
12 |
13 | // invalid radix param
14 | parseInt("12", 1);
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[11:1]
8 | globalThis.parseInt("12");
9 |
10 | // requires add radix equals 10
11 | Number['parseInt']("12");
: ^^^^^^^^^^^^^^^^^^^^^^^^
12 |
13 | // invalid radix param
14 | parseInt("12", 1);
`----
Advice: > Add radix parameter `10` for parsing decimal numbers
,-[11:1]
8 | globalThis.parseInt("12");
9 |
10 | // requires add radix equals 10
11 | Number['parseInt']("12");
: ^^^^^^^^^^^^^^^^^^^^^^^^
12 |
13 | // invalid radix param
14 | parseInt("12", 1);
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[14:1]
11 | Number['parseInt']("12");
12 |
13 | // invalid radix param
@ -106,9 +97,8 @@ Error:
16 | // invalid radix param
17 | parseInt("12", 37);
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[14:1]
,-[17:1]
14 | parseInt("12", 1);
15 |
16 | // invalid radix param
@ -118,9 +108,8 @@ Error:
19 | // Missing params
20 | parseInt();
`----
x Missing parameters
,-[17:1]
,-[20:1]
17 | parseInt("12", 37);
18 |
19 | // Missing params
@ -130,9 +119,8 @@ Error:
22 | // requires add radix equals 10
23 | parseInt("12", "abc");
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[20:1]
,-[23:1]
20 | parseInt();
21 |
22 | // requires add radix equals 10
@ -142,9 +130,8 @@ Error:
25 | // no reports required
26 | parseInt("12", 10);
`----
x Missing radix parameter
,-[33:1]
,-[36:1]
33 |
34 | // requires add radix equals 10
35 | function foo1() {
@ -155,9 +142,8 @@ Error:
39 | // requires add radix equals 10
`----
Error:
> Add radix parameter `10` for parsing decimal numbers
,-[33:1]
Advice: > Add radix parameter `10` for parsing decimal numbers
,-[36:1]
33 |
34 | // requires add radix equals 10
35 | function foo1() {
@ -167,9 +153,8 @@ Error:
38 |
39 | // requires add radix equals 10
`----
x Missing radix parameter
,-[37:1]
,-[40:1]
37 | }
38 |
39 | // requires add radix equals 10
@ -180,9 +165,8 @@ Error:
43 | globalThis?.parseInt("12");
`----
Error:
> Add radix parameter `10` for parsing decimal numbers
,-[37:1]
Advice: > Add radix parameter `10` for parsing decimal numbers
,-[40:1]
37 | }
38 |
39 | // requires add radix equals 10
@ -192,9 +176,8 @@ Error:
42 | // requires add radix equals 10
43 | globalThis?.parseInt("12");
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[43:1]
,-[46:1]
43 | globalThis?.parseInt("12");
44 |
45 | // requires add radix equals 10
@ -204,9 +187,8 @@ Error:
48 | // no reports required
49 | parseInt("12", (3));
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[49:1]
,-[52:1]
49 | parseInt("12", (3));
50 |
51 | // requires add radix equals 10
@ -216,9 +198,8 @@ Error:
54 | // requires add radix equals 10
55 | parseInt(`12`, `10`);
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[52:1]
,-[55:1]
52 | parseInt("12", 2.4);
53 |
54 | // requires add radix equals 10
@ -228,9 +209,8 @@ Error:
57 | // requires add radix equals 10
58 | console.log(parseInt('10', '10'));
`----
x Invalid radix parameter, must be an integer between 2 and 36
,-[55:1]
,-[58:1]
55 | parseInt(`12`, `10`);
56 |
57 | // requires add radix equals 10

View File

@ -1,4 +1,3 @@
x Expected Symbol to have a description
,-[1:1]
1 | Symbol()

View File

@ -1,4 +1,3 @@
x Expected Symbol to have a description
,-[1:1]
1 | Symbol()
@ -7,18 +6,16 @@
3 | foo(() => Symbol())
4 | Symbol('name')
`----
x Symbol description should be a string
,-[1:1]
,-[2:1]
1 | Symbol()
2 | Symbol({})
: ^^^^^^^^^^
3 | foo(() => Symbol())
4 | Symbol('name')
`----
x Expected Symbol to have a description
,-[1:1]
,-[3:1]
1 | Symbol()
2 | Symbol({})
3 | foo(() => Symbol())

View File

@ -1,4 +1,3 @@
x Use the isNaN function to compare with NaN
,-[1:1]
1 | if (foo == NaN) {}
@ -8,9 +7,8 @@
3 | if (NaN == foo) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[1:1]
,-[3:1]
1 | if (foo == NaN) {}
2 |
3 | if (NaN == foo) {}
@ -20,9 +18,8 @@
5 | if (foo != NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[2:1]
,-[5:1]
2 |
3 | if (NaN == foo) {}
4 |
@ -33,9 +30,8 @@
7 | if (foo == Number.NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[4:1]
,-[7:1]
4 |
5 | if (foo != NaN) {}
6 |
@ -46,9 +42,8 @@
9 | if (foo != Number.NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[6:1]
,-[9:1]
6 |
7 | if (foo == Number.NaN) {}
8 |
@ -59,9 +54,8 @@
11 | if (foo == Number['NaN']) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[8:1]
,-[11:1]
8 |
9 | if (foo != Number.NaN) {}
10 |
@ -72,9 +66,8 @@
13 | if (foo === NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[17:1]
,-[20:1]
17 | if (foo == Obj.NaN) {}
18 |
19 |
@ -85,9 +78,8 @@
22 | myArray.lastIndexOf(NaN);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[19:1]
,-[22:1]
19 |
20 | myArray.indexOf(NaN);
21 |
@ -98,9 +90,8 @@
24 | myArray.lastIndexOf(Number.NaN);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[21:1]
,-[24:1]
21 |
22 | myArray.lastIndexOf(NaN);
23 |
@ -111,9 +102,8 @@
26 | myArray.lastIndexOf(Number['NaN']);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[23:1]
,-[26:1]
23 |
24 | myArray.lastIndexOf(Number.NaN);
25 |
@ -124,9 +114,8 @@
28 | myArray.lastIndexOf(NoN);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[30:1]
,-[33:1]
30 | myArray.lastIndexOf(1);
31 |
32 | switch (foo) {
@ -138,9 +127,8 @@
36 | case 1:
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[38:1]
,-[41:1]
38 | break;
39 | }
40 |

View File

@ -1,4 +1,3 @@
x Use the isNaN function to compare with NaN
,-[1:1]
1 | if (foo == NaN) {}
@ -8,9 +7,8 @@
3 | if (NaN == foo) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[1:1]
,-[3:1]
1 | if (foo == NaN) {}
2 |
3 | if (NaN == foo) {}
@ -20,9 +18,8 @@
5 | if (foo != NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[2:1]
,-[5:1]
2 |
3 | if (NaN == foo) {}
4 |
@ -33,9 +30,8 @@
7 | if (foo == Number.NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[4:1]
,-[7:1]
4 |
5 | if (foo != NaN) {}
6 |
@ -46,9 +42,8 @@
9 | if (foo != Number.NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[6:1]
,-[9:1]
6 |
7 | if (foo == Number.NaN) {}
8 |
@ -59,9 +54,8 @@
11 | if (foo == Number['NaN']) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[8:1]
,-[11:1]
8 |
9 | if (foo != Number.NaN) {}
10 |
@ -72,9 +66,8 @@
13 | if (foo === NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[30:1]
,-[33:1]
30 | myArray.lastIndexOf(1);
31 |
32 | switch (foo) {
@ -86,9 +79,8 @@
36 | case 1:
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[38:1]
,-[41:1]
38 | break;
39 | }
40 |

View File

@ -1,4 +1,3 @@
x Use the isNaN function to compare with NaN
,-[1:1]
1 | if (foo == NaN) {}
@ -8,9 +7,8 @@
3 | if (NaN == foo) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[1:1]
,-[3:1]
1 | if (foo == NaN) {}
2 |
3 | if (NaN == foo) {}
@ -20,9 +18,8 @@
5 | if (foo != NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[2:1]
,-[5:1]
2 |
3 | if (NaN == foo) {}
4 |
@ -33,9 +30,8 @@
7 | if (foo == Number.NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[4:1]
,-[7:1]
4 |
5 | if (foo != NaN) {}
6 |
@ -46,9 +42,8 @@
9 | if (foo != Number.NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[6:1]
,-[9:1]
6 |
7 | if (foo == Number.NaN) {}
8 |
@ -59,9 +54,8 @@
11 | if (foo == Number['NaN']) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[8:1]
,-[11:1]
8 |
9 | if (foo != Number.NaN) {}
10 |
@ -72,9 +66,8 @@
13 | if (foo === NaN) {}
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[17:1]
,-[20:1]
17 | if (foo == Obj.NaN) {}
18 |
19 |
@ -85,9 +78,8 @@
22 | myArray.lastIndexOf(NaN);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[19:1]
,-[22:1]
19 |
20 | myArray.indexOf(NaN);
21 |
@ -98,9 +90,8 @@
24 | myArray.lastIndexOf(Number.NaN);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[21:1]
,-[24:1]
21 |
22 | myArray.lastIndexOf(NaN);
23 |
@ -111,9 +102,8 @@
26 | myArray.lastIndexOf(Number['NaN']);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[23:1]
,-[26:1]
23 |
24 | myArray.lastIndexOf(Number.NaN);
25 |

View File

@ -1,4 +1,3 @@
x Use the isNaN function to compare with NaN
,-[1:1]
1 | switch (NaN as any) {
@ -9,9 +8,8 @@
4 | case 1:
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[1:1]
,-[2:1]
1 | switch (NaN as any) {
2 | case NaN as any:
: ^^^^^|^^^^
@ -21,9 +19,8 @@
5 | baz();
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[1:1]
,-[3:1]
1 | switch (NaN as any) {
2 | case NaN as any:
3 | case Number.NaN as any:
@ -34,9 +31,8 @@
6 | }
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[5:1]
,-[8:1]
5 | baz();
6 | }
7 |
@ -47,9 +43,8 @@
10 | myArray.lastIndexOf(NaN as any);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[7:1]
,-[10:1]
7 |
8 | if (foo == Number.NaN as any) {}
9 |
@ -60,9 +55,8 @@
12 | myArray.lastIndexOf(Number.NaN as any);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[9:1]
,-[12:1]
9 |
10 | myArray.lastIndexOf(NaN as any);
11 |
@ -73,9 +67,8 @@
14 | myArray.lastIndexOf(Number['NaN'] as any);
`----
help: NaN is a special value and `NaN == NaN` is false
x Use the isNaN function to compare with NaN
,-[11:1]
,-[14:1]
11 |
12 | myArray.lastIndexOf(Number.NaN as any);
13 |

View File

@ -1,4 +1,3 @@
x Use the isNaN function to compare with NaN
,-[1:1]
1 | if (a == NaN) {}

Some files were not shown because too many files have changed in this diff Show More