mythic icon indicating copy to clipboard operation
mythic copied to clipboard

Fix eslint errors, except `no-multi-spaces`

Open nextgenthemes opened this issue 4 years ago • 3 comments

@link does not exist, I stumbled on some VSCODE issue (I use Atom) that said that it handled markdown so I just converted the link to MD

You may want to allow no-multi-spaces in eslint conf the WP coding standards for PHP actually require you do align spaces but in JS is disallowed, seems strange to me.

nextgenthemes avatar Sep 03 '19 04:09 nextgenthemes

I don't like these changes. We should configure eslint to ignore notices for these items instead.

justintadlock avatar Sep 03 '19 12:09 justintadlock

Well I think the forced const/let make a lot of sense, forced brackets make sense to me as well. The @link seems not part of any spec or whatever. But if you do not like it then close it. I thought you were about sticking at least close to what the WP teams recommend since you are part of the Theme review team. But I do not get the no-multi-spaces at all and the padded-blocks I personally like and actually let it in here as well so I will for sure disable these two in my config.

nextgenthemes avatar Sep 03 '19 12:09 nextgenthemes

Well I think the forced const/let make a lot of sense,

In this particular case, it's pedantic and is an unnecessary change.

forced brackets make sense to me as well.

I prefer without the brackets since we're using the shorter-style function call. Just a personal style choice.

The @link seems not part of any spec or whatever.

Just aiming for consistency with the PHP files here. If there's an equivalent for JS, I'd be happy to use it.

I thought you were about sticking at least close to what the WP teams recommend since you are part of the Theme review team.

The TRT has no position on JS code formatting.

But, my personal view on code formatting in general is that it will follow "Justin Style". While that generally follows some standards similar to WP, I don't strictly follow any one style guide. Currently, how I write JS is a work in progress, coming from a primarily PHP background. So, this could evolve.

justintadlock avatar Sep 03 '19 14:09 justintadlock