Files
Inventory/eslint.config.mjs
Matthieu 8700c253cd chore(lint): enable strict ESLint rules and fix unused-vars violations (F4.1)
Enable no-console (warn, allow error), @typescript-eslint/no-unused-vars
(warn, ignore _ prefix), and @typescript-eslint/no-explicit-any (warn).
Fix all 26 no-unused-vars violations across 9 files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:19:56 +01:00

84 lines
2.1 KiB
JavaScript

import nuxt from '@nuxt/eslint-config';
const globals = {
defineNuxtConfig: 'readonly',
defineNuxtRouteMiddleware: 'readonly',
navigateTo: 'readonly',
useRuntimeConfig: 'readonly',
$fetch: 'readonly',
};
const relaxedRules = {
// Vue rules — relaxed for legacy code
'vue/no-parsing-error': 'off',
'vue/no-required-prop-with-default': 'off',
'vue/no-mutating-props': 'off',
'vue/html-self-closing': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/html-indent': 'off',
'vue/attributes-order': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-multiple-template-root': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/require-default-prop': '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',
'@typescript-eslint/unified-signatures': 'off',
// Formatting — handled by Prettier/stylistic
'require-await': 'off',
'comma-dangle': 'off',
curly: 'off',
'operator-linebreak': 'off',
'space-before-function-paren': 'off',
'arrow-parens': 'off',
semi: 'off',
'@typescript-eslint/semi': 'off',
quotes: 'off',
'func-call-spacing': 'off',
'no-trailing-spaces': 'off',
indent: 'off',
'no-multiple-empty-lines': 'off',
'import/order': 'off',
'no-irregular-whitespace': 'off',
'no-useless-escape': 'off',
'nuxt/prefer-import-meta': 'off',
};
export default await nuxt(
{
features: {
stylistic: false,
typescript: true,
nuxt: {
sortConfigKeys: false,
},
},
dirs: {
root: ['.', './app'],
},
},
{
name: 'project/custom-overrides',
languageOptions: {
globals,
},
rules: relaxedRules,
}
);