Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jun 26, 2023
1 parent 85611b0 commit 71f39b7
Show file tree
Hide file tree
Showing 7 changed files with 164 additions and 173 deletions.
3 changes: 3 additions & 0 deletions crates/rome_js_analyze/tests/specs/nursery/noVoid/invalid.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ void 0;
function f() {
return void 0;
}
var foo = void 0;
void(0);

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ void 0;
function f() {
return void 0;
}
var foo = void 0;
void(0);


```

Expand Down Expand Up @@ -35,7 +38,36 @@ invalid.js:3:9 lint/nursery/noVoid ━━━━━━━━━━━━━━━
> 3 │ return void 0;
│ ^^^^^^
4 │ }
5 │
5 │ var foo = void 0;
```

```
invalid.js:5:11 lint/nursery/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! The use of void is not allowed.
3 │ return void 0;
4 │ }
> 5 │ var foo = void 0;
│ ^^^^^^
6 │ void(0);
7 │
```

```
invalid.js:6:1 lint/nursery/noVoid ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! The use of void is not allowed.
4 │ }
5 │ var foo = void 0;
> 6 │ void(0);
│ ^^^^^^^
7 │
```
Expand Down
4 changes: 4 additions & 0 deletions crates/rome_js_analyze/tests/specs/nursery/noVoid/valid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var foo = bar();
foo.void();
foo.void = bar;
delete foo;
14 changes: 14 additions & 0 deletions crates/rome_js_analyze/tests/specs/nursery/noVoid/valid.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
source: crates/rome_js_analyze/tests/spec_tests.rs
expression: valid.js
---
# Input
```js
var foo = bar();
foo.void();
foo.void = bar;
delete foo;

```


Loading

0 comments on commit 71f39b7

Please sign in to comment.