@addon24/eslint-config
Version:
ESLint configuration rules for WorldOfTextcraft projects - Centralized configuration for all project types
72 lines (61 loc) • 1.86 kB
JavaScript
export default {
rules: {
// Ungenutzte Variablen und Imports
"@typescript-eslint/no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_"
}],
// React-spezifische Dead Code Detection
"react/jsx-no-useless-fragment": ["error", {
"allowExpressions": true
}],
// Ungenutzte private Klassenmember
"no-unused-private-class-members": "error",
// Ungenutzte Labels
"no-unused-labels": "error",
// Ungenutzte Expressions
"no-unused-expressions": ["error", {
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}],
// Import/Export Dead Code Detection
"import/no-unused-modules": ["error", {
"missingExports": true,
"unusedExports": true,
"ignoreExports": [
"src/main.tsx",
"src/App.tsx",
"src/AppRouter.tsx",
"src/vite-env.d.ts",
"**/*.d.ts",
"**/test/**",
"**/tests/**",
"**/*.test.*",
"**/*.spec.*"
]
}],
// Typescript-spezifische Dead Code Rules
"@typescript-eslint/no-unused-expressions": ["error", {
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}],
// Ungenutzte Importe
"import/no-duplicates": "error",
"import/no-useless-path-segments": "error",
// Unreachable Code
"no-unreachable": "error",
"no-unreachable-loop": "error",
// Dead Stores
"no-self-assign": "error",
"no-self-compare": "error",
// React-Hooks-Regel wird nur in React-Konfigurationen gesetzt
// Material-UI spezifische Regeln
"mui-unused-classes": "off" // Custom rule falls verfügbar
}
};