Skip to content

Commit

Permalink
update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexnguyennz committed Jun 21, 2024
1 parent 0cbd4d2 commit ae555b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -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");

Expand All @@ -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,
},
Expand Down
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -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"]
}
}

0 comments on commit ae555b3

Please sign in to comment.