-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
54 lines (49 loc) · 1.19 KB
/
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
45
46
47
48
49
50
51
52
53
54
import pluginAstro from "eslint-plugin-astro"
import globals from "globals"
import pluginJs from "@eslint/js"
import tseslint from "typescript-eslint"
import pluginVue from "eslint-plugin-vue"
import vueParser from "vue-eslint-parser"
import tsParser from "@typescript-eslint/parser"
import eslintConfigPrettier from "eslint-config-prettier"
/** @type {import('eslint').Linter.Config[]} */
export default tseslint.config(
{
ignores: [
"**/*.d.ts",
".astro",
"src/database/seeds/*.ts",
"src/database/migrations/*.ts",
// ignore components from shadcn-vue
"src/components/ui/*",
],
},
pluginJs.configs.recommended,
// Allow triple-slash references in `*.d.ts` files.
{
files: ["**/*.d.ts"],
rules: {
"@typescript-eslint/triple-slash-reference": "off",
},
},
//Astro
...pluginAstro.configs.recommended,
{
extends: [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs["flat/recommended"],
],
files: ["*.vue", "**/*.vue"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: globals.browser,
parser: vueParser,
parserOptions: {
parser: tsParser,
},
},
},
eslintConfigPrettier
)