Skip to content

Can't overwrite "strict" rule #727

@vitorbaptista

Description

@vitorbaptista

I have the following files:

// foo.js
function foo() {
  return 42;
}

foo();
---
extends: airbnb/base
rules:
  strict: [2, "global"]

Running eslint foo.js returns successfully, even though foo.js has no "use strict"; directive. If I change to extends: eslint:recommended, it complains because of the lack of "use strict"; (as expected).

I tried to overwrite another rule, so I changed the files to:

// foo.js
function foo() {
  return 42;
}

// Remove the call to foo();
// foo();
---
extends: airbnb/base
rules:
  no-unused-vars: 0

And it worked. I was able to overwrite no-unused-vars.

I'm running eslint@1.10.3 and eslint-config-airbnb@5.0.0 with Node v5.5.0 and npm v3.6.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions