Last active
November 2, 2022 19:38
-
-
Save ZachWatkins/af4bff90b4bcd961dcd29fe04d81487f to your computer and use it in GitHub Desktop.
Improve VSCode for WordPress Development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is for unifying the coding style for different editors and IDEs | |
# editorconfig.org | |
# WordPress Coding Standards | |
# https://make.wordpress.org/core/handbook/coding-standards/ | |
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
indent_style = tab | |
[*.yml] | |
indent_style = space | |
indent_size = 2 | |
[*.md] | |
trim_trailing_whitespace = false | |
[{*.txt,wp-config-sample.php}] | |
end_of_line = crlf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "zachwatkins/vscode-wordpress", | |
"license": "GPL-2.0-or-later", | |
"description": "Template Visual Studio Code workspace for WordPress.", | |
"homepage": "https://github.com/zachwatkins/vscode-wordpress/", | |
"keywords": [ | |
"vscode", | |
"workspace", | |
"wordpress", | |
"wp" | |
], | |
"support": { | |
"issues": "https://github.com/zachwatkins/vscode-wordpress/issues", | |
"source": "https://github.com/zachwatkins/vscode-wordpress/", | |
"docs": "https://raw.githubusercontent.com/zachwatkins/vscode-wordpress/main/README.md" | |
}, | |
"authors": [ | |
{ | |
"name": "Zachary K. Watkins", | |
"email": "[email protected]", | |
"homepage": "https://github.com/zachwatkins/", | |
"role": "Creator" | |
}, | |
{ | |
"name": "Contributors", | |
"homepage": "https://github.com/zachwatkins/vscode-wordpress/graphs/contributors" | |
} | |
], | |
"require": { | |
"php": ">=8.0" | |
}, | |
"require-dev": { | |
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", | |
"squizlabs/php_codesniffer": "3.6.0", | |
"wp-coding-standards/wpcs": "~2.3.0", | |
"phpcompatibility/phpcompatibility-wp": "~2.1.3", | |
"phpunit/phpunit": "^9.5", | |
"yoast/phpunit-polyfills": "^1.0.1", | |
"automattic/vipwpcs": ">=2.3.3" | |
}, | |
"config": { | |
"optimize-autoloader": true, | |
"preferred-install": "dist", | |
"allow-plugins": { | |
"dealerdirect/phpcodesniffer-composer-installer": true | |
} | |
}, | |
"minimum-stability": "dev", | |
"prefer-stable": true, | |
"autoload": { | |
"classmap": [ | |
"src/" | |
] | |
}, | |
"scripts": { | |
"post-install-cmd": [ | |
"@config-wpcs" | |
], | |
"config-wpcs": [ | |
"./vendor/bin/phpcs --config-set default_standard WordPress-VIP-Go", | |
"./vendor/bin/phpcs --config-set report_format summary,source", | |
"./vendor/bin/phpcs --config-set colors 1" | |
], | |
"install-codestandards": [ | |
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run" | |
], | |
"phpcs": "@php ./vendor/bin/phpcs", | |
"phpcbf": "@php ./vendor/bin/phpcbf", | |
"format": "@phpcbf --filter=gitmodified", | |
"format:all": "@phpcbf", | |
"lint": "@phpcs --filter=gitmodified", | |
"lint:errors": "@phpcs -n --filter=gitmodified", | |
"lint:all": "@phpcs -n", | |
"lint:all-errors": "@phpcs -n", | |
"test": [ | |
"Composer\\Config::disableProcessTimeout", | |
"@php ./vendor/phpunit/phpunit/phpunit" | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editorconfig.editorconfig", | |
"devsense.composer-php-vscode", | |
"valeryanm.vscode-phpsab", | |
"johnbillion.vscode-wordpress-hooks", | |
"bmewburn.vscode-intelephense-client" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy main branch | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [closed] | |
branches: [main] | |
jobs: | |
build_and_deploy: | |
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Checkout new branch and apply .deployignore | |
run: | | |
git config --global user.name "Github Action" | |
git config --global user.email "[email protected]" | |
git fetch --unshallow | |
git branch build | |
git checkout build | |
if [ -e .gitignore ]; then rm .gitignore ; fi | |
mv .deployignore .gitignore | |
git rm -r --cached . | |
git add . | |
git commit -m "Github Action" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"phpsab.executablePathCS": "./vendor/bin/phpcs", | |
"phpsab.executablePathCBF": "./vendor/bin/phpcbf", | |
"phpsab.fixerArguments": ["--filter=gitmodified"], | |
"phpsab.snifferArguments": ["--filter=gitmodified"], | |
"[php]": { | |
"editor.defaultFormatter": "valeryanm.vscode-phpsab", | |
"editor.formatOnSave": true, | |
"editor.detectIndentation": false, | |
"editor.formatOnSaveMode": "modifications" | |
}, | |
"intelephense.environment.phpVersion": "8.0.0", | |
"intelephense.diagnostics.run": "onSave", | |
"intelephense.format.enable": false, | |
"intelephense.stubs": [ | |
"apache", | |
"bcmath", | |
"bz2", | |
"calendar", | |
"com_dotnet", | |
"Core", | |
"ctype", | |
"curl", | |
"date", | |
"dba", | |
"dom", | |
"enchant", | |
"exif", | |
"FFI", | |
"fileinfo", | |
"filter", | |
"fpm", | |
"ftp", | |
"gd", | |
"gettext", | |
"gmp", | |
"hash", | |
"iconv", | |
"imap", | |
"intl", | |
"json", | |
"ldap", | |
"libxml", | |
"mbstring", | |
"meta", | |
"mysqli", | |
"oci8", | |
"odbc", | |
"openssl", | |
"pcntl", | |
"pcre", | |
"PDO", | |
"pdo_ibm", | |
"pdo_mysql", | |
"pdo_pgsql", | |
"pdo_sqlite", | |
"pgsql", | |
"Phar", | |
"posix", | |
"pspell", | |
"readline", | |
"Reflection", | |
"session", | |
"shmop", | |
"SimpleXML", | |
"snmp", | |
"soap", | |
"sockets", | |
"sodium", | |
"SPL", | |
"sqlite3", | |
"standard", | |
"superglobals", | |
"sysvmsg", | |
"sysvsem", | |
"sysvshm", | |
"tidy", | |
"tokenizer", | |
"xml", | |
"xmlreader", | |
"xmlrpc", | |
"xmlwriter", | |
"xsl", | |
"Zend OPcache", | |
"zip", | |
"zlib", | |
"wordpress" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment