Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/typed-sigterm/eslint-config
Typed SIGTERM's ESLint Config
https://github.com/typed-sigterm/eslint-config
eslint-config
Last synced: about 1 month ago
JSON representation
Typed SIGTERM's ESLint Config
- Host: GitHub
- URL: https://github.com/typed-sigterm/eslint-config
- Owner: typed-sigterm
- License: mit
- Created: 2024-07-19T15:28:22.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-01T14:01:15.000Z (3 months ago)
- Last Synced: 2024-09-29T01:07:51.171Z (about 2 months ago)
- Topics: eslint-config
- Language: TypeScript
- Homepage: https://eslint-config.by-ts.top
- Size: 198 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Typed SIGTERM's ESLint Config
[![npm](https://img.shields.io/npm/v/@typed-sigterm/eslint-config?color=444&label=)](https://npmjs.com/package/@typed-sigterm/eslint-config) [![code style](https://img.shields.io/badge/Code_Style-Typed_SIGTERM-blue?color=3178C6&labelColor=252525)](https://github.com/typed-sigterm/eslint-config)
- Requies semi
- [1tbs-style](https://eslint.style/rules/js/brace-style#_1tbs) braces
- ... and anything else from [`@antfu/eslint-config`](https://github.com/antfu/eslint-config)!Correct example:
```ts
import process from 'node:process';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);
}
```## Usage
Install the dependency in your project:
```bash
# @antfu/eslint-config is a peer dependency, so manually installing is required
pnpm add -D @typed-sigterm/eslint-config @antfu/eslint-config
```And create `eslint.config.mjs` in your project root:
```js
import ts from '@typed-sigterm/eslint-config';export default ts();
```Add script for `package.json`:
```json
{
"scripts": {
"lint": "eslint ."
}
}
```Now you can run `pnpm lint` to lint your code.
## VS Code support (auto fix on save)
See [documentation of `@antfu/eslint-config`](https://github.com/antfu/eslint-config/blob/main/README.md#vs-code-support-auto-fix-on-save).
## Credits
The project is only a wrapper/modifier of `@antfu/eslint-config`. Thanks to [Anthony Fu](https://antfu.me/) for the great work!