@andabove/eslint-config
v0.1.1
Published
ESLint config for &above projects
Downloads
116
Readme
@andabove/eslint-config
Unified shareable ESLint flat config preset for all &above Vue, Nuxt or TypeScript repositories.
It includes:
- eslint recommended Rules
- typescript-eslint Integration
- Vue Plugin
- Markdown Plugin
- Unicorn Rules
- Stylistic Rules
- Promise Plugin
- Vitest Plugin
- Vuejs Accessibility Plugin
- Tailwind Plugin
- CSS Plugin
- &above Rules
Getting Started
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-configCreate 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,
});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.tsfile:
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.mjsfile:
// @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
);Notes
- Tailwind plugin currently only offers partial support for Tailwind V4.
