Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mitscherlich/eslint
My ESLint config presets
https://github.com/mitscherlich/eslint
eslint eslint-config
Last synced: 25 days ago
JSON representation
My ESLint config presets
- Host: GitHub
- URL: https://github.com/mitscherlich/eslint
- Owner: Mitscherlich
- License: mit
- Created: 2022-03-12T12:27:12.000Z (over 2 years ago)
- Default Branch: dev
- Last Pushed: 2023-06-08T15:41:25.000Z (over 1 year ago)
- Last Synced: 2024-09-24T00:03:46.575Z (about 1 month ago)
- Topics: eslint, eslint-config
- Language: JavaScript
- Homepage:
- Size: 824 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My ESLint config presets
> forked from [@antfu/eslint-config](https://github.com/antfu/eslint-config)
- Single quotes, no semi
- Auto fix for formatting (aimed to be used standalone without Prettier)
- Designed to work with TypeScript, Vue out-of-box
- Lint also for json, yaml, markdown
- Sorted imports, dangling commas
- Reasonable defaults, best practices, only one-line of config
- **Style principle**: Minimal for reading, stable for diff## Usage
### Install
```bash
pnpm add -D eslint @m9ch/eslint-config-all
```Add to your project `.eslintrc.js`:
```js
module.exports = {
extends: ['@m9ch/all'],
}
```### Config VS Code auto fix
Install [VS Code ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) and create `.vscode/settings.json`
```json
{
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
```### TypeScript Aware Rules
Type aware rules are enabled when a `tsconfig.eslint.json` is found in the project root, which will introduce some stricter rules into your project. If you want to enable it while have no `tsconfig.eslint.json` in the project root, you can change tsconfig name by modifying `ESLINT_TSCONFIG` env.
```js
// .eslintrc.js
process.env.ESLINT_TSCONFIG = 'tsconfig.json'module.exports = {
extends: ['@m9ch/all'],
}
```---
copyleft and made with :heart: by [Mitscherlich](https://githuh.com/Mitscherlich)