Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-1539

"strict" mode should be used with caution

    XMLWordPrintable

    Details

    • Message:
      Hide
      Use of JavaScript strict mode may result in unexpected behaviour in some browsers.
      Show
      Use of JavaScript strict mode may result in unexpected behaviour in some browsers.
    • Default Severity:
      Critical
    • Impact:
      High
    • Likelihood:
      Low
    • Covered Languages:
      JavaScript
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      5min
    • ESLint:
      strict

      Description

      Even though it may be a good practice to enforce JavaScript strict mode, doing so could result in unexpected behaviors on browsers that do not support it yet. Using this feature should therefore be done with caution and with full knowledge of the potential consequences on browsers that do not support it.

      Noncompliant Code Example

      function strict() {
        'use strict';
      }
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            freddy.mallet Freddy Mallet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: