diff --git a/lib/linter/linter.js b/lib/linter/linter.js index 82df6a55a956..815ef9f2a16a 100644 --- a/lib/linter/linter.js +++ b/lib/linter/linter.js @@ -441,10 +441,6 @@ function normalizeEcmaVersion(parser, ecmaVersion) { // RuleTester always wraps parser, parser.$parser is the original parser object if ((parser.$parser || parser) === espree) { - if (ecmaVersion === void 0) { - return DEFAULT_ECMA_VERSION; - } - if (ecmaVersion === "latest") { return espree.latestEcmaVersion; } diff --git a/tests/lib/linter/linter.js b/tests/lib/linter/linter.js index 15d310c9ab93..ed7213defcab 100644 --- a/tests/lib/linter/linter.js +++ b/tests/lib/linter/linter.js @@ -3501,19 +3501,6 @@ var a = "test2"; assert.strictEqual(messages.length, 1); }); - it("the default ECMAScript version is 5", () => { - let ecmaVersion = null; - const config = { rules: { "ecma-version": 2 } }; - - linter.defineRule("ecma-version", context => ({ - Program() { - ecmaVersion = context.parserOptions.ecmaVersion; - } - })); - linter.verify("", config); - assert.strictEqual(ecmaVersion, 5); - }); - it("supports ECMAScript version 'latest'", () => { const messages = linter.verify("let x = 5 ** 7;", { parserOptions: { ecmaVersion: "latest" }