mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
36 lines
963 B
JavaScript
36 lines
963 B
JavaScript
import { ESLint } from "eslint";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
describe("https://github.com/babel/babel-eslint/issues/558", () => {
|
|
it(
|
|
"doesn't crash with eslint-plugin-import - ESLint " + ESLint.version,
|
|
async () => {
|
|
const engine = new ESLint({
|
|
ignore: false,
|
|
overrideConfigFile: fileURLToPath(
|
|
new URL(
|
|
"../fixtures/eslint-plugin-import/custom.eslint.config.mjs",
|
|
import.meta.url,
|
|
),
|
|
),
|
|
});
|
|
expect(
|
|
await engine.lintFiles(
|
|
["a.js", "b.js", "c.js"].map(file =>
|
|
fileURLToPath(
|
|
new URL(
|
|
`../fixtures/eslint-plugin-import/${file}`,
|
|
import.meta.url,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
).toMatchObject([
|
|
{ errorCount: 0, messages: [] },
|
|
{ errorCount: 0, messages: [] },
|
|
{ errorCount: 0, messages: [] },
|
|
]);
|
|
},
|
|
);
|
|
});
|