Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dashbrains/eslint-config
Eslint configuration used by DashBrains
https://github.com/dashbrains/eslint-config
eslint eslint-config prettier prettier-config react typescript
Last synced: about 5 hours ago
JSON representation
Eslint configuration used by DashBrains
- Host: GitHub
- URL: https://github.com/dashbrains/eslint-config
- Owner: DashBrains
- License: mit
- Created: 2023-04-29T06:08:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-10T01:22:44.000Z (7 months ago)
- Last Synced: 2024-04-10T04:08:38.266Z (7 months ago)
- Topics: eslint, eslint-config, prettier, prettier-config, react, typescript
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@dashbrains/eslint-config
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @dashbrains/eslint-config
[![npm](https://img.shields.io/npm/v/@dashbrains/eslint-config?color=a1b858&label=)](https://www.npmjs.com/package/@dashbrains/eslint-config)
- Single quotes, no semi
- Auto fix for formatting
- Designed to work with TypeScript, React out-of-box
- 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 @dashbrains/eslint-config
```### Config `.eslintrc`
```json
{
"extends": "@dashbrains/eslint-config"
}
```### Add script for package.json
For example:
```json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
```### 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": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
```### Prettier
If you want to apply formatting with prettier, you can add the following to your `.prettierrc`:
```json
{
"singleQuote": true,
"tabWidth": 2,
"semi": false
}
```and then
```bash
npm i -D prettier
```## FAQ
### I prefer XXX...
Sure, you can override the rules in your `.eslintrc` file.
```jsonc
{
"extends": "@dashbrains/eslint-config",
"rules": {
// your rules...
}
}
```Or you can always fork this repo and make your own.
## License
[MIT](./LICENSE) License © 2019-PRESENT [DashBrains](https://github.com/dashbrains)