Skip to content

Commit e59c13f

Browse files
authored
Update eslint.config.js
1 parent 7ed84b3 commit e59c13f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/vue-code-file/eslint.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ export default [
1313
...pluginVue.configs['flat/recommended'],
1414
{
1515
files: ['**/*.vue'],
16-
// `eslint-plugin-vue` will set a default processor for `.vue` files
17-
// we use `eslint-merge-processors` to extend it
16+
// Vue still needs to be parsed by the Vue parser for normal linting. But GraphQL's lint needs to lint only the JS/TS part,
17+
// so extract those as blocks using eslint-processor-vue-blocks. This turns the script parts of Vue SFCs into virtual JS/TS
18+
// blocks inside ESLint. ESLint can then parse the JS/TS to find GraphQL parts. And finally, graphql-eslint can lint the resulting GraphQL
1819
processor: mergeProcessors([
1920
pluginVue.processors.vue,
2021
processorVueBlocks({

0 commit comments

Comments
 (0)