@daleal/eslint-config-vue
v0.1.6
Published
daleal's opinionated ESLint flat config for Vue + TypeScript projects
Downloads
849
Readme
@daleal/eslint-config-vue
Opinionated ESLint flat config for Vue + TypeScript projects, tuned for the way daleal likes imports, style rules, and type-aware linting.
Install
bun add -D @daleal/eslint-config-vue eslint typescriptUsage
// eslint.config.mjs
import { eslint } from '@daleal/eslint-config-vue';
export default eslint();By default, the app expects ~ to be the only shorthand, but you can override it:
// eslint.config.mjs
import { eslint } from '@daleal/eslint-config-vue';
export default eslint({
shorthands: ['~', '#'],
});You can also pass other flat configs using the overrides option:
// eslint.config.mjs
import { eslint } from '@daleal/eslint-config-vue';
export default eslint({
shorthands: ['@'],
overrides: [
{
rules: {
'no-console': 'off',
},
},
],
});With Nuxt
Set eslint.config.standalone to false in nuxt.config.ts, otherwise Nuxt will generate its own standalone config and this preset will not be merged in correctly.
// nuxt.config.ts
export default defineNuxtConfig({
eslint: {
config: {
standalone: false,
},
},
});// eslint.config.mjs
import { eslint } from '@daleal/eslint-config-vue';
import withNuxt from './.nuxt/eslint.config.mjs';
export default withNuxt(
...eslint(),
);Options
shorthands?: string[]default['~']overrides?: Linter.Config | Linter.Config[]
