-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
38 lines (32 loc) · 1009 Bytes
/
.eslintrc.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
const fs = require('fs');
const path = require('path');
const schema = fs.readFileSync(path.join(__dirname, 'schema.graphql'), 'utf8').toString();
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'graphql/template-strings': [
'error',
{
// Import default settings for your GraphQL client. Supported values:
// 'apollo', 'relay', 'lokka', 'fraql', 'literal'
env: 'apollo',
// Import your schema JSON here
// schemaJson: require('./schema.json'),
// OR provide absolute path to your schema JSON (but not if using `eslint --cache`!)
// schemaJsonFilepath: path.resolve(__dirname, './schema.json'),
// OR provide the schema in the Schema Language format
schemaString: schema,
// tagName is gql by default
tagName: 'gql',
},
],
},
plugins: ['graphql'],
};