diff options
author | David Cho-Lerat <david.cho-lerat@sonarsource.com> | 2024-06-17 11:07:46 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-06-17 20:02:35 +0000 |
commit | bf7c885eeff7c46a1a444038380fa33d0c686df4 (patch) | |
tree | feec33367048483528a49fdc6624fa6fc87c7e37 | |
parent | 078306d53ad53ba38d5d4b06e6e8958a0c2c6595 (diff) | |
download | sonarqube-bf7c885eeff7c46a1a444038380fa33d0c686df4.tar.gz sonarqube-bf7c885eeff7c46a1a444038380fa33d0c686df4.zip |
SONAR-22413 Warn about use of Math.random()
-rw-r--r-- | server/sonar-web/.eslintrc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/sonar-web/.eslintrc b/server/sonar-web/.eslintrc index ae429400752..49071ab4dbf 100644 --- a/server/sonar-web/.eslintrc +++ b/server/sonar-web/.eslintrc @@ -60,6 +60,14 @@ "local-rules/use-await-expect-async-matcher": "warn", "local-rules/no-implicit-coercion": "warn", "local-rules/no-api-imports": "warn", - "local-rules/no-within": "warn" + "local-rules/no-within": "warn", + "no-restricted-properties": [ + "warn", + { + "object": "Math", + "property": "random", + "message": "Tests can fail when the same random number is used as a key for several React elements." + } + ] } } |