-
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
Fix ESLint and prettier integration for VS Code #23568
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
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. Jetpack plugin:
Boost plugin:
Starter Plugin plugin:
Protect plugin:
|
state = { | ||
step: JetpackTerminationDialog.FEATURE_STEP, | ||
surveyAnswerId: null, | ||
surveyAnswerText: '', | ||
}; | ||
constructor( props ) { | ||
super( props ); | ||
|
||
this.state = { | ||
step: JetpackTerminationDialog.FEATURE_STEP, | ||
surveyAnswerId: null, | ||
surveyAnswerText: '', | ||
}; | ||
} |
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.
This is to fix no-use-before
define error for JetpackTerminationDialog
. Weird that it showed the error though 🤷♂️
I suppose the question is whether we think svelte will be used anywhere else, or if it'll remain a Boost-only thing. |
If we use Svelte anywhere else in future, then we can extract Svelte specific tools to |
e74728d
to
32ee703
Compare
ead7442
to
62549b8
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.
I note this drops a lot of warnings along the lines of
181:0 warning Invalid JSDoc @param "options" type "Object"; prefer: "object" jsdoc/check-types
due to setting .settings.jsdoc.mode
to "typescript". That change seems odd, but I find myself not really caring. If someone else does care, they're welcome to raise the question.
P.S. I went ahead and filed WordPress/gutenberg#39810 asking them to make |
Great news! One last step: head over to your WordPress.com diff, D77357-code, and commit it. Thank you! |
|
I don't seem to be able to build the monorepo now; I get the following errors:
Am I missing something? |
May be because of #23456? |
Thanks y'all for working together on this one. @jeherve I can't duplicate the issue on my end (building |
r242716-wpcom |
Those shouldn't be a problem thanks to |
This was the problem. Everything works after updating PNPM. Thank you! |
Do we need to update the minimum version in the "engines" section of package.json? |
I cannot quite tell what version I was running before I updated. I should have checked, sorry! |
This change seems to have broken the Jetpack Boost pre-commit hooks:
I'm on pnpm 6.32.3:
I'll try to figure out how / why, but any help appreciated :) |
I've found the issue -- the pre-commit hooks explicitly use the root I think I have a fix here to be reviewed: #23691 |
As post-merge testing. I found a minor issue that needs to be addressed. ESLint for VS Code and other IDEs look for For example if Solution: There are two possible solutions:
CC @Automattic/jetpack-crew |
Too bad they don't find the shim that we ensure is installed at the root's
We don't want that, we want things centralized. Especially since we don't actually run eslint in the individual projects, only globally.
Installing only eslint in the root would be ok-ish. Where it becomes a problem is if we would also have to install all the eslint configs and plugins and their peer dependencies there too. We don't want things like Even putting just eslint in the monorepo root would mean any of our own eslint plugin packages could forget a needed dep. But we don't have or plan to have many of those. |
No, we just need |
Fixes #20996
Changes proposed in this Pull Request:
.prettierrc.js
in root directory to be a generic oneplugins/boost
Jetpack product discussion
p9dueE-4E8-p2
Does this pull request change what data or activity we track or use?
No
Testing instructions:
Before following the steps in VS Code, please ensure that you
Cmd + Shift + P
>Preferences: Open Settings (JSON)
)Steps
pnpm install
Cmd + Shift + P
>Developer: Reload Window
)plugins/jetpack/_inc/client/
e.g.projects/plugins/jetpack/_inc/client/at-a-glance/activity.jsx
Outdent line
command (Cmd + [
) a few times.Cmd + Shift + P
>Problems: Focus on Problems View
)Cmd + S
)