fix issue where linting/formatting npm scripts would not work on Windows

- linting bug changes to allow it working for both windows and mac
- resolving linting issues for windows in lint:format to allow prettier to run
pull/8669/head
anujaraj 2022-06-22 21:41:15 +05:30 zatwierdzone przez LB (Ben Johnston)
rodzic 013ff2179b
commit 8766277e44
3 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -69,6 +69,7 @@ Changelog
* Fix: Ensure that `DecimalBlock` preserves the `Decimal` type when retrieving from the database (Yves Serrano)
* Fix: When no snippets are added, ensure the snippet chooser modal would have the correct URL for creating a new snippet (Matt Westcott)
* Fix: `ngettext` in Wagtail's internal JavaScript internationalisation utilities now works (LB (Ben) Johnston)
* Fix: Ensure the linting/formatting npm scripts work on Windows (Anuja Verma)
3.0.1 (16.06.2022)

Wyświetl plik

@ -81,6 +81,7 @@ When using a queryset to render a list of images, you can now use the `prefetch_
* Ensure that `DecimalBlock` preserves the `Decimal` type when retrieving from the database (Yves Serrano)
* When no snippets are added, ensure the snippet chooser modal would have the correct URL for creating a new snippet (Matt Westcott)
* `ngettext` in Wagtail's internal JavaScript internationalisation utilities now works (LB (Ben) Johnston)
* Ensure the linting/formatting npm scripts work on Windows (Anuja Verma)
## Upgrade considerations

Wyświetl plik

@ -121,10 +121,10 @@
"start": "webpack --config ./client/webpack.config.js --mode development --progress --watch",
"build": "webpack --config ./client/webpack.config.js --mode production",
"fix:js": "eslint --ext .js,.ts,.tsx --fix .",
"format": "prettier --write '**/?(.)*.{css,scss,js,ts,tsx,json,yaml,yml}'",
"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:format": "prettier --check \"**/?(.)*.{css,scss,js,ts,tsx,json,yaml,yml}\"",
"lint": "npm run lint:js && npm run lint:css && npm run lint:format",
"test": "npm run test:unit",
"test:unit": "jest",