Unified shareable ESLint flat config preset for all &above Vue, Nuxt or TypeScript repositories.
- eslint recommended Rules
- typescript-eslint Integration
- Vue Plugin
- TailwindCSS Plugin
- Markdown Plugin
- Unicorn Rules
- Stylistic Rules
- Oxlint Plugin
- Promise Plugin
- Security Plugin
- Vitest Plugin
- Vuejs Accessibility Plugin
- CSS Plugin
- &above Rules
By default, the preset comes with recommended rules for TypeScript, Vue and all included rule sets/plugins. All rules are accessible through the global rules
object, but for a better developer experience, both Eslint and TypeScript Esling configurations are kept global and each plugin or rule set has its own dedicated configuration object that can be customized or disabled according to your project's specific needs.
The configuration is fully type-safe, providing autocompletion and validation for all available rules across the different plugins, making it easier to maintain consistent code quality across your projects.
You can easily extend the configuration to match your coding standards while leveraging the robust foundation provided by this preset.
Installation:
pnpm install -D eslint oxlint typescript @andabove/eslint-config
Create eslint.config.mjs
in your project root:
import ab from "@andabove/eslint-config";
export default ab({
ignores: ["**/types.gen.d.ts"],
// use it for ESLint and TypeScript Eslint rules
rules: {
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "error"
},
vue: {
"vue/no-v-html": "off"
},
markdown: false,
unicorn: false,
tailwind: false
});
If being used with Nuxt Eslint module:
- Install Nuxt Eslint module:
pnpx nuxi module add eslint
pnpm add -D vite-plugin-eslint2
- Modify
nuxt.config.ts
file:
export default defineNuxtConfig({
// Other config options
eslint: {
config: {
// This is required to allow using the preset with Nuxt Eslint module
standalone: false
},
// This is required to allow checking in dev mode
// vite-plugin-eslint2 is required to allow checking in dev mode
checker: true
}
});
- Modify
eslint.config.mjs
file:
// @ts-check
import ab from "@andabove/eslint-config";
import withNuxt from "./.nuxt/eslint.config.mjs";
export default withNuxt(
ab({
// ...@andabove/eslint-config options
})
// ...your other rules
);