graphql-eslint
graphql-eslint copied to clipboard
Eslint object creation is slow
ESLint object creation (line #1) below is taking 6-8 secs approx in AWS ECS environment. There are approximately 20 Graph ql schema files. Is there a way we can fine tune the performance? Please let me know.
const eslint = await new ESLint ({
useEslintrc: false,
baseConfig: (
parser: "@graphql-eslint/eslint-plugin",
plugins: ["@graphgl-eslint"],
parserOptions: (
schema: [
/* GraphoL */
directive @key (
fields: String = ""
) on FIELD
directive @link (
DEFINITION | ENUM VALUE OBJECT,
url: String = "", import:
[String] = ["abc"]
) on FIELD DEFINITION | ENUM
VALUE | OBJECT,
type Query{
dummy: String
type Mutation{
dummy: String
}
type Product {
dummy: String
}
type schema {
dummy: String
}
`
],
},
rules: rules,
noInlineConfig: true
},
})
Please provide a reproduction repo and I take a look
@B2o5T , I have invited you to one of my test repository. Please let me know if you are able to access it.
I am using similar config.json file for my ESLint configuration in actual project. Currently I am getting error "ConfigurationNotFoundError: No ESLint configuration found in /Users/userdir/Documents/workspace/linter/graphql/chats." which I am planning to fix but just wanted to share the repo to give an idea on the configuration. Also, this repo has 3 graphql files, but in my actual usecase I have ~20 files. Please advise.
I have fixed the error, can you please take this repo and configuration as reference?
The slowness is not noticeable in local but only noticeable when running in AWS ECS environments. Please advise.
@dimaMachina , did you get a chance to look into this?