Skip to content

Commit ef25a88

Browse files
authored
Merge pull request #571 from Automattic/add/eslint
Add eslint
2 parents 34ddde9 + d963bf2 commit ef25a88

File tree

4 files changed

+1741
-92
lines changed

4 files changed

+1741
-92
lines changed

.eslines.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"branches": {
3+
"default": ["downgrade-unmodified-lines"]
4+
},
5+
"processors": {
6+
"downgrade-unmodified-lines": {
7+
"remote": "origin/master",
8+
"rulesNotToDowngrade": ["no-unused-vars"]
9+
}
10+
}
11+
}

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ before_script:
4444
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
4545
- export COMPOSER_BIN_DIR="$HOME/.config/composer/vendor/bin"
4646
- export PATH="$COMPOSER_BIN_DIR:$PATH"
47+
- |
48+
if [[ ${RUN_PHPCS} == "1" ]]; then
49+
npm install
50+
fi
4751
- |
4852
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
4953
composer global require "phpunit/phpunit=5.7.*"
@@ -55,6 +59,7 @@ script:
5559
- |
5660
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]] && [[ ${RUN_PHPCS} == "1" ]]; then
5761
bash bin/phpcs-diff.sh
62+
npm run lint
5863
fi
5964
- phpunit
6065

0 commit comments

Comments
 (0)