From: Jérôme Benoit Date: Thu, 1 Aug 2024 23:44:17 +0000 (+0200) Subject: chore: cleanup eslint configuration X-Git-Tag: ocpp-server@v1.5.2~145 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=2ccb5edcb5d3501d042ae3162722e543955d2a10;p=e-mobility-charging-stations-simulator.git chore: cleanup eslint configuration Signed-off-by: Jérôme Benoit --- diff --git a/eslint.config.js b/eslint.config.js index 8ebfc14d..c675dd5a 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -35,23 +35,24 @@ export default defineFlatConfig([ }, }, }, - ...plugins['typescript-eslint'] - .config( - ...plugins['typescript-eslint'].configs.strictTypeChecked, - ...plugins['typescript-eslint'].configs.stylisticTypeChecked - ) - .map(config => { - return { files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', '*/**.vue'], ...config } - }), - { - files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'], - languageOptions: { - parserOptions: { - projectService: true, - tsconfigRootDir: import.meta.dirname, - }, + ...plugins['typescript-eslint'].config( + { + files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', '*/**.vue'], + extends: [ + ...plugins['typescript-eslint'].configs.strictTypeChecked, + ...plugins['typescript-eslint'].configs.stylisticTypeChecked, + ], }, - }, + { + files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'], + languageOptions: { + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + } + ), { files: ['**/*.js', '**/*.mjs', '**/*.cjs'], ...plugins['typescript-eslint'].configs.disableTypeChecked,