ci: update linting commands
This commit is contained in:
parent
5de6719b9a
commit
fb63c13125
2 changed files with 8 additions and 14 deletions
|
@ -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",
|
||||
|
|
14
package.json
14
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": [
|
||||
|
|
Reference in a new issue