sonarjs/argument-type
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/argument-type": "error",
},
},
];Arguments to built-in functions should match documented types
const isTooSmall = Math.abs(x < 0.0042);const isTooSmall = Math.abs(x) < 0.0042;Examples from the ESLint documentation.
sonarjs/argument-type
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/argument-type": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Alternatives in regular expressions should be grouped when used with anchors
Template literals should not be nested
Callbacks of array methods should have return statements
Assertions should be placed inside test cases or hooks