-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
47 lines (46 loc) · 1.3 KB
/
eslint.config.mjs
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
38
39
40
41
42
43
44
45
46
47
import astroEslintParser from "astro-eslint-parser";
import typescriptEslintParser from "@typescript-eslint/parser";
import typescriptEslintPlugin from "@typescript-eslint/eslint-plugin";
import eslintPluginAstro from "eslint-plugin-astro";
export default [
{
files: ["src/**/*.{js,ts,astro}"],
rules: {
"@typescript-eslint/triple-slash-reference": "off",
},
},
{
files: ["src/**/*.astro"],
languageOptions: {
parser: astroEslintParser,
parserOptions: {
parser: typescriptEslintParser,
ecmaVersion: 2022,
sourceType: "module",
extraFileExtensions: [".astro"],
},
},
},
{
files: ["src/**/*.{js,ts}"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
parser: typescriptEslintParser,
},
plugins: {
"@typescript-eslint": typescriptEslintPlugin,
astro: eslintPluginAstro,
},
env: {
browser: true,
node: true,
es6: true,
},
extends: [
"eslint:recommended",
"plugin:astro/recommended",
"plugin:@typescript-eslint/recommended",
],
},
];