Skip to content

ModernCop EnableStrictMode warning from v1.0.17-build01715 #604

@chenriksson

Description

@chenriksson

Would it be possible to avoid strict mode in global scope?

Defect : EnableStrictMode, Component : packages\Microsoft.ApplicationInsights.JavaScript.1.0.17-build01715\content\scripts\ai.1.0.17-build01715.js

At (1,1) "Code should run in strict mode wherever possible. Strict mode was set for this file but was enabled at global scope (which can lead to unexpected behaviors if this file is concatenated as part of a post-processing step). Consider using the JavaScript module pattern to wrap all code contained in the file within a function expression. Enable strict mode as the first statement of the containing function. To disable enforcement of the module pattern and permit setting strict mode at global file level, pass /setting:JS2085.EnableStrictMode.EnforceModulePattern=false on the command-line."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions