eighteen73 / pulsar

WordPress starter theme with opinionated configuration.
MIT License
10 stars 0 forks source link

Add .jshintrc #27

Closed edjeavons closed 1 year ago

edjeavons commented 1 year ago

Could we add a .jshintrc to the theme's root. It'll help supported IDEs to lint JS using the correct ECMAScript version.

In my experiences IDEs still lint cautiously using old versions of JavaScript unless this is provided.

{
    "browser": true,
    "esversion": 6
}

https://jshint.com/docs/options/#esversion

Alternatively I think the preferences can be added to package.json under jshintConfig too but I've never tried it that way. See PHPStorm screenshot below.

CleanShot 2023-09-11 at 11 59 11

brettsmason commented 1 year ago

We use ESLint for the coding standards package and for the other WordPress tooling. Would it not seem redundant to ship both, seeing as ESLint seems to be more of the standard anyway nowadays?

edjeavons commented 1 year ago

Noted. Please ignore this then.

I'm probably behind the times by still having JSHint enabled in my IDE so I'll stop myself from using it and see how I get on. 😄