Why
In the following .eslintrc, use yarn eslint . /src will work, but yarn frolint -branch master -bail will raise an error.
.eslintrc
{
"overrides": [
{
"files": [
"*.tsx",
"*.ts"
],
"extends": "wantedly-typescript",
"parserOptions": {
"project": [
"./tsconfig.json",
"./tsconfig.eslint.json"
]
}
},
{
"files": [
"*.tsx",
"*.ts"
],
"processor": "@graphql-eslint/graphql"
},
{
"files": [
"./src/profile/components/profile/Sidebar/RelatedUsers/**/*.graphql"
],
"parser": "@graphql-eslint/eslint-plugin",
"parserOptions": {
"schema": "./graphql-gateway-schema.json"
},
"plugins": [
"@graphql-eslint"
],
"rules": {
"@graphql-eslint/fields-on-correct-type": [
"error"
]
}
}
]
}
Internal Error: Error while loading rule '@typescript-eslint/no-floating-promises': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.
Occurred while linting /path/to/project/src/path/to/Component.tsx/0_document.graphql
What
Why
In the following
.eslintrc, useyarn eslint . /srcwill work, butyarn frolint -branch master -bailwill raise an error..eslintrc
{ "overrides": [ { "files": [ "*.tsx", "*.ts" ], "extends": "wantedly-typescript", "parserOptions": { "project": [ "./tsconfig.json", "./tsconfig.eslint.json" ] } }, { "files": [ "*.tsx", "*.ts" ], "processor": "@graphql-eslint/graphql" }, { "files": [ "./src/profile/components/profile/Sidebar/RelatedUsers/**/*.graphql" ], "parser": "@graphql-eslint/eslint-plugin", "parserOptions": { "schema": "./graphql-gateway-schema.json" }, "plugins": [ "@graphql-eslint" ], "rules": { "@graphql-eslint/fields-on-correct-type": [ "error" ] } } ] }What