-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.cjs
37 lines (37 loc) · 975 Bytes
/
eslint.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const eslintPluginAstro = require("eslint-plugin-astro");
// https://r44j.dev/blog/beginner-s-guide-to-setting-up-astro-astro-prettier-eslint-tailwind-css/
module.exports = {
extends: [
"plugin:astro/recommended",
"plugin:jsx-a11y/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
sourceType: "module",
ecmaVersion: "latest"
},
overrides: [
{
files: ["*.astro"],
parser: "astro-eslint-parser",
parserOptions: {
ecmaVersion: "latest",
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
project: "./tsconfig.json"
},
rules: {}
}
],
...eslintPluginAstro.configs["flat/recommended"],
...eslintPluginAstro.configs["jsx-a11y-recommended"],
env: {
node: true
},
rules: {
"@typescript-eslint/ban-ts-comment": "warn"
}
};