import { withNuxt } from './.nuxt/eslint.config.mjs' export default withNuxt({ // Files ESLint should never look at (generated code & build output) ignores: [ '.nuxt/**', '.output/**', 'node_modules/**', 'dist/**', '.data/**', ], rules: { // ---------- general ---------- 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', eqeqeq: ['error', 'always'], 'prefer-const': 'error', 'no-var': 'error', 'object-shorthand': ['warn', 'always'], // ---------- vue ---------- // Keep components consistent and catch template bugs early 'vue/multi-word-component-names': 'off', // pages/index.vue etc. are fine 'vue/component-name-in-template-casing': ['warn', 'PascalCase'], 'vue/no-unused-refs': 'error', 'vue/prefer-true-attribute-shorthand': 'warn', 'vue/block-order': ['error', { order: ['script', 'template', 'style'] }], 'vue/no-v-html': 'warn', // XSS risk unless content is sanitized // ---------- typescript-ish (via vue-tsc + nuxt defaults) ---------- 'no-undef': 'off', // TS handles this; avoids false positives on Nuxt auto-imports }, })