ci: update linting commands

This commit is contained in:
Ben Goldsworthy 2021-04-27 08:41:53 +01:00
parent 5de6719b9a
commit fb63c13125
2 changed files with 8 additions and 14 deletions

View file

@ -7,18 +7,14 @@
"release": "./_tools/release.sh", "release": "./_tools/release.sh",
"release:commit": "composer run release -- -c", "release:commit": "composer run release -- -c",
"build": "./_tools/build.sh", "build": "./_tools/build.sh",
"lint": "composer run lint:php && npm run lint", "lint": "composer run lint:php; npm run lint",
"lint:fix": "composer run lint:php:fix && npm run lint:fix", "lint:fix": "composer run lint:php:fix; npm run lint:fix",
"format": "npm run format",
"format:fix": "npm run format: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": "./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: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": "npm run lint:css",
"lint:css:fix": "npm run lint:css:fix", "lint:css:fix": "npm run lint:css:fix",
"lint:js": "npm run lint:js", "lint:js": "npm run lint:js",
"lint:js:fix": "npm run lint:js:fix", "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": "npm run lint:md",
"lint:md:fix": "npm run lint:md:fix", "lint:md:fix": "npm run lint:md:fix",
"lint:html": "npm run lint:html", "lint:html": "npm run lint:html",

View file

@ -2,22 +2,21 @@
"name": "footnotes", "name": "footnotes",
"scripts": { "scripts": {
"cm": "cz", "cm": "cz",
"format:js": "prettier './src/**/*.js'", "format:js": "prettier './src/**/*.js' --write",
"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; npm run validate:yaml",
"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; npm run validate:yaml",
"lint:fix": "npm run lint:js:fix && npm run lint:css:fix && npm run lint:md:fix && composer run lint:fix",
"lint:php": "composer run lint:php", "lint:php": "composer run lint:php",
"lint:php:fix": "composer run lint:php:fix", "lint:php:fix": "composer run lint:php:fix",
"lint:js": "npm run format:js && eslint \"./src/**/*.js\"", "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": "stylelint \"./src/**/*.css\"",
"lint:css:fix": "npm run lint:css -- --fix", "lint:css:fix": "npm run lint:css -- --fix",
"lint:md": "markdownlint '*.md'", "lint:md": "markdownlint '*.md'",
"lint:md:fix": "npm run lint:md -- --fix", "lint:md:fix": "npm run lint:md -- --fix",
"lint:html": "htmlhint ./src/**/*.html", "lint:html": "htmlhint './src/**/*.html'",
"validate": "npm run validate:yaml", "validate": "npm run validate:yaml",
"validate:yaml": "yaml-validator ./.github/workflows/*.yml", "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: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" "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" "composer run lint:php"
], ],
"*.js": [ "*.js": [
"npm run format:js:fix",
"npm run lint:js" "npm run lint:js"
], ],
"*.(sa|sc|c)ss": [ "*.(sa|sc|c)ss": [