-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
44 lines (44 loc) · 1018 Bytes
/
eslint.config.js
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
import eslintPluginAstro from "eslint-plugin-astro";
import tseslint from "typescript-eslint";
import astroEslintParser from "astro-eslint-parser";
import globals from "globals";
import js from "@eslint/js";
import typescriptParser from "@typescript-eslint/parser";
export default [
js.configs.recommended,
...eslintPluginAstro.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ["**/*.astro"],
languageOptions: {
parser: astroEslintParser,
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
},
},
{
files: ["**/*.{js,jsx,astro}"],
rules: {
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
},
},
{
files: ["**/*.{ts,tsx}", "**/*.astro/*.js"],
languageOptions: {
parser: typescriptParser,
},
},
{
ignores: [".astro/**", "dist/**"],
},
];