@frabbit/eslint-config
v1.5.15
Published
ESLint config for @frabbit.
Downloads
190
Readme
@frabbit/eslint-config
Flat ESLint config for JavaScript, TypeScript, Vue 2, Vue 3, Prettier. based on https://github.com/sxzz/eslint-config
Features
- Format with Prettier.
- Designed to work with TypeScript, 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
Install
npm i -D @frabbit/eslint-config
Require Node.js >= 16.14.
Usage
// eslint.config.js
import { all } from '@frabbit/eslint-config'
export default all
Custom Config
import { frabbit } from '@frabbit/eslint-config'
export default frabbit(
[
/* your custom config */
],
{ vue: true, prettier: true, markdown: true, unocss: false }
)
VSCode
{
"eslint.experimental.useFlatConfig": true
}
Comparing to @antfu/eslint-config
Most of the rules are the same, but there are some differences:
- Use Prettier instead of ESLint Stylistic.
- Support both Vue 2 and Vue 3.
- Support Vue Reactivity Transform.
- More stricter rules.