sonarjs/production-debug
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/production-debug": "error",
},
},
];The documentation shows no incorrect example for this rule.
const express = require('express');
const errorhandler = require('errorhandler');
let app = express();
if (process.env.NODE_ENV === 'development') {
app.use(errorhandler());
}Examples from the ESLint documentation.
sonarjs/production-debug
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/production-debug": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Pseudorandom number generators (PRNGs) should not be used in security contexts
The most specific assertion should be used
Public "static" fields should be read-only
Return of boolean expressions should not be wrapped into an "if-then-else" statement
Temporary files should not be created in publicly writable directories