-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.js
47 lines (46 loc) · 1.17 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
import globals from "globals"
import jsPlugin from "@eslint/js"
import tsPlugin from "typescript-eslint"
import prettierPlugin from "eslint-plugin-prettier/recommended"
import vuePlugin from "eslint-plugin-vue"
import * as graphqlPlugin from "@graphql-eslint/eslint-plugin"
export default tsPlugin.config(
jsPlugin.configs.recommended,
...tsPlugin.configs.recommended,
...vuePlugin.configs["flat/recommended"],
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
Prism: "readonly"
}
},
plugins: {
"@graphql-eslint": graphqlPlugin
}
},
{
files: ["*.vue", "**/*.vue"],
languageOptions: {
parserOptions: {
parser: tsPlugin.parser
}
}
},
// {
// // Setup recommended config for schema files
// files: [SCHEMA_PATH],
// ...graphqlPlugin.flatConfigs['schema-recommended'],
// },
{
// Setup recommended config for operations files
files: ["src/**/*.{graphql,gql}"],
...graphqlPlugin.flatConfigs["operations-recommended"]
},
{
ignores: ["_playground/**", "dist/**/*.js", "public/**/*.js"]
},
prettierPlugin
)