Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/oxlint/test/fixtures/fixes/files/bom_and_unicode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = c;
// 😀🤪😆😎🤮
g = b
3 changes: 3 additions & 0 deletions apps/oxlint/test/fixtures/fixes/files/unicode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = c;
// 😀🤪😆😎🤮
g = b
16 changes: 15 additions & 1 deletion apps/oxlint/test/fixtures/fixes/fix.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# stdout
```
Found 0 warnings and 0 errors.
Finished in Xms on 2 files with 1 rules using X threads.
Finished in Xms on 4 files with 1 rules using X threads.
```

# stderr
Expand All @@ -17,6 +17,13 @@ Finished in Xms on 2 files with 1 rules using X threads.
rage = abacus
```

# File altered: files/bom_and_unicode.js
```
daddy = magic;
// 😀🤪😆😎🤮
rage = abacus
```

# File altered: files/index.js
```

Expand All @@ -34,3 +41,10 @@ let cowabunga = 10;


```

# File altered: files/unicode.js
```
daddy = magic;
// 😀🤪😆😎🤮
rage = abacus
```
60 changes: 58 additions & 2 deletions apps/oxlint/test/fixtures/fixes/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,34 @@
: ^
`----

x fixes-plugin(fixes): Replace "a" with "daddy"
,-[files/bom_and_unicode.js:1:4]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x fixes-plugin(fixes): Prefix "c" with "magi"
,-[files/bom_and_unicode.js:1:8]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x fixes-plugin(fixes): Replace "g" with "rage"
,-[files/bom_and_unicode.js:3:1]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x fixes-plugin(fixes): Replace "b" with "abacus"
,-[files/bom_and_unicode.js:3:5]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x fixes-plugin(fixes): Remove debugger statement
,-[files/index.js:1:1]
1 | debugger;
Expand Down Expand Up @@ -125,8 +153,36 @@
: ^^^^^^^^^
`----

Found 0 warnings and 16 errors.
Finished in Xms on 2 files with 1 rules using X threads.
x fixes-plugin(fixes): Replace "a" with "daddy"
,-[files/unicode.js:1:1]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x fixes-plugin(fixes): Prefix "c" with "magi"
,-[files/unicode.js:1:5]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x fixes-plugin(fixes): Replace "g" with "rage"
,-[files/unicode.js:3:1]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x fixes-plugin(fixes): Replace "b" with "abacus"
,-[files/unicode.js:3:5]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

Found 0 warnings and 24 errors.
Finished in Xms on 4 files with 1 rules using X threads.
```

# stderr
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = c;
// 😀🤪😆😎🤮
g = b
3 changes: 3 additions & 0 deletions apps/oxlint/test/fixtures/suggestions/files/unicode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
a = c;
// 😀🤪😆😎🤮
g = b
16 changes: 15 additions & 1 deletion apps/oxlint/test/fixtures/suggestions/fix-suggestions.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# stdout
```
Found 0 warnings and 0 errors.
Finished in Xms on 2 files with 1 rules using X threads.
Finished in Xms on 4 files with 1 rules using X threads.
```

# stderr
Expand All @@ -17,6 +17,13 @@ Finished in Xms on 2 files with 1 rules using X threads.
rage = abacus
```

# File altered: files/bom_and_unicode.js
```
daddy = magic;
// 😀🤪😆😎🤮
rage = abacus
```

# File altered: files/index.js
```

Expand All @@ -35,3 +42,10 @@ let kaboom = 11;


```

# File altered: files/unicode.js
```
daddy = magic;
// 😀🤪😆😎🤮
rage = abacus
```
60 changes: 58 additions & 2 deletions apps/oxlint/test/fixtures/suggestions/fix.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,34 @@
: ^
`----

x suggestions-plugin(suggestions): Replace "a" with "daddy"
,-[files/bom_and_unicode.js:1:4]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Prefix "c" with "magi"
,-[files/bom_and_unicode.js:1:8]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Replace "g" with "rage"
,-[files/bom_and_unicode.js:3:1]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x suggestions-plugin(suggestions): Replace "b" with "abacus"
,-[files/bom_and_unicode.js:3:5]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x suggestions-plugin(suggestions): Remove debugger statement
,-[files/index.js:1:1]
1 | debugger;
Expand Down Expand Up @@ -133,8 +161,36 @@
: ^^^^^^^^^
`----

Found 0 warnings and 17 errors.
Finished in Xms on 2 files with 1 rules using X threads.
x suggestions-plugin(suggestions): Replace "a" with "daddy"
,-[files/unicode.js:1:1]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Prefix "c" with "magi"
,-[files/unicode.js:1:5]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Replace "g" with "rage"
,-[files/unicode.js:3:1]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x suggestions-plugin(suggestions): Replace "b" with "abacus"
,-[files/unicode.js:3:5]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

Found 0 warnings and 25 errors.
Finished in Xms on 4 files with 1 rules using X threads.
```

# stderr
Expand Down
60 changes: 58 additions & 2 deletions apps/oxlint/test/fixtures/suggestions/output.snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,34 @@
: ^
`----

x suggestions-plugin(suggestions): Replace "a" with "daddy"
,-[files/bom_and_unicode.js:1:4]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Prefix "c" with "magi"
,-[files/bom_and_unicode.js:1:8]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Replace "g" with "rage"
,-[files/bom_and_unicode.js:3:1]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x suggestions-plugin(suggestions): Replace "b" with "abacus"
,-[files/bom_and_unicode.js:3:5]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x suggestions-plugin(suggestions): Remove debugger statement
,-[files/index.js:1:1]
1 | debugger;
Expand Down Expand Up @@ -133,8 +161,36 @@
: ^^^^^^^^^
`----

Found 0 warnings and 17 errors.
Finished in Xms on 2 files with 1 rules using X threads.
x suggestions-plugin(suggestions): Replace "a" with "daddy"
,-[files/unicode.js:1:1]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Prefix "c" with "magi"
,-[files/unicode.js:1:5]
1 | a = c;
: ^
2 | // 😀🤪😆😎🤮
`----

x suggestions-plugin(suggestions): Replace "g" with "rage"
,-[files/unicode.js:3:1]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

x suggestions-plugin(suggestions): Replace "b" with "abacus"
,-[files/unicode.js:3:5]
2 | // 😀🤪😆😎🤮
3 | g = b
: ^
`----

Found 0 warnings and 25 errors.
Finished in Xms on 4 files with 1 rules using X threads.
```

# stderr
Expand Down
Loading