diff --git a/.stylelintrc.js b/.stylelintrc.js index 7b11d7db8d..c7a6c99182 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -47,6 +47,7 @@ module.exports = { // 'z-index', ], { + disableFix: true, ignoreValues: [ 'currentColor', 'inherit', diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 6824ad96e1..7d64a18fec 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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) diff --git a/docs/releases/5.2.md b/docs/releases/5.2.md index 0c59ed5352..0cf482ecf5 100644 --- a/docs/releases/5.2.md +++ b/docs/releases/5.2.md @@ -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 diff --git a/package.json b/package.json index 7ca4557d26..d34f560857 100644 --- a/package.json +++ b/package.json @@ -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",