Add space-within-parens rule
This commit is contained in:
parent
adfa7a069a
commit
0630260628
@ -1,31 +0,0 @@
|
||||
export type NonUndefinedPropertyNames<T> = {
|
||||
[K in keyof T]: T[K] extends undefined ? never: K
|
||||
}[keyof T]
|
||||
|
||||
export type OnlyRequired<T> = Pick<T, NonUndefinedPropertyNames<T>>
|
||||
|
||||
type Args1 = OnlyRequired<{
|
||||
query: {a: number, b: string}
|
||||
params: {c: number}
|
||||
}>
|
||||
|
||||
type Args2 = OnlyRequired<{
|
||||
query: {a: number, b: string}
|
||||
params: undefined
|
||||
}>
|
||||
|
||||
type Args3 = OnlyRequired<{
|
||||
query: undefined
|
||||
params: undefined
|
||||
}>
|
||||
|
||||
const a: Args1 = {
|
||||
query: {a: 1, b: 'two'},
|
||||
params: {c: 3},
|
||||
}
|
||||
|
||||
const b: Args2 = {
|
||||
query: {a: 1, b: 'two'},
|
||||
}
|
||||
|
||||
const c: Args3 = {}
|
||||
@ -67,7 +67,7 @@ describe('user', () => {
|
||||
.get('/users/emails/:email', {
|
||||
params: {
|
||||
email: 'non-existing@address.com',
|
||||
}
|
||||
},
|
||||
})
|
||||
.expect(200)
|
||||
.expect(/^$/g)
|
||||
|
||||
@ -32,7 +32,8 @@
|
||||
},
|
||||
"singleline": "never",
|
||||
"esSpecCompliant": true
|
||||
}]
|
||||
}],
|
||||
"space-within-parens": 0
|
||||
},
|
||||
"rulesDirectory": []
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user