Build Tools: Configure prettier properly.

Allows tools like prettier or VSCode to auto-format JS files propertly.
It pulls the prettier config that is used in the Gutenberg repository.

Props gziolo.
Fixes #60316.

git-svn-id: https://develop.svn.wordpress.org/trunk@57330 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Riad Benguella 2024-01-23 07:59:22 +00:00
parent ba4271374d
commit d3ac623e2a
3 changed files with 5 additions and 0 deletions

3
.prettierrc.js Normal file
View File

@ -0,0 +1,3 @@
// Import the default config file and expose it in the project root.
// Useful for editor integrations.
module.exports = require( '@wordpress/prettier-config' );

1
package-lock.json generated
View File

@ -112,6 +112,7 @@
"@wordpress/dependency-extraction-webpack-plugin": "4.25.13",
"@wordpress/e2e-test-utils": "10.13.13",
"@wordpress/e2e-test-utils-playwright": "0.10.13",
"@wordpress/prettier-config": "2.25.13",
"@wordpress/scripts": "26.13.13",
"autoprefixer": "10.4.16",
"chalk": "5.3.0",

View File

@ -31,6 +31,7 @@
"@wordpress/dependency-extraction-webpack-plugin": "4.25.13",
"@wordpress/e2e-test-utils": "10.13.13",
"@wordpress/e2e-test-utils-playwright": "0.10.13",
"@wordpress/prettier-config": "2.25.13",
"@wordpress/scripts": "26.13.13",
"autoprefixer": "10.4.16",
"chalk": "5.3.0",