https://github.com/magicdawn/eslint-config
eslint-config for self use
https://github.com/magicdawn/eslint-config
Last synced: 3 months ago
JSON representation
eslint-config for self use
- Host: GitHub
- URL: https://github.com/magicdawn/eslint-config
- Owner: magicdawn
- License: mit
- Created: 2019-06-27T11:23:01.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2026-04-16T06:13:53.000Z (3 months ago)
- Last Synced: 2026-04-16T08:28:13.964Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 498 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @magicdawn/eslint-config
> eslint-config for self use
[](https://www.npmjs.com/package/@magicdawn/eslint-config)
[](https://www.npmjs.com/package/@magicdawn/eslint-config)
[](http://magicdawn.mit-license.org)
## Install
```sh
$ pnpm add -D @magicdawn/eslint-config
```
## Usage
### extend from [@sxzz/eslint-config](https://github.com/sxzz/eslint-config)
```ts
import { fromSxzz } from '@magicdawn/eslint-config'
export default fromSxzz()
```
### from ground to up
```ts
import { defineConfig } from 'eslint/config'
import { groundToUpConfigs } from '@magicdawn/eslint-config'
export default defineConfig([
...groundToUpConfigs,
// more configs
])
```
## Extra Setup
### `.vscode/settings.json`
```json
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
```
### `package.json`
```json
{
"lint-staged": {
// eslint+prettier on js,json,yaml
"*.{?(c|m)(j|t)s?(x),json,y?(a)ml}": ["eslint --fix", "prettier --write"],
"!*.{?(c|m)(j|t)s?(x),json,y?(a)ml}": ["prettier --write --ignore-unknown"],
// or more aggressive
"*": ["eslint --fix --no-warn-ignored", "prettier --write --ignore-unknown"]
}
}
```
### `.prettierignore`
```gitignore
# contents not in .gitignore
pnpm-lock.yaml
```
## License
the MIT License http://magicdawn.mit-license.org