mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-08-21 10:33:37 +00:00
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',
|
name: '__filename',
|
||||||
message: 'Not in ESModule. Use `import.meta.url` instead.',
|
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', {
|
'no-restricted-imports': ['error', {
|
||||||
paths: [{ name: 'punycode' }],
|
paths: [{ name: 'punycode' }],
|
||||||
}],
|
}],
|
||||||
|
// https://typescript-eslint.io/rules/prefer-nullish-coalescing/
|
||||||
|
'@typescript-eslint/prefer-nullish-coalescing': ['warn', {
|
||||||
|
ignorePrimitives: true,
|
||||||
|
}],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Reference in a new issue