Ziya/eslint.config.mjs
rizary 6efcf43691
feat: complete ESLint configuration overhaul and theme system improvements
- Migrate from legacy .eslintrc.json to modern flat config system
- Remove conflicting ESLint configuration files
- Fix auto-generation of eslint.config.mjs by Nuxt
- Update ESLint rules to use single quotes and proper formatting
- Add comprehensive theme switching system with 24 palettes
- Implement proper daisyUI theme integration
- Add theme store with persistence and dark/light mode support
- Create ThemeSwitcher component with enhanced UI
- Fix package.json scripts to work with new ESLint flat config
- Update VS Code settings for proper ESLint integration
- Add changelogen scripts for proper changelog management

BREAKING CHANGE: ESLint configuration migrated to flat config system
2025-06-22 00:53:24 +07:00

55 lines
2 KiB
JavaScript

// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs';
export default withNuxt({
files: ['**/*.vue', '**/*.js', '**/*.ts', '**/*.mjs'],
ignores: [
'node_modules/**',
'dist/**',
'.nuxt/**',
'.output/**',
'.vite/**',
'.*/**',
],
rules: {
// Code quality rules
'camelcase': ['error', { properties: 'never', ignoreDestructuring: true }],
'no-console': ['error', { allow: ['info', 'warn', 'error'] }],
'sort-imports': ['error', { ignoreDeclarationSort: true }],
// Stylistic rules (using @stylistic)
'@stylistic/indent': ['error', 2, { SwitchCase: 1 }],
'@stylistic/linebreak-style': 'off',
'@stylistic/quotes': ['error', 'single'],
'@stylistic/semi': ['error', 'always'],
'@stylistic/no-extra-semi': 'error',
'@stylistic/comma-dangle': ['error', 'always-multiline'],
'@stylistic/space-before-function-paren': ['error', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always',
}],
'@stylistic/multiline-ternary': ['error', 'never'],
'@stylistic/member-delimiter-style': ['error', {
multiline: { delimiter: 'semi' },
singleline: { delimiter: 'comma' },
}],
'@stylistic/arrow-spacing': ['error', { before: true, after: true }],
'@stylistic/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
'@stylistic/no-multi-spaces': 'error',
'@stylistic/space-before-blocks': 'error',
'@stylistic/no-trailing-spaces': 'error',
// Nuxt specific rules
'nuxt/prefer-import-meta': 'error',
// Vue specific rules
'vue/first-attribute-linebreak': ['error', { singleline: 'ignore', multiline: 'ignore' }],
'vue/max-attributes-per-line': ['error', { singleline: 100 }],
'vue/singleline-html-element-content-newline': ['off'],
'vue/no-multiple-template-root': ['off'],
'vue/html-closing-bracket-spacing': ['error', { selfClosingTag: 'always' }],
'vue/html-indent': ['error', 2],
'vue/multiline-html-element-content-newline': ['error', { ignores: [] }],
},
});