You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be more appropriate for 10up-toolkit. I believe we should use prettier for formatting and not part of linting. I am proposing the following changes
Add a prettier config to the root of wp-scaffold. The current config baked into the eslint-config can be used
Add a npm command format to format the code
Add format to run with husky/lint-staged on commit
(future: add generic job configs for gitlab ci/github actions/circleci) that'll run this as a job with --check
remove the duplicate .editorconfig in the theme and the mu-plugin
The reason I am proposing this change is that we can currently only formatting JS files. The formatting should be applied to all files in the repo that match the prettierconfig and the .editorconfig. Currently the repo does not match the editorconfig in a lot of files and that would be resolved by running prettier as it will use the prettier config and the editor config. This will fix the formatting in non JS files such as JSON, MD, etc.
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
My personal opinion is leave formatting to prettier and leave code issues to eslint. I have both prettier and eslint running in vscode without issues. On 10up projects I disable prettier because otherwise so many of my commits are fixing the formatting of the prettierconfig/editorconfig.
Is your enhancement related to a problem? Please describe.
from @tobeycodes (10up/wp-scaffold#199)
This might be more appropriate for 10up-toolkit. I believe we should use prettier for formatting and not part of linting. I am proposing the following changes
format
to format the codeformat
to run with husky/lint-staged on commitThe reason I am proposing this change is that we can currently only formatting JS files. The formatting should be applied to all files in the repo that match the prettierconfig and the .editorconfig. Currently the repo does not match the editorconfig in a lot of files and that would be resolved by running prettier as it will use the prettier config and the editor config. This will fix the formatting in non JS files such as JSON, MD, etc.
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: