@addon24/eslint-config
Version:
ESLint configuration rules for WorldOfTextcraft projects - Centralized configuration for all project types
49 lines (44 loc) • 1.3 kB
JavaScript
/**
* Dead Code Detection Rules für Frontend/Admin
*
* Diese Regeln erkennen und verhindern toten Code in Frontend-Anwendungen
*/
export default {
rules: {
// Import/Export Dead Code Detection - deaktiviert wegen Flat Config Kompatibilität
// "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.*"
// ]
// }],
// Ungenutzte Variablen und Funktionen
"@typescript-eslint/no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}],
// Ungenutzte private Klassen-Member
"no-unused-private-class-members": "error",
// Unreachable Code Detection
"no-unreachable": "error",
"no-unreachable-loop": "error",
// Unused Expressions
"@typescript-eslint/no-unused-expressions": ["error", {
"allowShortCircuit": true,
"allowTernary": true,
"allowTaggedTemplates": true
}],
}
};