Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,18 @@ export const config = [
{ allowTernary: true },
],
'@typescript-eslint/unified-signatures': ERROR,
// Disallow the TypeScript `as` operator for type assertions.
// Using `assertionStyle: "never"` forbids both `as` and angle-bracket
// assertions, effectively preventing all direct casts.
'@typescript-eslint/consistent-type-assertions': [
ERROR,
{
assertionStyle: 'never',
},
],

// Disallow non-null assertions (the `!` postfix operator).
'@typescript-eslint/no-non-null-assertion': ERROR,
'import/consistent-type-specifier-style': [ERROR, 'prefer-inline'],

// Disable rules from presets
Expand Down