* Lint against CJS globals in modules * Use `import.meta.url` instead of `__filename` in `src` files * Prepare fixtures runner for `import.meta.url` * Use `import.meta.url` instead of `__filename` in `test/index` files * Remove `__dirname` from remaining test files dirname * Avoid using `module` in `src` files * Avoid using `require` in `src` files * Avoid using `require` in `test` files * Update `@types/node` * Compile dynamic import in `@babel/node` * Fix windows * Use `@babel/plugin-proposal-dynamic-import` from npm
18 lines
516 B
JavaScript
18 lines
516 B
JavaScript
import eslint from "eslint";
|
|
import path from "path";
|
|
import { fileURLToPath } from "url";
|
|
|
|
describe("https://github.com/babel/babel-eslint/issues/558", () => {
|
|
it("doesn't crash with eslint-plugin-import", () => {
|
|
const engine = new eslint.CLIEngine({ ignore: false });
|
|
engine.executeOnFiles(
|
|
["a.js", "b.js", "c.js"].map(file =>
|
|
path.resolve(
|
|
path.dirname(fileURLToPath(import.meta.url)),
|
|
`../fixtures/eslint-plugin-import/${file}`,
|
|
),
|
|
),
|
|
);
|
|
});
|
|
});
|