This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
273 changed files
with
4,477 additions
and
2,716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
crates/rome_cli/tests/snapshots/main_commands_check/all_rules.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `rome.json` | ||
|
||
```json | ||
{ | ||
"linter": { | ||
"rules": { "all": true } | ||
} | ||
} | ||
``` | ||
|
||
## `fix.js` | ||
|
||
```js | ||
|
||
if(a != -0) {} | ||
|
||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
internalError/io ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Some errors were emitted while running checks | ||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
fix.js:2:4 lint/suspicious/noCompareNegZero FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Do not use the != operator to compare against -0. | ||
> 2 │ if(a != -0) {} | ||
│ ^^^^^^^ | ||
3 │ | ||
i Safe fix: Replace -0 with 0 | ||
2 │ if(a·!=·-0)·{} | ||
│ - | ||
``` | ||
|
||
```block | ||
fix.js:2:6 lint/suspicious/noDoubleEquals FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Use !== instead of != | ||
> 2 │ if(a != -0) {} | ||
│ ^^ | ||
3 │ | ||
i != is only allowed when comparing against null | ||
> 2 │ if(a != -0) {} | ||
│ ^^ | ||
3 │ | ||
i Using !== may be unsafe if you are relying on type coercion | ||
i Suggested fix: Use !== | ||
2 │ if(a·!==·-0)·{} | ||
│ + | ||
``` | ||
|
||
```block | ||
fix.js:2:4 lint/correctness/noUndeclaredVariables ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
! The a variable is undeclared | ||
> 2 │ if(a != -0) {} | ||
│ ^ | ||
3 │ | ||
``` | ||
|
||
```block | ||
Checked 1 file(s) in <TIME> | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.