1.4.2 • Published 5 months ago
@ilyasemenov/eslint-config v1.4.2
@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-configCreate eslint.config.js:
// @ts-check
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 lintSetup lint-staged
Create lint-staged.config.js:
export default {
"*.{cjs,js,ts,json,md,yaml,toml}": "eslint --fix"
}