Add ESLint with @nuxt/eslint-config enforcing 4-space indentation. Add make nuxt-lint and nuxt-lint-fix targets. Add ESLint check to pre-commit hook (lint only, no auto-fix). Fix auth.vue indentation from 2 to 4 spaces. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
61 lines
1.9 KiB
JavaScript
61 lines
1.9 KiB
JavaScript
import nuxt from '@nuxt/eslint-config'
|
|
|
|
export default await nuxt(
|
|
{
|
|
features: {
|
|
stylistic: false,
|
|
typescript: true,
|
|
nuxt: {
|
|
sortConfigKeys: false,
|
|
},
|
|
},
|
|
dirs: {
|
|
root: ['.', './app'],
|
|
},
|
|
},
|
|
{
|
|
name: 'coltura/custom-overrides',
|
|
rules: {
|
|
// Indentation 4 espaces (convention CLAUDE.md)
|
|
'vue/html-indent': ['error', 4],
|
|
indent: ['error', 4, { SwitchCase: 1 }],
|
|
|
|
// Vue — relaxed
|
|
'vue/multi-word-component-names': 'off',
|
|
'vue/no-multiple-template-root': 'off',
|
|
'vue/require-default-prop': 'off',
|
|
'vue/html-self-closing': 'off',
|
|
'vue/singleline-html-element-content-newline': 'off',
|
|
'vue/multiline-html-element-content-newline': 'off',
|
|
'vue/attributes-order': 'off',
|
|
'vue/v-on-event-hyphenation': 'off',
|
|
|
|
// Console — allow console.error only
|
|
'no-console': ['warn', { allow: ['error'] }],
|
|
|
|
// Unused vars — warn, ignore underscore-prefixed
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': ['warn', {
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
caughtErrorsIgnorePattern: '^_',
|
|
}],
|
|
|
|
// TypeScript — progressive strictness
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-dynamic-delete': 'off',
|
|
'@typescript-eslint/no-invalid-void-type': 'off',
|
|
|
|
// Formatting — leave to stylistic tools
|
|
'require-await': 'off',
|
|
'comma-dangle': 'off',
|
|
curly: 'off',
|
|
semi: 'off',
|
|
quotes: 'off',
|
|
'no-trailing-spaces': 'off',
|
|
'no-multiple-empty-lines': 'off',
|
|
'no-irregular-whitespace': 'off',
|
|
},
|
|
},
|
|
)
|