This repository was archived by the owner on Sep 5, 2025. It is now read-only.
PHP, SCSS and JS linting tools for use in local and Travis#1386
Merged
Ismail-elkorchi merged 4 commits intoAutomattic:masterfrom Apr 7, 2020
Ismail-elkorchi:linting-travis
Merged
PHP, SCSS and JS linting tools for use in local and Travis#1386Ismail-elkorchi merged 4 commits intoAutomattic:masterfrom Ismail-elkorchi:linting-travis
Ismail-elkorchi merged 4 commits intoAutomattic:masterfrom
Ismail-elkorchi:linting-travis
Conversation
This was referenced Apr 5, 2020
GaryJones
reviewed
Apr 8, 2020
| "php-parallel-lint/php-parallel-lint": "^1.2.0" | ||
| }, | ||
| "scripts": { | ||
| "lint:wpcs": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 5.6-", |
There was a problem hiding this comment.
No need for testVersion runtime value here, when it's already in the PHPCS config file.
Contributor
Author
There was a problem hiding this comment.
@GaryJones thank you. I'll remove it in a follow-up PR.
This was referenced Apr 17, 2020
This was referenced May 3, 2020
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this Pull Request:
This PR updates the linting tools used in Travis by :
Adding
package.jsonfile and specifying @wordpress/scripts as the only dependency.Adding
composer.jsonfile and specifying Composer installer for PHP_CodeSniffer, WPThemeReview and PHP Parallel Lint as dependenciesAdding
lint:scsscommand topackage.jsonto lint scss files using thelint-stylescript which is defined in@wordpress/scriptsAdding
lint:jscommand topackage.jsonto lint js files using thelint-jsscript which is defined in@wordpress/scriptsAdding
lint:wpcscommand tocomposer.jsonto lint php files usingphp_codesnifferAdding
lint:phpcommand tocomposer.jsonto lint php files for syntax errorsAdding
.stylelintrc.jsonand.eslintrcconfiguration files forstylelintandeslintRemoving
.jshintignoreand.jscsrcfiles since@wordpress/scriptsuseseslintunder the hoodUpdating
.travis.ymlto use newer versions ofphp, install the dependencies and run the commands defined inpackage.jsonandcomposer.jsonUpdating
phpcs.xml.distWith these changes Travis is now reporting many issues regarding the coding standards which must be fixed in #1388.
Related issue(s):
#1311, #1149, #1159, #1291