Skip to content

Commit 9a7a46b

Browse files
authored
ensure graphql codeblocks in markdown doesn't contain syntax errors (#1678)
1 parent 73020e6 commit 9a7a46b

File tree

5 files changed

+614
-47
lines changed

5 files changed

+614
-47
lines changed

.eslintrc.cjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ module.exports = {
99
overrides: [
1010
{
1111
files: [`**/*.{${CODE_EXT}}`],
12+
// TODO: extract graphql documents from code files
13+
// to lint graphql documents marked with /* GraphQL */ comments inside js/ts codeblocks in markdown
14+
// processor: '@graphql-eslint/graphql',
15+
// plugins: ['@graphql-eslint'],
1216
extends: [
1317
"eslint:recommended",
1418
"plugin:@typescript-eslint/recommended",
@@ -83,5 +87,9 @@ module.exports = {
8387
"mdx/remark": "off",
8488
},
8589
},
90+
{
91+
files: ['**/*.graphql'],
92+
parser: '@graphql-eslint/eslint-plugin',
93+
},
8694
],
8795
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
"use-query-params": "^2.2.1"
6262
},
6363
"devDependencies": {
64+
"@graphql-eslint/eslint-plugin": "4.0.0-alpha.0",
6465
"@types/codemirror": "5.60.7",
6566
"@types/node": "^20.11.30",
6667
"@types/react": "^18.2.73",

0 commit comments

Comments
 (0)