-
Notifications
You must be signed in to change notification settings - Fork 795
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
Boost: Fix linting config and standards in files #21015
Conversation
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Boost plugin:
|
.eslintignore
Outdated
@@ -40,6 +40,7 @@ projects/plugins/boost/app/assets/dist/** | |||
projects/plugins/boost/tests/** | |||
projects/plugins/boost/docker/** | |||
projects/plugins/boost/wordpress/** | |||
!projects/plugins/boost/app/assets/src/js/*.d.ts |
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.
I see there are two .d.ts files in the repo, projects/plugins/boost/app/assets/src/js/global.d.ts
and projects/plugins/boost/app/assets/src/js/svg/svgs.d.ts
. This rule only matches the first.
If you want to match both, you could do like
!projects/plugins/boost/app/assets/src/js/*.d.ts | |
!projects/plugins/boost/app/assets/src/js/**/*.d.ts |
And similarly in your local .eslintignore.
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.
Yep, tested and the more globby path also catches svgs.d.ts. Nice catch! Committed in 91db7f7
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 @anomiex for taking a look at the PR and spotting this one 🙏🏻
Also thank you @thingalon 👍
I have added the globby path to the local .eslintignore file too in commit 581e224
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.
👍 works well, looks good to me. Thanks @davidlonjon !
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.
Still looking good!
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.
Seems ok to me, but needs a master merge.
You might consider whether you need local linting at all rather than making sure the monorepo's linting checks everything, since the local linting is not run in CI. But that's not something that needs to hold up this PR.
* master: (32 commits) jetpack: Work around another calypso-build oddity (#21004) Fix/20806 Browser console deprecation warning for BlcokControl entity (#20922) Search: Improve filter label alignment for longer terms (#21008) Theme Tools: rm extra Social Menu added in Twenty Twenty theme (#20993) Notifications: fix DailyMotion shortcode render in Calypso (#21032) Notifications: Fix VR shortcode render (#20871) E2E tests: fix for logging Jetpack version (#21054) Admin Menu: Fix skipped tests (#21055) Admin Menu: Sanitize current screen identifier (#21049) Fix/phpunit failed on multisite (#21053) Boost: Fix Critical CSS resume on module re-enable (#21031) Update wordpress monorepo (#21021) Unit tests: test_get_user_connection_data_with_connected_user skip for multisite (#21045) Publicize: move it to plugins folder (#21016) SEO Tools: add archive_title page title token (#20920) Unit tests: Fix silent errors in Jetpack tests (#21030) actions: Don't run Beta Plugin artifact action on forked PRs (#21019) Jetpack Sync: Fix broken Sync unit tests (#21037) Notifications: Fix SoundCloud shortcode render (#20869) Jetpack Assistant: Correct purchased product feature class (#21014) ...
Thanks @anomiex. Yes, the next step would be to have all the lining done by the Monorepo's linting. I have just created now this #21066 for it. I will implement it after this other linting related PR fixing local linting is also merged. |
# By Ivan Ottinger (4) and others # Via GitHub * master: (28 commits) Boost: Fix linting config and standards in files (#21015) jetpack: Work around another calypso-build oddity (#21004) Fix/20806 Browser console deprecation warning for BlcokControl entity (#20922) Search: Improve filter label alignment for longer terms (#21008) Theme Tools: rm extra Social Menu added in Twenty Twenty theme (#20993) Notifications: fix DailyMotion shortcode render in Calypso (#21032) Notifications: Fix VR shortcode render (#20871) E2E tests: fix for logging Jetpack version (#21054) Admin Menu: Fix skipped tests (#21055) Admin Menu: Sanitize current screen identifier (#21049) Fix/phpunit failed on multisite (#21053) Boost: Fix Critical CSS resume on module re-enable (#21031) Update wordpress monorepo (#21021) Unit tests: test_get_user_connection_data_with_connected_user skip for multisite (#21045) Publicize: move it to plugins folder (#21016) SEO Tools: add archive_title page title token (#20920) Unit tests: Fix silent errors in Jetpack tests (#21030) actions: Don't run Beta Plugin artifact action on forked PRs (#21019) Jetpack Sync: Fix broken Sync unit tests (#21037) Notifications: Fix SoundCloud shortcode render (#20869) ... # Conflicts: # projects/plugins/boost/tsconfig.json
…workflow # By Brad Jorsch (6) and others # Via GitHub * master: (53 commits) Boost: Fix linting config and standards in files (#21015) jetpack: Work around another calypso-build oddity (#21004) Fix/20806 Browser console deprecation warning for BlcokControl entity (#20922) Search: Improve filter label alignment for longer terms (#21008) Theme Tools: rm extra Social Menu added in Twenty Twenty theme (#20993) Notifications: fix DailyMotion shortcode render in Calypso (#21032) Notifications: Fix VR shortcode render (#20871) E2E tests: fix for logging Jetpack version (#21054) Admin Menu: Fix skipped tests (#21055) Admin Menu: Sanitize current screen identifier (#21049) Fix/phpunit failed on multisite (#21053) Boost: Fix Critical CSS resume on module re-enable (#21031) Update wordpress monorepo (#21021) Unit tests: test_get_user_connection_data_with_connected_user skip for multisite (#21045) Publicize: move it to plugins folder (#21016) SEO Tools: add archive_title page title token (#20920) Unit tests: Fix silent errors in Jetpack tests (#21030) actions: Don't run Beta Plugin artifact action on forked PRs (#21019) Jetpack Sync: Fix broken Sync unit tests (#21037) Notifications: Fix SoundCloud shortcode render (#20869) ... # Conflicts: # projects/plugins/boost/tsconfig.json # projects/plugins/jetpack/tests/e2e/bin/env.sh
* Remove an old eslint config file not in use anymore * Add a new eslintignore file to whitelist the global.d.ts file for linting * Whitelist the global.d.ts Boost plugin file for linting * Fix typeRoots and include paths * Fix issue with incorrect path and unused import * Fix type * Add changelog * Use a more globby path to catch all typescript def files * Use a more globby path to catch all typescript def files in Boost eslintingore Co-authored-by: Mark George <thingalon@gmail.com>
Following quite a few experimentations with linting due to #20996 I realize that a few linting related configurations and standards had to be fixed with Boost.
Changes proposed in this Pull Request:
.eslintignore
file to whitelist theglobal.d.ts
file so it can be linted. Also adds it to the top of the Jetpack Monorepo.eslintignore
. This in effect disabling the rule to ignore everyd.ts
files from ( I think) the@wordpress/eslint-plugin
. I am whitelisting it because it seems we missed a few issues from that file as it was not linted. I am not sure if there is a reason not to lint it.global.d.ts
file by fixing an import path and removing an import that was not used anymore.app/assets/src/js/utils/generate-critical-css.ts
that somehow was missed.Jetpack product discussion
N/A
Does this pull request change what data or activity we track or use?
N/A
Testing instructions:
Make sure the lining on the local environment still passes as well as the one on the CI.