diff options
Diffstat (limited to 'server/sonar-web/.eslintrc')
-rw-r--r-- | server/sonar-web/.eslintrc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index ca97fff5e6d..f9fce6b0894 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -3,7 +3,29 @@ "rules": { "camelcase": "off", "promise/no-return-wrap": "warn", + "react/forbid-component-props": [ + "error", + { + "forbid": [ + { + "propName": "dangerouslySetInnerHTML", + "message": "Use the SafeHTMLInjection component instead of 'dangerouslySetInnerHTML', to prevent CSS injection along other XSS attacks" + } + ] + } + ], + "react/forbid-dom-props": [ + "error", + { + "forbid": [ + { + "propName": "dangerouslySetInnerHTML", + "message": "Use the SafeHTMLInjection component instead of 'dangerouslySetInnerHTML', to prevent CSS injection along other XSS attacks" + } + ] + } + ], "react/jsx-curly-brace-presence": "warn", "testing-library/render-result-naming-convention": "off" } -} +}
\ No newline at end of file |