for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
export default function math(lvalue, operator, rvalue, options) {
options
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.
lvalue = parseFloat(lvalue)
rvalue = parseFloat(rvalue)
return {
'+': lvalue + rvalue,
'-': lvalue - rvalue,
'*': lvalue * rvalue,
'/': lvalue / rvalue,
'%': lvalue % rvalue
}[operator]
}
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.