Parsing error: Loader Url has no sync mode
See original GitHub issueHi. I was trying out this eslint plugin today and I am facing this error in all my GQL files both when linting via the CLI as well as the VSCode extension.
This error is thrown for every GQL file I use.
I tried to isolate the problem by removing all other eslint rules and just having this plugin around and still had this issue.
My graphql-config
is configured correctly cause both the codegen and the VSCode GraphQL extension which uses it are working correctly. I am using multiple projects with both remote and local schema which works well with codegen and extension.
I also noticed other people reporting similar error but with apollo eslint rather:
https://github.com/apollographql/eslint-plugin-graphql/issues/287 https://github.com/apollographql/eslint-plugin-graphql/issues/270#issuecomment-700032602
Any clues? Thanks.
My .eslintrc
file:
{
"overrides": [
{
"files": ["*.gql"],
"parser": "@graphql-eslint/eslint-plugin",
"plugins": ["@graphql-eslint"],
"rules": {
"avoid-operation-name-prefix": [
"error",
{ "keywords": "get" }
],
"input-name": [
"error",
{ "checkInputType": true }
],
"description-style": [
"error",
{ "style": "block" }
],
"naming-convention": [
"error",
{
"FieldDefinition": "camelCase",
"ObjectTypeDefinition": "PascalCase"
}
],
"no-anonymous-operations": ["error"],
"require-deprecation-reason": "error",
"no-case-insensitive-enum-values-duplicates": ["error"],
"no-operation-name-suffix": ["error"],
"require-id-when-available": ["error",
{
"fieldName": "id"
}
],
"validate-against-schema": ["error"],
"require-description": [
"error",
{ "on": ["ObjectTypeDefinition", "FieldDefinition"] }
]
}
}
]
}
My package.json
"name":"...",
"version":"...",
"scripts": {
"lint": "eslint --ext=.gql ./packages",
}
"devDependencies": {
"@graphql-codegen/add": "^2.0.1",
"@graphql-codegen/cli": "^1.17.10",
"@graphql-codegen/typed-document-node": "^1.17.9",
"@graphql-codegen/typescript": "^1.17.10",
"@graphql-codegen/typescript-operations": "^1.17.8",
"@graphql-codegen/typescript-resolvers": "^1.17.10",
"@graphql-eslint/eslint-plugin": "^0.4.1",
"@graphql-typed-document-node/core": "^3.1.0",
"@types/body-parser": "^1.19.0",
"@types/express": "^4.17.8",
"@types/node": "^14.11.8",
"@types/qs": "6.9.5",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"concurrently": "^5.3.0",
"eslint": "^7.11.0",
"globby": "^11.0.1",
"morgan": "^1.10.0",
"nodemon": "^2.0.5",
"plop": "^2.7.4",
"rimraf": "^3.0.2",
"typedoc": "^0.19.2",
"typescript": "4.0.3",
"utility-types": "^3.10.0"
},
"dependencies": {
"graphql": "^15.4.0",
"graphql-modules": "^1.0.0-alpha.2"
}
CC: @dotansimha
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (2 by maintainers)
Top GitHub Comments
@dotansimha @ardatan Perfect! This works great. Just tested it out. You can close this.
@dotansimha Sure. Will check and report back in 10 minutes.