-
Notifications
You must be signed in to change notification settings - Fork 21
Create GitHub JS lint action #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3c017e4 to
2619ccf
Compare
2619ccf to
3007c58
Compare
peterwilsoncc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Manually testing, there don't seem to be any side affects.
Just one question inline about the switch from importing jQuery.
|
|
||
| // eslint-disable-next-line import/no-unresolved | ||
| import 'jquery-ui-sortable'; | ||
| import 'jquery'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the plugin uses @wordpress/dependency-extraction-webpack-plugin, import jquery should work fine and allow us to avoid the need for window.jQuery throughout.
Were you experiencing issues with the import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kmgalanakis could you please respond to Peter's comment above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Sidsector9 want to handle any final updates here so this can get merged in as part of the 2.5.0 release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response @peterwilsoncc and @jeffpaul. I had very limited bandwidth for the past couple of weeks.
To address @peterwilsoncc concern, I modified the eslint configuration to be able to use jQuery without having to do it through window.
This should be good to go @jeffpaul.
Sidsector9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for the changes! LGTM 👍
Description of the Change
assets/js/src/simple-page-ordering.js(the only active JS project file) to pass the linting tests.Closes #130
How to test the Change
npm run dev, make changes to theassets/js/src/simple-page-ordering.jsthat would generate JS lint errors and verify that the errors are showing in the terminal.assets/js/src/simple-page-ordering.jsthat would generate JS lint errors and runnpm run js-lintand verify that the errors are showing in the terminal.Files changedtab)Changelog Entry
Credits
Props @Sidsector9, @kmgalanakis
Checklist: