performance icon indicating copy to clipboard operation
performance copied to clipboard

Running npm run format-js formats more files than expected

Open westonruter opened this issue 1 year ago • 1 comments

When I run npm run format-js it ends up formatting more files than I expected:

$ npm run format-js

> format-js
> wp-scripts format

.eslintrc.js 29ms
.github/dependabot.yml 20ms
.github/workflows/codeql-analysis.yml 6ms
.github/workflows/deploy-plugins.yml 15ms
.github/workflows/js-lint.yml 4ms
.github/workflows/php-lint.yml 5ms
.github/workflows/php-test-plugins.yml 8ms
.github/workflows/pr-validation.yml 3ms
.github/workflows/props-bot.yml 5ms
.github/workflows/spell-check.yml 2ms
.wp-env.json 2ms
.wp-env.override-disabled.json 1ms
.wp-env.override-old.json 1ms
.wp-env.override.json 1ms
bin/plugin/cli.js 13ms
bin/plugin/commands/changelog.js 22ms
bin/plugin/commands/readme.js 13ms
bin/plugin/commands/since.js 6ms
bin/plugin/commands/versions.js 6ms
bin/plugin/config.js 1ms
bin/plugin/lib/logger.js 2ms
bin/plugin/lib/milestone.js 5ms
composer.json 2ms
lint-staged.config.js 3ms
package-lock.json 130ms
package.json 1ms
plugins.json 0ms
plugins/embed-optimizer/detect.js 5ms
plugins/embed-optimizer/lazy-load.js 2ms
plugins/optimization-detective/detect.js 12ms
plugins/optimization-detective/types.ts 107ms
plugins/performance-lab/.wordpress-org/blueprints/blueprint.json 1ms
scratches/after.json 0ms
scratches/after.pretty.json 1ms
scratches/query-after.js 28ms
scratches/query-before.js 26ms
test-plugins/try-jquery-callback/script.js 2ms
tools/webpack/utils.js 5ms
tsconfig.json 1ms
webpack.config.js 5ms

The scratches and test-plugins directories I have on my machine which are not checked-in to Git.

The specific checked-in files that were modified:

M	.github/dependabot.yml
M	.github/workflows/codeql-analysis.yml
M	.github/workflows/deploy-plugins.yml
M	.github/workflows/js-lint.yml
M	.github/workflows/php-lint.yml
M	.github/workflows/php-test-plugins.yml
M	.github/workflows/pr-validation.yml
M	.github/workflows/props-bot.yml
M	.github/workflows/spell-check.yml
M	.wp-env.json
M	composer.json
M	package-lock.json
M	package.json
M	plugins.json
M	plugins/performance-lab/.wordpress-org/blueprints/blueprint.json
M	tsconfig.json

Either we should commit these changes to YML and JSON files, or we should ignore these files from being formatted.

westonruter avatar Oct 17 '24 18:10 westonruter

Hi @westonruter, I think we should commit these changes to YML and JSON files.

devansh016 avatar Oct 18 '24 04:10 devansh016

Hi, I want to work on this issue as my first contribution. Can you please assign it to me?

dilipom13 avatar Jun 02 '25 17:06 dilipom13

@dilipom13 You can see that Devansh has a stale PR in https://github.com/WordPress/performance/pull/1605 which could be the basis of bringing this forward.

@devansh016 Are you looking to hand this off?

westonruter avatar Jun 03 '25 05:06 westonruter

@dilipom13 You can see that Devansh has a stale PR in #1605 which could be the basis of bringing this forward.

@devansh016 Are you looking to hand this off?

Okay @westonruter got it your point.If @devansh016 is working on this issue that's fine, then don't acknowledge me. I will check further issues.👍

Thank you 😊

dilipom13 avatar Jun 03 '25 05:06 dilipom13

Hi @westonruter, thanks for the follow-up! Yes, I'm still working on this and plan to wrap it up. I've resolved the merge conflicts and will be working on the feedback. Thanks! When you get a chance, could you please review the PR as well.

devansh016 avatar Jun 03 '25 07:06 devansh016