Require both operands of addition to be the same type and be bigint, number, or string.
// code-linter.json5
{
"rules": {
"@typescript-eslint/restrict-plus-operands": "error"
}
} const num = 10;
const bigIntNum = 1n;
export const foo1 = parseInt('5.5', num) + num;
export const foo2 = bigIntNum + bigIntNum; plugin:@typescript-eslint/all
For details about how to configure Code Linter check rules, see Code Linter.