Skip to content

Commit

Permalink
Build/Test: Fix JavaScript linting scripts
Browse files Browse the repository at this point in the history
`wp-prettier` was out of date and no longer compatible with wp-scripts. Additionally, many generated files and plugins were not being properly ignored which could cause linting to take so long that it was basically unusable.

Props ankitkumarshah, jorbin.
See #62935.



git-svn-id: https://develop.svn.wordpress.org/trunk@59848 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
aaronjorbin committed Feb 20, 2025
1 parent 26ed02b commit 889d6e2
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
21 changes: 16 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Files and folders related to build/test tools
# Files and folders related to build/test tools including generated files
/build
/node_modules
/tests
/vendor
/tools
/jsdoc
/artifacts
/coverage
.cache/*
/src/wp-includes/blocks/**/*.js
/src/wp-includes/blocks/**/*.js.map
/src/wp-admin/js
/src/wp-includes/js

# Excluded files and folders based on `jsdoc.conf.json` exclusions
/src/js/_enqueues/vendor

# Webpack built files
/src/wp-includes/js/media-*

# Themes
src/wp-content/themes/
src/wp-content/themes

# Files and folders that get created in wp-content
/src/wp-content/plugins
/src/wp-content/mu-plugins
/src/wp-content/upgrade
/src/wp-content/uploads
36 changes: 15 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"ink-docstrap": "1.3.2",
"install-changed": "1.1.0",
"postcss": "8.4.49",
"prettier": "npm:wp-prettier@2.6.2",
"prettier": "npm:wp-prettier@3.0.3",
"qunit": "~2.23.1",
"react-refresh": "0.14.0",
"sass": "1.83.4",
Expand Down

0 comments on commit 889d6e2

Please sign in to comment.