PR Check / Dependency audit (pull_request) Successful in 6s
PR Check / Dockerfile lint (droast) (pull_request) Skipped
PR Check / AI code review (opencode) (pull_request) Successful in 8s
PR Check / ESLint (pull_request) Failing after 7s
PR Check / Typecheck (pull_request) Failing after 6s
PR Check / Secret scan (gitleaks) (pull_request) Failing after 1s
PR Check / Security scan (Snyk) (pull_request) Failing after 1s
- ignore generated code (.nuxt, .output, dist) - no-console/no-debugger warnings in production - enforce eqeqeq, prefer-const, no-var - Vue conventions: PascalCase templates, script-template-style order, true attribute shorthand, warn on v-html (XSS) - disable no-undef in favour of TypeScript
35 lines
1.2 KiB
JavaScript
35 lines
1.2 KiB
JavaScript
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
|
|
},
|
|
})
|