ContextInstitute / bfcom

http://bfn.context.org
GNU General Public License v3.0
4 stars 1 forks source link

conform our existing code to our standards #37

Closed rgilman closed 6 years ago

rgilman commented 6 years ago

We should at least do this for the files we have created or modified.

I did a comparison between BFCom and JointsWP. The issues I found are:

I'm willing to do this clean-up.

iangilman commented 6 years ago

Sounds good.

rgilman commented 6 years ago

I've done all the file renaming and tested it to make sure it works. I'm going to hold off on the linting until I have better tools in place.

iangilman commented 6 years ago

I recommend ESLint for JavaScript... I don't know what the PHP equivalent is.

rgilman commented 6 years ago

Looks like PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions is what people use. It integrates with VS Code and I suspect with Atom as well.

rgilman commented 6 years ago

Commits here and here

While this will be an on-going process, I'm closing this as an issue now.

iangilman commented 6 years ago

Now that I'm actually seeing it in the commit, nav-bfc_submenu.php seems odd to me (and it goes against the recommendation in the cheat sheet). Why not nav-bfc-submenu.php?

iangilman commented 6 years ago

Otherwise those changes look good.

rgilman commented 6 years ago

I agree it looks odd. I'll test nav-bfc-submenu.php locally. If there are no issues, I'd be happy to update.

iangilman commented 6 years ago

Cool :-)