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.
The text was updated successfully, but these errors were encountered:
Opened an issue in the 10up-toolkit repo. This would be a big change and can add up to the confusion folks aready have when dealing with eslint/prettier.
I feel like this could potentially make things less confusing. Prettier can be explained as the tool that only formats your code and Eslint is the tool that tells you when you have a potential code smell. Thanks for opening the toolkit issue. We can close this one
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.
The text was updated successfully, but these errors were encountered: