Based on @sxzz/eslint-config
Flat ESLint config for JavaScript, TypeScript, Vue 2, Vue 3, React, Prettier.
- Format with Prettier.
- Designed to work with TypeScript, React, Vue 2 and 3 out-of-box.
- Support JSON(5), YAML, Markdown...
- Sort imports,
package.json
,tsconfig.json
... - ESLint Flat config, compose easily!
- Reasonable defaults, best practices, only one-line of config
npm i -D @sunshj/eslint-config
Require Node.js >= 18.18. ESLint v9.5.0+
// eslint.config.js
import { all } from '@sunshj/eslint-config'
export default all
import { defineConfig } from '@sunshj/eslint-config'
export default defineConfig(
[
/* your custom config */
],
{ vue: true, prettier: true, markdown: true, unocss: false, react: true }
)
{
"eslint.experimental.useFlatConfig": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
}