Skip to content

Commit eff3db8

Browse files
test: fix
1 parent 1698230 commit eff3db8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

test/config-for-tests/eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import globals from "globals";
21
import { defineConfig } from "eslint/config";
2+
// eslint-disable-next-line n/no-extraneous-import, import/no-extraneous-dependencies
3+
import globals from "globals";
34

45
export default defineConfig({
56
languageOptions: {

test/fail-on-config.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ import pack from "./utils/pack";
55
describe("fail on config", () => {
66
it("fails when .eslintrc is not a proper format", async () => {
77
const overrideConfigFile = join(__dirname, ".badeslintrc");
8-
const compiler = pack("error", { overrideConfigFile });
8+
const compiler = pack("error", {
9+
configType: "eslintrc",
10+
overrideConfigFile,
11+
});
912

1013
const stats = await compiler.runAsync();
1114
const { errors } = stats.compilation;

test/mock/eslint/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class ESLintMock {
3232
}
3333
}
3434

35+
ESLintMock.version = "9";
36+
3537
module.exports = {
3638
ESLint: ESLintMock,
39+
loadESLint: async () => ESLintMock,
3740
};

0 commit comments

Comments
 (0)