diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000000000..a4829d5b4839e --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,14 @@ +{ + /** + * List of recommended extensions to use for this workspace. + * The identifier of an extension is always `${publisher}.${name}`, + * which is a part of the URL, e.g. https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint + * You can view these extensions using the command `Extensions: Show Recommended Extensions`. + */ + "recommendations": [ + "bmewburn.vscode-intelephense-client", // PHP Intelephense + "dbaeumer.vscode-eslint", // ESLint + "esbenp.prettier-vscode", // Prettier - Code formatter + "obliviousharmony.vscode-php-codesniffer" // PHP_CodeSniffer + ] +} diff --git a/.vscode/settings.dist.jsonc b/.vscode/settings.dist.jsonc index 5e14562fb29b5..ebe28cdd6b8fe 100644 --- a/.vscode/settings.dist.jsonc +++ b/.vscode/settings.dist.jsonc @@ -37,6 +37,16 @@ "**/jetpack_vendor/**", "**/vendor/**" ], + // Custom settings for PHP files. + "[php]": { + // Ensure that PHP files are formatted with PHPCS. + "editor.formatOnSave": true, + "editor.defaultFormatter": "obliviousharmony.vscode-php-codesniffer" + }, + // Run Code Actions for the editor. + "editor.codeActionsOnSave": { + "source.fixAll": "explicit" + }, // Use this wp-prettier from this path. "prettier.prettierPath": "tools/js-tools/node_modules/prettier/index.cjs" }