Skip to content

strict: [2, "global"] still throws Unnecessary "use strict" directive #2785

@MikaAK

Description

@MikaAK

In my .eslintrc I've set strict and disabled global-strict but I always get the error error Unnecessary "use strict" directive strict when I run against my file.

Right now I have it working by using global-strict but I read that global-strict will be deprecated soon and I'm wondering what I need to do to achieve the same results.

Expected To Work

"strict": [2, "global"],
"global-strict": [0, "always"]

Actually works

"strict": [0, "global"],
"global-strict": [2, "always"],

Test File

'use strict'

angular.module('edvisor.viewModels.student.profile')
  .directive('studentSidebarTasks', [function() {
    return {
      restrict: 'E',
      scope: {
      },
      templateUrl: 'view_models/student/student_profile/student_sidebar/student_sidebar_tasks/student_sidebar_tasks.html',
      link(scope) {


      }
    }
  }])

Metadata

Metadata

Assignees

No one assigned

    Labels

    archived due to ageThis issue has been archived; please open a new issue for any further discussiontriageAn ESLint team member will look at this issue soon

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions