disable '@typescript-eslint/prefer-nullish-coalescing' for primitive types
This commit is contained in:
parent
908271c995
commit
0cd1292308
2 changed files with 4 additions and 7 deletions
|
@ -42,13 +42,6 @@ export default [
|
|||
name: '__filename',
|
||||
message: 'Not in ESModule. Use `import.meta.url` instead.',
|
||||
}],
|
||||
// https://typescript-eslint.io/rules/prefer-nullish-coalescing/
|
||||
'@typescript-eslint/prefer-nullish-coalescing': ['warn', {
|
||||
ignorePrimitives: {
|
||||
// Without this, the rule breaks for nullable booleans
|
||||
boolean: true,
|
||||
},
|
||||
}],
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -37,6 +37,10 @@ export default [
|
|||
'no-restricted-imports': ['error', {
|
||||
paths: [{ name: 'punycode' }],
|
||||
}],
|
||||
// https://typescript-eslint.io/rules/prefer-nullish-coalescing/
|
||||
'@typescript-eslint/prefer-nullish-coalescing': ['warn', {
|
||||
ignorePrimitives: true,
|
||||
}],
|
||||
},
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue