https://github.com/dethdkn/eslint-config
๐งน My Opinionated ESLint Config
https://github.com/dethdkn/eslint-config
Last synced: 11 months ago
JSON representation
๐งน My Opinionated ESLint Config
- Host: GitHub
- URL: https://github.com/dethdkn/eslint-config
- Owner: dethdkn
- License: mit
- Created: 2024-05-23T04:23:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-23T23:42:42.000Z (11 months ago)
- Last Synced: 2025-07-28T16:57:27.113Z (11 months ago)
- Language: TypeScript
- Homepage: https://eslint.rosa.dev.br
- Size: 1.01 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
@dethdkn/eslint-config
๐งน My Opinionated ESLint Config
## ๐ฆ About This Package
This is my opinionated `eslint-config`, heavily inspired by Antfu's config. This setup is a combination of the following rules:
-
HTML (hbs)
-
Javascript
-
Node
-
Import X
-
Unused Imports
-
Promise
-
Security
-
Eslint Comments
-
JSDoc
-
Antfu
-
Drizzle
-
Zod
-
Typescript
-
Stylistic
-
CSS
-
Regexp
-
Perfectionist
-
Unicorn
-
Vitest
-
Json
-
Yaml
-
Toml
-
TailwindCSS*
-
Vue*
-
vue-a11y*
-
vue-i18n*
-
Nuxt*
-
React*
-
React-i18n*
-
Next*
- And more...
*Not enabled by default
Click here to check all rules
## ๐ Setup
1. Install with your favorite package manager:
- **pnpm** : `pnpm add -D eslint @dethdkn/eslint-config`
- npm : `npm i -D eslint @dethdkn/eslint-config`
- yarn : `yarn add -D eslint @dethdkn/eslint-config`
- bun : `bun add -D eslint @dethdkn/eslint-config`
2. Create a `eslint.config.mjs` in the project root:
```js
// eslint.config.mjs
import dethdkn from '@dethdkn/eslint-config'
export default dethdkn()
```
3. Add lint scripts to `package.json`:
```json
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}
```
4. Add the following configuration to `.vscode/settings.json`:
```json
{
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{ "rule": "style/*", "severity": "off" },
{ "rule": "format/*", "severity": "off" },
{ "rule": "*-indent", "severity": "off" },
{ "rule": "*-spacing", "severity": "off" },
{ "rule": "*-spaces", "severity": "off" },
{ "rule": "*-order", "severity": "off" },
{ "rule": "*-dangle", "severity": "off" },
{ "rule": "*-newline", "severity": "off" },
{ "rule": "*quotes", "severity": "off" },
{ "rule": "*semi", "severity": "off" }
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"handlebars",
"markdown",
"json",
"jsonc",
"yaml",
"toml",
"xml",
"gql",
"graphql",
"css",
"less",
"scss",
"pcss",
"postcss"
]
}
```
## โ๏ธ Options
- `tailwind`, `vue`, `nuxt`, `vueI18n`, `react`, `next`, `reactI18n`, `autoImports` rules can be enabled:
```js
// eslint.config.mjs
import dethdkn from '@dethdkn/eslint-config'
export default dethdkn({ tailwind: true, vue: true, nuxt: true, vueI18n: true, react: true, next: true, reactI18n: true, autoImports: true })
```
## ๐ License
Copyright ยฉ 2024 [Gabriel 'DethDKN' Rosa](https://github.com/dethdkn)\
This project is under [MIT license](https://github.com/dethdkn/eslint-config/blob/main/LICENSE)