diff --git a/package.json b/package.json index 46ebf59f948..9f93300fec2 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.0", + "@eslint/eslintrc": "^0.2.1", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", diff --git a/tests/lib/eslint/eslint.js b/tests/lib/eslint/eslint.js index f9ec1e7c57d..e4f37f404c4 100644 --- a/tests/lib/eslint/eslint.js +++ b/tests/lib/eslint/eslint.js @@ -3919,6 +3919,26 @@ describe("ESLint", () => { await assert.rejects(() => eslint.calculateConfigForFile(null), /'filePath' must be a non-empty string/u); }); + + // https://github.com/eslint/eslint/issues/13793 + it("should throw with an invalid built-in rule config", async () => { + const options = { + baseConfig: { + rules: { + "no-alert": ["error", { + thisDoesNotExist: true + }] + } + } + }; + const engine = new ESLint(options); + const filePath = getFixturePath("single-quoted.js"); + + await assert.rejects( + () => engine.calculateConfigForFile(filePath), + /Configuration for rule "no-alert" is invalid:/u + ); + }); }); describe("isPathIgnored", () => {