From e976638f13a5b74a25c91af8314bfbe5ba465afd Mon Sep 17 00:00:00 2001 From: Rikki Schulte Date: Tue, 9 Jan 2024 04:43:03 +0100 Subject: [PATCH] eslint ignore --- .eslintignore | 1 + .eslintrc.js | 1 + .../tests/__fixtures__/test-js.md | 4 ++-- .../markdown-grammar.spec.ts.snap | 22 ++++++++++++++----- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.eslintignore b/.eslintignore index b248138fd9b..ac46f475f89 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,4 @@ working-group/ packages/codemirror-graphql/src/__tests__/schema-kitchen-sink.graphql CHANGELOG.md **/CHANGELOG.md +packages/vscode-graphql-syntax/tests/__fixtures__/ diff --git a/.eslintrc.js b/.eslintrc.js index 7e526a628b9..f9f7e78023c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,7 @@ module.exports = { 'changesets/**/*.md', '**/CHANGELOG.md', 'functions/*', + 'packages/vscode-graphql-syntax/tests/__fixtures__/*', ], overrides: [ { diff --git a/packages/vscode-graphql-syntax/tests/__fixtures__/test-js.md b/packages/vscode-graphql-syntax/tests/__fixtures__/test-js.md index 4db0a63d298..ebdefd3a715 100644 --- a/packages/vscode-graphql-syntax/tests/__fixtures__/test-js.md +++ b/packages/vscode-graphql-syntax/tests/__fixtures__/test-js.md @@ -3,9 +3,9 @@ ```js const variable = 1; -graphql` +const query = graphql` query { - something + something(arg: ${variable}) } `; ``` diff --git a/packages/vscode-graphql-syntax/tests/__snapshots__/markdown-grammar.spec.ts.snap b/packages/vscode-graphql-syntax/tests/__snapshots__/markdown-grammar.spec.ts.snap index 1255054b661..e99db63c32b 100644 --- a/packages/vscode-graphql-syntax/tests/__snapshots__/markdown-grammar.spec.ts.snap +++ b/packages/vscode-graphql-syntax/tests/__snapshots__/markdown-grammar.spec.ts.snap @@ -74,7 +74,9 @@ exports[`inline.graphql.markdown.codeblock grammar js > should tokenize a markdo | \`\`\` | punctuation.definition.markdown js | fenced_code.block.language.markdown -const var = 1; | markup.fenced_code.block.javascript meta.embedded.block.javascript +const variable = 1; | markup.fenced_code.block.javascript meta.embedded.block.javascript + | markup.fenced_code.block.javascript meta.embedded.block.javascript +const query = | markup.fenced_code.block.javascript meta.embedded.block.javascript | markup.fenced_code.block.javascript meta.embedded.block.javascript graphql | markup.fenced_code.block.javascript meta.embedded.block.javascript entity.name.function.tagged-template.js \` | markup.fenced_code.block.javascript meta.embedded.block.javascript punctuation.definition.string.template.begin.js @@ -84,14 +86,23 @@ query | markup.fenced_code.block. { | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql something | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql variable.graphql +( | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql +arg | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql variable.parameter.graphql +: | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql + $ | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql +{ | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.objectvalues.graphql meta.brace.curly.graphql +variable | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.objectvalues.graphql constant.character.enum.graphql +} | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.objectvalues.graphql meta.brace.curly.graphql +) | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql } | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql \` | markup.fenced_code.block.javascript meta.embedded.block.javascript punctuation.definition.string.template.end.js +; | markup.fenced_code.block.javascript meta.embedded.block.javascript \`\`\` | punctuation.definition.markdown | \`\`\` | punctuation.definition.markdown tsx | fenced_code.block.language.markdown -const var: number = 1; | markup.fenced_code.block.javascript meta.embedded.block.javascript +const variable: number = 1; | markup.fenced_code.block.javascript meta.embedded.block.javascript | markup.fenced_code.block.javascript meta.embedded.block.javascript graphql | markup.fenced_code.block.javascript meta.embedded.block.javascript entity.name.function.tagged-template.js \` | markup.fenced_code.block.javascript meta.embedded.block.javascript punctuation.definition.string.template.begin.js @@ -106,15 +117,16 @@ variable | markup.fenced_code.block. : | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql punctuation.colon.graphql $ | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql { | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.objectvalues.graphql meta.brace.curly.graphql -var | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.objectvalues.graphql constant.character.enum.graphql +variable | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.objectvalues.graphql constant.character.enum.graphql } | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.objectvalues.graphql meta.brace.curly.graphql ) | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql meta.arguments.graphql meta.brace.round.directive.graphql | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql } | markup.fenced_code.block.javascript meta.embedded.block.javascript meta.embedded.block.graphql meta.selectionset.graphql punctuation.operation.graphql \` | markup.fenced_code.block.javascript meta.embedded.block.javascript punctuation.definition.string.template.end.js +; | markup.fenced_code.block.javascript meta.embedded.block.javascript const Component = () => { | markup.fenced_code.block.javascript meta.embedded.block.javascript - return
| markup.fenced_code.block.javascript meta.embedded.block.javascript -} | markup.fenced_code.block.javascript meta.embedded.block.javascript + return
; | markup.fenced_code.block.javascript meta.embedded.block.javascript +}; | markup.fenced_code.block.javascript meta.embedded.block.javascript \`\`\` | punctuation.definition.markdown | ### TODO: svelte |