sonarjs/frame-ancestors
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/frame-ancestors": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Content Security Policy frame-ancestors directive should not be disabled
The documentation shows no incorrect example for this rule.
const express = require('express');
const helmet = require('helmet');
let app = express();
app.use(
helmet.contentSecurityPolicy({
directives: {
// other directives
frameAncestors: ["'example.com'"] // Compliant
}
})
);Examples 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/frame-ancestors
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/frame-ancestors": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Function and method names should comply with a naming convention
Default export names and file names should match