Skip to content

Commit

Permalink
Update eslint.config.mjs
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
targos and aduh95 authored May 5, 2024
1 parent 2e4242b commit 7092731
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@
import { createRequire } from 'node:module';
import { fileURLToPath, URL } from 'node:url';

function requireEslintPlugin(specifier) {
const require = createRequire(import.meta.url);
try {
return require(`./tools/node_modules/${specifier}`);
} catch {
return require(
`./tools/node_modules/eslint/node_modules/${specifier}`);
}
}
const requireEslintPlugin = createRequire(new URL('./tools/node_modules/eslint/', import.meta.url));

const js = requireEslintPlugin('@eslint/js');
const babelEslintParser = requireEslintPlugin('@babel/eslint-parser');
Expand Down

0 comments on commit 7092731

Please sign in to comment.