From ae555b3e9687c96b9f61388d8f53a438ed7f5fe9 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 21 Jun 2024 20:46:12 +1200 Subject: [PATCH] update eslint --- eslint.config.cjs | 6 +++++- tsconfig.json | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/eslint.config.cjs b/eslint.config.cjs index 70eeca6..17d5961 100644 --- a/eslint.config.cjs +++ b/eslint.config.cjs @@ -1,4 +1,5 @@ const eslintPluginAstro = require("eslint-plugin-astro"); +const eslintTypeScriptParser = require("@typescript-eslint/parser"); const eslintConfigPrettier = require("eslint-config-prettier"); const jsxA11y = require("eslint-plugin-jsx-a11y"); @@ -7,7 +8,10 @@ module.exports = [ ...eslintPluginAstro.configs["flat/recommended"], eslintConfigPrettier, { - files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.astro"], + languageOptions: { + parser: eslintTypeScriptParser, + }, + files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"], plugins: { "jsx-a11y": jsxA11y, }, diff --git a/tsconfig.json b/tsconfig.json index d43fa06..e7b9e78 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,14 @@ { "extends": "astro/tsconfigs/strict", "compilerOptions": { + "moduleResolution": "Node", "jsx": "react-jsx", "jsxImportSource": "react", "baseUrl": ".", "paths": { - "@/*": ["src/*"], - }, + "@/*": ["src/*"] + } }, "include": ["**/*.ts", "**/*.tsx", "**/*.astro"], "exclude": ["node_modules"] -} \ No newline at end of file +}