SonarQube JavaScript
  1. SonarQube JavaScript
  2. SONARJS-95

Rule: Use Javascript strict mode with caution

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      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

          Activity

          Hide
          Fabrice Bellingard added a comment -

          Manually tested.

          Show
          Fabrice Bellingard added a comment - Manually tested.
          Hide
          Evgeny Mandrikov added a comment -

          Integration tests were updated.

          Show
          Evgeny Mandrikov added a comment - Integration tests were updated.

            People

            • Assignee:
              Evgeny Mandrikov
              Reporter:
              Fabrice Bellingard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: