-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.cjs
33 lines (32 loc) · 952 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
import tsEslintParser from "@typescript-eslint/parser";
import astroEslintParser from "astro-eslint-parser";
import eslintPluginAstro from "eslint-plugin-astro";
module.exports = [
// add more generic rule sets here, such as:
// js.configs.recommended,
...eslintPluginAstro.configs["flat/recommended"], // In CommonJS, the `flat/` prefix is required.
// ...eslintPluginAstro.configs["flat/jsx-a11y-recommended"], // In CommonJS, the `flat/` prefix is required.
// ...eslintPluginA11y.configs.recommended
{
files: ["*.astro"],
languageOptions: {
parser: astroEslintParser,
parserOptions: {
parser: tsEslintParser,
extraFileExtensions: [".astro"],
},
},
},
{
files: ["*.astro", "*.tsx"],
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
varsIgnorePattern: "^(Props|_)$",
argsIgnorePattern: "^_",
},
],
},
},
];