If you're using "type": "module"
in your package.json
you create a file like this:
import { createConfig } from '@darksheep/eslint';
export default await createConfig(import.meta.url);
If you're using "type": "commonjs"
or you have not defined type
in your package.json
you create a file like this:
module.exports = (async () => {
const { createConfig } = await import('@darksheep/eslint');
return createConfig(__dirname);
})();
In your terminal you can run:
cat << EOF > eslint.config.js
import { createConfig } from '@darksheep/eslint';
export default await createConfig(import.meta.url);
EOF
cat << EOF > eslint.config.js
module.exports = (async () => {
const { createConfig } = await import('@darksheep/eslint');
return createConfig(__dirname);
})();
EOF