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
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