Closed Ismail-elkorchi closed 4 years ago
This PR updates the linting tools used in Travis by :
Adding package.json file and specifying @wordpress/scripts as the only dependency.
package.json
Adding composer.json file and specifying Composer installer for PHP_CodeSniffer, WPThemeReview and PHP Parallel Lint as dependencies
composer.json
Adding lint:scss command to package.json to lint scss files using the lint-style script which is defined in @wordpress/scripts
lint:scss
lint-style
@wordpress/scripts
Adding lint:js command to package.json to lint js files using the lint-js script which is defined in @wordpress/scripts
lint:js
lint-js
Adding lint:wpcs command to composer.json to lint php files using php_codesniffer
lint:wpcs
php_codesniffer
Adding lint:php command to composer.json to lint php files for syntax errors
lint:php
Adding .stylelintrc.json and .eslintrc configuration files for stylelint and eslint
.stylelintrc.json
.eslintrc
stylelint
eslint
Removing .jshintignore and .jscsrc files since @wordpress/scripts uses eslint under the hood
.jshintignore
.jscsrc
Updating .travis.yml to use newer versions of php, install the dependencies and run the commands defined in package.json and composer.json
.travis.yml
php
Updating phpcs.xml.dist
phpcs.xml.dist
With these changes Travis is now reporting many issues regarding the coding standards which must be fixed in https://github.com/Automattic/_s/pull/1388.
https://github.com/Automattic/_s/pull/1311, https://github.com/Automattic/_s/issues/1149, https://github.com/Automattic/_s/pull/1159, https://github.com/Automattic/_s/pull/1291
Changes proposed in this Pull Request:
This PR updates the linting tools used in Travis by :
Adding
package.json
file and specifying @wordpress/scripts as the only dependency.Adding
composer.json
file and specifying Composer installer for PHP_CodeSniffer, WPThemeReview and PHP Parallel Lint as dependenciesAdding
lint:scss
command topackage.json
to lint scss files using thelint-style
script which is defined in@wordpress/scripts
Adding
lint:js
command topackage.json
to lint js files using thelint-js
script which is defined in@wordpress/scripts
Adding
lint:wpcs
command tocomposer.json
to lint php files usingphp_codesniffer
Adding
lint:php
command tocomposer.json
to lint php files for syntax errorsAdding
.stylelintrc.json
and.eslintrc
configuration files forstylelint
andeslint
Removing
.jshintignore
and.jscsrc
files since@wordpress/scripts
useseslint
under the hoodUpdating
.travis.yml
to use newer versions ofphp
, install the dependencies and run the commands defined inpackage.json
andcomposer.json
Updating
phpcs.xml.dist
With these changes Travis is now reporting many issues regarding the coding standards which must be fixed in https://github.com/Automattic/_s/pull/1388.
Related issue(s):
https://github.com/Automattic/_s/pull/1311, https://github.com/Automattic/_s/issues/1149, https://github.com/Automattic/_s/pull/1159, https://github.com/Automattic/_s/pull/1291