@ilyasemenov/eslint-config
v1.1.0
Published
Opinionated ESLint config on top of @antfu/eslint-config
Downloads
246
Readme
@ilyasemenov/eslint-config
This is a reusable ESLint config that I use in the projects that I develop or supervise.
Extends @antfu/eslint-config.
Could be used together with Stylelint config, see IlyaSemenov/lint-config.
Setup
Install:
pnpm add -D eslint @ilyasemenov/eslint-config
Create eslint.config.js
:
import { defineConfig } from "@ilyasemenov/eslint-config"
export default defineConfig()
Available options:
export default defineConfig({
// Lint Vue. Unlike antfu, must be enabled explicitly.
vue: true,
// Lint pug in Vue templates.
vuePug: true,
// ...and all @antfu/eslint-config options.
})
Command line script
Add to package.json
:
{
"scripts": {
"lint": "eslint --fix"
}
}
and run:
pnpm lint
Setup lint-staged
Create lint-staged.config.js
:
export default {
"*.{cjs,js,ts,json,md,yaml,toml}": "eslint --fix"
}