diff --git a/.travis.yml b/.travis.yml index 58f3c835..e2bcb26b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,5 +55,5 @@ script: - find . -maxdepth 1 \( -name '*.php' \) -exec php -lf {} \; - find src/php/ \( -name '*.php' \) -exec php -lf {} \; - # Run tests - - npm run test + # Run linters + - npm run lint diff --git a/package.json b/package.json index 7d34e093..f7807da7 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "test": "tests" }, "scripts": { - "test": "npm run stylelint && eslint && npm run phpcs", "test:playwright": "playwright test -c tests/playwright/playwright.config.ts", "test:playwright:debug": "npm run test:playwright -- --debug", "test:playwright:ui": "npm run test:playwright -- --ui", @@ -20,9 +19,13 @@ "build": "webpack", "watch": "webpack --watch", "bundle": "ts-node scripts/bundle.ts", - "phpcs": "src/vendor/bin/phpcs -s --colors ./src/phpcs.xml", - "phpcbf": "src/vendor/bin/phpcbf ./src/phpcs.xml", - "stylelint": "stylelint --fix 'src/css/**/*.scss'", + "lint": "npm run lint:styles && npm run lint:js && npm run lint:php", + "lint:styles": "stylelint 'src/css/**/*.scss'", + "lint:styles:fix": "stylelint --fix 'src/css/**/*.scss'", + "lint:js": "eslint", + "lint:js:fix": "eslint --fix", + "lint:php": "src/vendor/bin/phpcs -s --colors ./src/phpcs.xml", + "lint:php:fix": "src/vendor/bin/phpcbf ./src/phpcs.xml", "version": "ts-node scripts/version.ts", "version-dev": "npm version --git-tag-version=false --preid=dev", "version-alpha": "npm version --git-tag-version=false --preid=alpha",