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

Generated schema for eslint/max-len can be optimized #139

Closed
Shinigami92 opened this issue Oct 4, 2022 · 2 comments
Closed

Generated schema for eslint/max-len can be optimized #139

Shinigami92 opened this issue Oct 4, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@Shinigami92
Copy link
Collaborator

The generated file for eslint/max-len can be optimized.

The rule has 3 times the same pattern.
Instead of generating a config and option type, we can reuse the setting type.

@Shinigami92 Shinigami92 added the enhancement New feature or request label Oct 4, 2022
@Julien-R44
Copy link
Collaborator

Could also be done using an AST

However I wonder if it is worth it. Do you think it's really worth it to optimize this? These are auto-generated files not really made for reading, and for the end user, it doesn't change anything, he will always have the auto-completion of his types despite the interface is duplicated several times.

By introducing a method with AST to remove duplicates, it makes us more code to maintain and we risk introducing bugs.

That said, it's an interesting thing to do.

What do you think about it?

@Shinigami92
Copy link
Collaborator Author

What do you think about it?

⬇️

That said, it's an interesting thing to do.

😄

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

No branches or pull requests

2 participants