-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update linting and formatting for test plugin files. #28033
Conversation
Size Change: 0 B Total Size: 1.04 MB ℹ️ View Unchanged
|
The idea was to use ES5 so you could activate those plugins and run in every browser. I don't think if this a strong requirement these days. We are rather waiting for a day when we will be able to drop support for IE11 rather than actively seeking ways to improve experience there because it became a maintenance burden. Edit: One thing to note, if we land this PR then #21528 that tries to run tests in IE11, it will be no longer possible to use those plugins in tests. Although, as far as I can tell the idea was to write some smoke tests so it shouldn't be an issue. |
In the meantime I've merged #28266 to fix the inconsistent formatting. I'm happy to update this PR if we can decide on this, but will close if there's no feedback this week. Totally happy to pick up again in the future as well if we decide it should be done. |
I think it's fine to proceed. Those plugins should continue to work with modern browsers with the changes applied. It would be still possible to copy and paste those snippets to run in the Web Console in the browser. Otherwise, it's going to be outside of any control from our tooling which isn't only linting but also code formatting. |
…ats plugin code correctly
cfc7d2a
to
84ba7f6
Compare
Now that we no longer support IE 11, it's fine to apply all those changes more than ever 👍🏻 |
Yep, figured I'd rebase and finally merge it 😄 |
Description
In #28007 I committed one of the e2e test plugins with the non-WordPressy coding standards that my editor automatically applied. I was unsure why that happened. Thanks to some help on slack I realised this is due to the files being in the project's .eslintignore file. My editor was misconfigured so wasn't picking up the ignored files, and was for some reason prettifying them to non-WP standards.
I don't know the motivation behind not formatting or linting the files. Perhaps they were written before some modern standards were available in Chrome? Or maybe they were written for future where e2e tests might be able to run in IE11?
It seems like it'd be ok to lint/format them, so I've done that. If it works, the e2e tests should pass.