-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
Add eslint with prettier plugin and integrate it in preversion/release pipeline #506
Comments
why did you split it in 3 parts? |
I aimed to divide into 3 separate PRs that should be merged into each other for better granularity, but because I cannot create branches within the repository, the base branch of PR can be either |
I can explain them briefly:
|
Hi @IvanPostu I've reviewed your changes and can agree upon your request implementing typescript eslint as it would be a great enhancement improving coding-standards within the current codebase, new implementations and feature changes Regarding implementing the prettier plugin and reformatting the current codebase I'm not convinced since of the size of the project it might be a breaking change as it would be exceptionally difficult to review If typescript linting would be implemented, hardening the configuration declarations from warning to error in order to make sure implementations and feature changes follow the coding standards. This configuration hardening would need further investigation and clarification what standards should be applied, what are your thoughts about this? Which of the current options do you see as necessary to comply with coding standards? |
The problem is that there are too many changes at once. Also in the meantime there are other PRs which want to be merged. So there are many conflicts and it is very hard to keep track. Maybe we should aim for a partly config and adapt step by step. Is this possible with less effort? Also in the future we should split some of the library into better manageable parts (e.g. colors). I think the submodules are a good choice here as @danice already demonstrated with the docs. For now, I can not merge this. |
Created a new PR #534 that only introduces config changes, removed the prettier plugin for now and changed eslint config with hardening in order to produce errors instead of warnings so future builds would require to hold on to the coding standards |
… (accepts KeyboardEvent) materializecss#506
…ns of no options are defined, fixes no empty object type materializecss#506
…it any, set interval method without window materializecss#506
…ze based on given type in method call materializecss#506
…orts and for specific parameter type validation materializecss#506
I've been reviewing the latest changes added by @wuda-io, as mentioned in my review on v2.2.1 the latest changes, eg. changing the M_(Component) object to array, introduces backward compatibility issues Excerpt from version review
I've been delving into this issue lately, the most fine grained approach to introduce the revert, is to create a new version branch from v2.2.0, then introduce the #560 pull request, without changing the M_(Component) from object orientated to array, but changing the eslint |
What do you mean from object based to array based? I think we should not change from error to warning. I think we should work with arrays by default and just always parse inputs into array format. If there is an object we convert it to an array with length 1. e.g. {} => [{}], [1,2] => [1,2], 3 => [3]. But I didn't understand where you mean. The init function? |
I made the review on commit #563 I don't see any advantage of using an array as type, since the reference is basically the object itself, it might be confusing and as I mentioned it would require existing applications depending on object component call by html element to change the HTMLElement.C_ComponentName calls in the entire codebase to HTMLElement.['C_ComponentName'] The most fine grained approach would be to define correct type or otherwise create an ignore path in the eslint for the any types on HTMLElement.C_ComponentName as does not seem logical changing to array while the content of the array is an object, I also found this as an possibility during my refactoring to apply escoding standard to pass the linter, but did not apply it in the codebase for the previous mentioned reason by keeping in mind end-users do not run into errors and would require to update their codebases as wel after updating to the latest versions WDYT, should I try to find a solution for my concerns? |
Before submitting...
Context
It would be great to have a unique code style and formating and in order to achieve this we could integrate esling with prettier plugin and make it as a part of preversion/release pipeline.
Also it could be as a part of github action which runs tests.
Current Behavior
No response
Expected behavior
No response
Possible Solutions or Causes
No response
Your Environment
The text was updated successfully, but these errors were encountered: