Skip to content

Running npm run format-js formats more files than expected #1603

@westonruter

Description

@westonruter

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.

Metadata

Metadata

Assignees

Labels

[Type] BugAn existing feature is broken

Type

No fields configured for Bug.

Projects

Status

Done 😃

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions