Skip to content

Instantly share code, notes, and snippets.

@fasttime
Last active May 11, 2024 08:52
Show Gist options
  • Save fasttime/77abbb1671d68f950a5156ffcf994bdb to your computer and use it in GitHub Desktop.
Save fasttime/77abbb1671d68f950a5156ffcf994bdb to your computer and use it in GitHub Desktop.
Run `npm test`
import { config } from './recommended.mjs';
export default config;
const { tsImport } = require('tsx/esm/api');
const { register } = require('tsx/cjs/api');
async function main() {
const unregister = register(); // This call was unexpectedly required!
try {
return (await tsImport('./eslint.config.ts', __filename)).default;
}
finally {
unregister();
}
}
module.exports = main();
{
"devDependencies": {
"tsx": "^4.9.4"
},
"scripts": {
"test": "node main.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment