sonarjs/os-command
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/os-command": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
The documentation shows no incorrect example for this rule.
const cp = require('child_process');
cp.spawnSync("/usr/bin/file.exe", { shell: false }); // CompliantExamples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
sonarjs/os-command
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/os-command": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Arithmetic operations should not result in "NaN"
Local variables should not be declared and then immediately returned or thrown
Arithmetic operators should only have numbers as operands
Shorthand object properties should be grouped at the beginning or end of an object declaration