-
Notifications
You must be signed in to change notification settings - Fork 23
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
Create GitHub JS lint action #136
Conversation
3c017e4
to
2619ccf
Compare
2619ccf
to
3007c58
Compare
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.
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.
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.js
that would generate JS lint errors and verify that the errors are showing in the terminal.assets/js/src/simple-page-ordering.js
that would generate JS lint errors and runnpm run js-lint
and verify that the errors are showing in the terminal.Files changed
tab)Changelog Entry
Credits
Props @Sidsector9, @kmgalanakis
Checklist: