0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-21 18:09:02 +01:00

Update npm scripts

- Add new stylelint fix script & generic 'fix' (all) script in npm scripts.
- Disable autofix on `stylelint-declaration-strict-value` as this requires a custom function to be created.
This commit is contained in:
LB Johnston 2023-08-02 08:24:26 +10:00 committed by LB (Ben Johnston)
parent 956db6adcf
commit fbde6118b7
4 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,7 @@ module.exports = {
// 'z-index',
],
{
disableFix: true,
ignoreValues: [
'currentColor',
'inherit',

View File

@ -8,6 +8,7 @@ Changelog
* Always set help text element ID for form fields with help text in `field.html` template (Sage Abdullah)
* Maintenance: Fix snippet search test to work on non-fallback database backends (Matt Westcott)
* Maintenance: Update Eslint, Prettier & Jest npm packages (LB (Ben) Johnston)
* Maintenance: Add npm scripts for TypeScript checks and formatting SCSS files (LB (Ben) Johnston)
5.1 (01.08.2023)

View File

@ -29,6 +29,7 @@ depth: 1
* Fix snippet search test to work on non-fallback database backends (Matt Westcott)
* Update Eslint, Prettier & Jest npm packages (LB (Ben) Johnston)
* Add npm scripts for TypeScript checks and formatting SCSS files (LB (Ben) Johnston)
## Upgrade considerations - changes affecting all projects

View File

@ -131,12 +131,15 @@
"scripts": {
"start": "webpack --config ./client/webpack.config.js --mode development --progress --watch",
"build": "webpack --config ./client/webpack.config.js --mode production",
"fix:css": "stylelint --fix **/*.scss",
"fix:js": "eslint --ext .js,.ts,.tsx --fix .",
"fix": "npm run fix:css && npm run fix:js",
"format": "prettier --write \"**/?(.)*.{css,scss,js,ts,tsx,json,yaml,yml}\"",
"lint:js": "eslint --ext .js,.ts,.tsx --report-unused-disable-directives .",
"lint:css": "stylelint **/*.scss",
"lint:format": "prettier --check \"**/?(.)*.{css,scss,js,ts,tsx,json,yaml,yml}\"",
"lint": "npm run lint:js && npm run lint:css && npm run lint:format",
"lint:ts": "tsc --noEmit",
"lint": "npm run lint:js && npm run lint:ts && npm run lint:css && npm run lint:format",
"test": "npm run test:unit",
"test:unit": "jest",
"test:unit:watch": "jest --watch",