From fb63c1312533a63dbc0a353d749d4d5b43b0eac6 Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Tue, 27 Apr 2021 08:41:53 +0100 Subject: [PATCH] ci: update linting commands --- composer.json | 8 ++------ package.json | 14 ++++++-------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/composer.json b/composer.json index 2ab4cd5..cfa892c 100644 --- a/composer.json +++ b/composer.json @@ -7,18 +7,14 @@ "release": "./_tools/release.sh", "release:commit": "composer run release -- -c", "build": "./_tools/build.sh", - "lint": "composer run lint:php && npm run lint", - "lint:fix": "composer run lint:php:fix && npm run lint:fix", - "format": "npm run format", - "format:fix": "npm run format:fix", + "lint": "composer run lint:php; npm run lint", + "lint:fix": "composer run lint:php:fix; npm run lint:fix", "lint:php": "./vendor/bin/phpcs --standard=WordPress,PHPCompatibilityWP --runtime-set testVersion 7.0- --colors --encoding=utf-8 -p --ignore=index.php ./src/*.php ./src/*/*.php ./src/*/*/*.php", "lint:php:fix": "./vendor/bin/phpcbf --standard=WordPress,PHPCompatibilityWP --runtime-set testVersion 7.0- --colors --encoding=utf-8 -p --ignore=index.php ./src/*.php ./src/*/*.php ./src/*/*/*.php", "lint:css": "npm run lint:css", "lint:css:fix": "npm run lint:css:fix", "lint:js": "npm run lint:js", "lint:js:fix": "npm run lint:js:fix", - "format:js": "npm run format:js", - "format:js:fix": "npm run format:js:fix", "lint:md": "npm run lint:md", "lint:md:fix": "npm run lint:md:fix", "lint:html": "npm run lint:html", diff --git a/package.json b/package.json index de386e4..450d88d 100644 --- a/package.json +++ b/package.json @@ -2,22 +2,21 @@ "name": "footnotes", "scripts": { "cm": "cz", - "format:js": "prettier './src/**/*.js'", - "format:js:fix": "npm run format:js -- --write", - "lint": "npm run lint:js && npm run lint:css && npm run lint:md && npm run lint:html && composer run lint", - "lint:fix": "npm run lint:js:fix && npm run lint:css:fix && npm run lint:md:fix && composer run lint:fix", + "format:js": "prettier './src/**/*.js' --write", + "lint": "npm run lint:js; npm run lint:css; npm run lint:md; npm run lint:html; npm run validate:yaml", + "lint:fix": "npm run lint:js:fix; npm run lint:css:fix; npm run lint:md:fix; npm run validate:yaml", "lint:php": "composer run lint:php", "lint:php:fix": "composer run lint:php:fix", "lint:js": "npm run format:js && eslint \"./src/**/*.js\"", - "lint:js:fix": "npm run format:js:fix && npm run lint:js -- --fix", + "lint:js:fix": "npm run format:js && npm run lint:js -- --fix", "lint:css": "stylelint \"./src/**/*.css\"", "lint:css:fix": "npm run lint:css -- --fix", "lint:md": "markdownlint '*.md'", "lint:md:fix": "npm run lint:md -- --fix", - "lint:html": "htmlhint ./src/**/*.html", + "lint:html": "htmlhint './src/**/*.html'", "validate": "npm run validate:yaml", "validate:yaml": "yaml-validator ./.github/workflows/*.yml", - "minify": "npm run minify:css && npm run minify:js", + "minify": "npm run minify:css; npm run minify:js", "minify:css": "for f in ./dist/*/css/*.css; do echo \"Minifying $f...\"; minify $f > $(dirname $f)/$(basename $f .css).min.css; done", "minify:js": "for f in ./dist/*/js/*.js; do echo \"Minifying $f...\"; minify $f > $(dirname $f)/$(basename $f .js).min.js; done" }, @@ -32,7 +31,6 @@ "composer run lint:php" ], "*.js": [ - "npm run format:js:fix", "npm run lint:js" ], "*.(sa|sc|c)ss": [