Typed SIGTERM's ESLint config.
npm install @typed-sigterm/eslint-config@antfu/eslint-config!
ts
import process from 'node:process';
// Oh it's 叶文洁
class YeWenjie {
public think() {
return new Promise((resolve) => {
if (globalThis.world)
console.error('Why the world is defined?');
else
console.error('Why the world is undefined?');
setTimeout(() => resolve(41), 114514);
});
}
}
const yeWenjie = new YeWenjie();
if (await yeWenjie.think() === 41) {
console.error('Physics no longer exists!');
process.exit(1);
} else {
process.exit(0);
}
`
You can view all details at Config Inspector.
Usage
1. Install @typed-sigterm/eslint-config with your package manager
2. Install @antfu/eslint-config with your package manager
3. Create eslint.config.mjs in your project root:
`js
import ts from '@typed-sigterm/eslint-config';
export default ts();
`
4. Add script for package.json:
`json
{
"scripts": {
"lint": "eslint ."
}
}
`
Now you can run npm run lint to lint your code.
VS Code support (auto fix on save)
See documentation of @antfu/eslint-config.
Credits
The project is a wrapper of @antfu/eslint-config`. Thanks to Anthony Fu for the great work!