// @ts-check import eslint from '@eslint/js'; import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; import eslintPluginSecurity from 'eslint-plugin-security'; import globals from 'globals'; import tseslint from 'typescript-eslint'; export default tseslint.config( { ignores: ['eslint.config.mjs'], }, eslint.configs.recommended, ...tseslint.configs.recommendedTypeChecked, eslintPluginSecurity.configs.recommended, eslintPluginPrettierRecommended, { languageOptions: { globals: { ...globals.node, ...globals.jest, }, sourceType: 'commonjs', parserOptions: { projectService: true, tsconfigRootDir: import.meta.dirname, }, }, }, { rules: { // CLAUDE.md interdit tout `any`, explicite ou implicite, et toute promesse non geree : // contrairement au defaut de @nestjs/schematics, ces deux regles restent des erreurs ici. '@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/no-floating-promises': 'error', '@typescript-eslint/no-unsafe-argument': 'warn', 'no-console': ['warn', { allow: ['warn', 'error'] }], 'security/detect-object-injection': 'error', 'prettier/prettier': ['error', { endOfLine: 'auto' }], }, }, );