Skip to content

Commit 48b1b0c

Browse files
test: fix
1 parent 185359c commit 48b1b0c

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { defineConfig } from "eslint/config";
2+
3+
export default defineConfig({
4+
rules: {
5+
"no-console": "warn",
6+
7+
"no-undef": "error",
8+
"no-var": "error",
9+
"no-unused-vars": "error",
10+
"prefer-const": "error"
11+
}
12+
});

test/eslint.config.mjs

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/threads.test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,14 @@ describe("Threading", () => {
2121
});
2222

2323
it("threaded should lint files", async () => {
24-
const threaded = await loadESLintThreaded("bar", 1, { ignore: false });
24+
const threaded = await loadESLintThreaded("bar", 1, {
25+
ignore: false,
26+
configType: "flat",
27+
overrideConfigFile: join(
28+
__dirname,
29+
"./config-for-tests/eslint.config.mjs",
30+
),
31+
});
2532
try {
2633
const [good, bad] = await Promise.all([
2734
threaded.lintFiles(join(__dirname, "fixtures/good.js")),

test/utils/conf.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ export default (entry, pluginConf = {}, webpackConf = {}) => {
1414
},
1515
plugins: [
1616
new ESLintPlugin({
17-
overrideConfigFile: join(testDir, "./eslint.config.mjs"),
17+
overrideConfigFile: join(
18+
testDir,
19+
"./config-for-tests/eslint.config.mjs",
20+
),
1821
// this disables the use of .eslintignore, since it contains the fixtures
1922
// folder to skip it on the global linting, but here we want the opposite
2023
// (we only use .eslintignore on the test that checks this)

0 commit comments

Comments
 (0)