From d680c721e21e6ce513135a2edb87309bcfc77b83 Mon Sep 17 00:00:00 2001 From: Matthew Scharley Date: Mon, 7 Oct 2024 13:30:17 +1100 Subject: [PATCH] fix: typescript project detection issue --- .changeset/mighty-birds-do.md | 5 +++++ presets/eslint/rules/typescript.js | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .changeset/mighty-birds-do.md diff --git a/.changeset/mighty-birds-do.md b/.changeset/mighty-birds-do.md new file mode 100644 index 00000000..65970ee7 --- /dev/null +++ b/.changeset/mighty-birds-do.md @@ -0,0 +1,5 @@ +--- +'@mscharley/eslint-config': patch +--- + +Fix an issue with detecting typescript projects diff --git a/presets/eslint/rules/typescript.js b/presets/eslint/rules/typescript.js index d3fbdee7..00e3dd5a 100644 --- a/presets/eslint/rules/typescript.js +++ b/presets/eslint/rules/typescript.js @@ -4,14 +4,16 @@ import { configs as tseslint } from 'typescript-eslint'; export default [ ...tseslint.recommendedTypeChecked, { - files: [ - '**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', - ], languageOptions: { parserOptions: { projectService: true, }, }, + }, + { + files: [ + '**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', + ], rules: { '@typescript-eslint/no-deprecated': 'warn', '@typescript-eslint/array-type': [