sonarjs/no-referrer-policy
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/no-referrer-policy": "error",
},
},
];HTTP Referrer-Policy should not be set to an unsafe value
The documentation shows no incorrect example for this rule.
const express = require('express');
const helmet = require('helmet');
let app = express();
app.use(
helmet.referrerPolicy({
policy: 'no-referrer' // Compliant
})
);Examples from the ESLint documentation.
sonarjs/no-referrer-policy
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/no-referrer-policy": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Optional properties should not redundantly include 'undefined'
Regular expressions should not contain multiple spaces
Assertions should not be given twice the same argument
Boolean literals should not be used in comparisons