Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JAVASCRIPT-1.2
-
Component/s: JavaScript
-
Labels:None
-
Number of attachments :
Description
title
Use Javascript strict mode with caution
description
Even if it can be considered as a good practice to enforce JavaScript strict mode, this may result in unexpected behaviours on browsers that do not support it yet. Using this feature should consequently be done with caution and with full knowledge of the potential consequences on browsers that do not support it.
The following code snippet illustrates the use of strict mode:
"use strict";
function show() {
...
}
message
Use of JavaScript strict mode may result in unexpected behaviour in some browsers.
severity
Info
in Sonar way?
Yes
Issue Links
- is related to
-
SONARPLUGINS-2515
Update the SQALE mapping for new rules
-
- relates to
-
SONARPLUGINS-2508
Rule : Source should comply with the javascript strict mode
-
Manually tested.