Closed ntwb closed 4 years ago
Hi @ntwb, thanx for the PR.
As you many have seen, I merged another PR yesterday that completely replaced all the JS that yours cleans up. Can you please refresh this PR against the current master?
It is still a good idea to have Prettier available to be run on the new JS, so thanx for that!!
lol, I didn't even check, I wrote that patch on Saturday and forgot to push it up
I'll go comment on the #118 PR from @whyisjake now
This PR seeks to update the
js/wp-autoupdates.js
file per WordPress Coding StandardsThis is performed via the
Add
@wordpress/scripts` packageTo test this PR check out the branch and run
npm install
The JS file has already been formatted with Prettier run
format:js
via c75714aTo run the lint check using WP Coding Standards for CSS & JS run
For CSS Run
npm run lint:css
For JS Runnpm run lint:js
To run both, run
npm test
(ornpm t
)The following ESLint warnings are displayed from the
lint:js
task:Some of these are easy fixes using ESLint
--fix
option, others not so muchThe background of the reason for this PR is that any new code being merged to WordPress should meet the WordPress Coding Standards
With some luck I'm hoping to get ESLint added in WP 5.5 to test that any new JS code introduced will meet the coding standards before being committed to the SVN repo
I'll leave this a draft PR for the time being, I don't think it should be merged as it will add more code to the repo that isn't going to be used when merged to core, feel free to push commits to this branch and then the final JS changes can be cherry-picked back to the
master
branch would be my suggestion