materializecss / materialize

Materialize, a web framework based on Material Design
https://materializeweb.com/
MIT License
888 stars 103 forks source link

Style guidelines #79

Closed ChildishGiant closed 1 week ago

ChildishGiant commented 3 years ago

Currently the project has a basic .eslintrc set up but I think it'd make contributing easier and more consistent if we opted to use js standard style. Many projects (including npm, GitHub and the UK government) use this style

wuda-io commented 3 years ago

From my point of view this is ok. What are the risks? Is it possible that some parts are not working then or is it just the style-formating of the code?

ChildishGiant commented 3 years ago

Most of the rules can be automatically fixed (and there's a very simple option to autofix everything). Some things cannot and would be highlight and need manually fixing (not too difficult)

ChildishGiant commented 3 years ago

If we did our best to use conventional commit style that'd be a great help to future releases as changelogs could then be automatically generated. There are many tools for enforcing/suggesting this and also for making writing these commits as easy as possible.

DanielRuf commented 3 years ago

If we did our best to use conventional commit style that'd be a great help to future releases as changelogs could then be automatically generated. There are many tools for enforcing/suggesting this and also for making writing these commits as easy as possible.

Should we apply commitlint using https://www.npmjs.com/package/husky?

ChildishGiant commented 3 years ago

The issue is about code style, not just commit style, I don't think it can be closed yet.

wuda-io commented 1 year ago

Can we close it now? The conventional commit style is now enforced via Husky. Please confirm and/or close.

LoganTann commented 1 year ago

Can we close it now? The conventional commit style is now enforced via Husky. Please confirm and/or close.

As said in the comment above, this original issue is about enforcing the code style (indentation, etc.), not only the commit message format.

wuda-io commented 1 year ago

Ah sorry, my misktake. Didnt read properly. As far as i remember, there was a automatic code styling applied though, when i was writing some changes. Maybe it was serverside at CI Level.

wuda-io commented 8 months ago

Hello @ChildishGiant Now I understand what you meant. Sorry for that. I saw that there is a devDependency installed (prettier). I also use prettier locally. I think we can create a prettier Configuration file locally for VSCode so that we all have the same code styles applied. But I think it is overpowered to use it server-side (via GH Actions) What do you think?

PS: Where are you all? :laughing: Hope you all are doing fine and thank you all for starting Materialize.