Easy way to format and fix CSS, JS, and PHP code in VSCode with preconfigured Prettier, ESLint, Stylelint, PHPCS, EditorConfig and Browserlist tools inspired by WordPress and their WPCS coding standards.
You can install them manually or faster with package managers, e.g.:
choco install nodejs composer vscode
brew install node composer
brew install --cask visual-studio-code
apt install nodejs composer code
This command line utility will automate the whole WPCS setup process for your VSCode. It will update the required files and packages in your project. If there are differences, a side-by-side comparison will run. To save space required packages will be symlinked if possible.
npm i musosoft/codewpcs -g
codewpcs <your project path>
- A popup will show after the first VSCode run - press "Install" to get all required extensions
- Open Command Palette and Reload Window:
workbench.action.reloadWindow
- Scripts integration
- Markdown lint
- Autoprefixer support
- PostCSS support
- SVGOMG support
- Use PHPCS globally