Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint object creation is slow #1933

Open
gituserjava opened this issue Oct 14, 2023 · 4 comments
Open

Eslint object creation is slow #1933

gituserjava opened this issue Oct 14, 2023 · 4 comments

Comments

@gituserjava
Copy link

gituserjava commented Oct 14, 2023

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
},
})
@dimaMachina
Copy link
Owner

Please provide a reproduction repo and I take a look

@gituserjava
Copy link
Author

@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.

@gituserjava
Copy link
Author

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.

@gituserjava
Copy link
Author

@dimaMachina , did you get a chance to look into this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants