Myzwer / foothillschurch

Bootcamp II is a wordpress theme (as well as an inside joke) designed to suit the needs of foothillschurch.com. It makes use of webpack, Babel, Sass, Tailwind, Browsersync, PostCSS, ESLint, Stylelint, Prettier and more. It is meant for that site, but if you can use it by all means go for it.
1 stars 1 forks source link

Code indentation is all over the place #38

Closed rain2o closed 1 month ago

rain2o commented 1 month ago

https://github.com/Myzwer/foothillschurch/blob/effc5bbf81497ae99f0561ab7849412fe9272bfd/events.php#L17-L69

This file is difficult to follow sometimes. Some things that are nested have the same indentation, some things that are siblings have different indentation. And some lines are just super indented out of nowhere. It's hard to know where I'm at in the hierarchy.

rain2o commented 1 month ago

For what it's worth, it might help to have an auto-formatter set up in your IDE, or at least a way to trigger it. At work we have prettier auto-run on files when saving. In VSCode you can run (Option + Shift + F) (or from the command palette choose "Format Document") to format the file. If you don't have a default formatter for the given file type it will ask you for one. You can set it up to use the same rules as your eslint so it formats to fix eslint issues.