Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 6, 2024
1 parent 8c69efb commit 24e5ed5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 18 deletions.
6 changes: 2 additions & 4 deletions src/commands/inline-arrow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ run(
code: $`
///inline-arrow
const a = 1`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
// multi statement
{
Expand All @@ -19,8 +18,7 @@ run(
const a = 1
return a
}`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
{
code: $`
Expand Down
2 changes: 1 addition & 1 deletion src/commands/keep-unique.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Command, CommandContext, Tree } from '../types'
import type { Command } from '../types'

export interface KeepSortedInlineOptions {
key?: string
Expand Down
6 changes: 2 additions & 4 deletions src/commands/no-shorthand.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ run(
code: $`
/// nsh
const obj = 10`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
{
code: $`
/// nsh
const obj = { key: value, key2: value2 }`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
)
3 changes: 1 addition & 2 deletions src/commands/no-type.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ run(
code: $`
/// nt
const a = 1`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
)
6 changes: 2 additions & 4 deletions src/commands/to-arrow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ run(
code: $`
/// 2a
const a = 1`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
// Function declaration
{
Expand Down Expand Up @@ -70,8 +69,7 @@ run(
/// to-arrow
get id() {}
}`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
// Class method
{
Expand Down
1 change: 0 additions & 1 deletion src/commands/to-for-of.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ run(
a.forEach((b, i) => {
console.log(i, b)
})`,
output: null,
errors: ['command-error', 'command-error-cause'],
},
)
3 changes: 1 addition & 2 deletions src/commands/to-function.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ run(
code: $`
///to-fn
const a = 1`,
output: null,
errors: 'command-error',
errors: ['command-error'],
},
{
code: $`
Expand Down

0 comments on commit 24e5ed5

Please sign in to comment.