-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
1 changed file
with
157 additions
and
0 deletions.
There are no files selected for viewing
157 changes: 157 additions & 0 deletions
157
crates/oxc_linter/src/snapshots/consistent_type_definitions.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,157 @@ | ||
--- | ||
source: crates/oxc_linter/src/tester.rs | ||
expression: consistent_type_definitions | ||
--- | ||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ type T = { x: number; }; | ||
· ──┬─ | ||
· ╰── Use an `interface` instead of a `type` | ||
╰──── | ||
help: Use an `interface` instead of a `type` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ type T={ x: number; }; | ||
· ──┬─ | ||
· ╰── Use an `interface` instead of a `type` | ||
╰──── | ||
help: Use an `interface` instead of a `type` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ type T= { x: number; }; | ||
· ──┬─ | ||
· ╰── Use an `interface` instead of a `type` | ||
╰──── | ||
help: Use an `interface` instead of a `type` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:2:11] | ||
1 │ | ||
2 │ export type W<T> = { | ||
· ──┬─ | ||
· ╰── Use an `interface` instead of a `type` | ||
3 │ x: T; | ||
╰──── | ||
help: Use an `interface` instead of a `type` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ interface T { x: number; } | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ interface T{ x: number; } | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ interface T { x: number; } | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ interface A extends B, C { x: number; }; | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:1:1] | ||
1 │ interface A extends B<T1>, C<T2> { x: number; }; | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:2:11] | ||
1 │ | ||
2 │ export interface W<T> { | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
3 │ x: T; | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:3:6] | ||
2 │ namespace JSX { | ||
3 │ interface Array<T> { | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
4 │ foo(x: (x: number) => T): T[]; | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:3:6] | ||
2 │ global { | ||
3 │ interface Array<T> { | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
4 │ foo(x: (x: number) => T): T[]; | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:3:6] | ||
2 │ declare global { | ||
3 │ interface Array<T> { | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
4 │ foo(x: (x: number) => T): T[]; | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:4:8] | ||
3 │ namespace Foo { | ||
4 │ interface Bar {} | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
5 │ } | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:2:19] | ||
1 │ | ||
2 │ export default interface Test { | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
3 │ bar(): string; | ||
╰──── | ||
help: Use an `type` instead of a `interface` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:2:19] | ||
1 │ | ||
2 │ export declare type Test = { | ||
· ──┬─ | ||
· ╰── Use an `interface` instead of a `type` | ||
3 │ foo: string; | ||
╰──── | ||
help: Use an `interface` instead of a `type` | ||
|
||
⚠ typescript-eslint(consistent-type-definitions): | ||
╭─[consistent_type_definitions.tsx:2:19] | ||
1 │ | ||
2 │ export declare interface Test { | ||
· ────┬──── | ||
· ╰── Use an `type` instead of a `interface` | ||
3 │ foo: string; | ||
╰──── | ||
help: Use an `type` instead of a `interface` |