Skip to content

Commit

Permalink
Revert "feat: update eslint-scope to ignore "use strict" directives…
Browse files Browse the repository at this point in the history
… in ES3 (eslint#15595)"

This reverts commit b388fbf.
  • Loading branch information
srijan-deepsource committed May 30, 2022
1 parent 6a80b72 commit 299d6df
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -55,7 +55,7 @@
"debug": "^4.3.2",
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.1.1",
"eslint-scope": "^7.1.0",
"eslint-utils": "^3.0.0",
"eslint-visitor-keys": "^3.3.0",
"espree": "^9.3.1",
Expand Down
7 changes: 0 additions & 7 deletions tests/lib/rules/no-eval.js
Expand Up @@ -139,13 +139,6 @@ ruleTester.run("no-eval", rule, {
code: "class A { static {} [this.eval()]; }",
parserOptions: { ecmaVersion: 2022 },
errors: [{ messageId: "unexpected" }]
},

// in es3, "use strict" directives do not apply
{
code: "function foo() { 'use strict'; this.eval(); }",
parserOptions: { ecmaVersion: 3 },
errors: [{ messageId: "unexpected" }]
}
]
});
8 changes: 0 additions & 8 deletions tests/lib/rules/no-invalid-this.js
Expand Up @@ -865,14 +865,6 @@ const patterns = [
valid: [NORMAL],
invalid: [USE_STRICT, IMPLIED_STRICT, MODULES],
errors: [{ messageId: "unexpectedThis", type: "ThisExpression" }]
},

// in es3, "use strict" directives do not apply
{
code: "function foo() { 'use strict'; this.eval(); }",
parserOptions: { ecmaVersion: 3 },
valid: [NORMAL, USE_STRICT, IMPLIED_STRICT],
invalid: []
}
];

Expand Down

0 comments on commit 299d6df

Please sign in to comment.