From 32f20fe3053d2672bfa2ab89d02e987aaaaa143b Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Wed, 24 Jul 2024 17:19:45 +0100 Subject: [PATCH] chore: configur eprettier correctly --- .prettierignore | 1 + docs/docs/@fetch-mock/core/more-routing-methods.md | 2 +- docs/docs/@fetch-mock/core/route/matcher.md | 3 ++- package.json | 9 +++++++-- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..83b69470 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +CHANGELOG.md \ No newline at end of file diff --git a/docs/docs/@fetch-mock/core/more-routing-methods.md b/docs/docs/@fetch-mock/core/more-routing-methods.md index 28b2ba27..bfa6b7b6 100644 --- a/docs/docs/@fetch-mock/core/more-routing-methods.md +++ b/docs/docs/@fetch-mock/core/more-routing-methods.md @@ -5,7 +5,7 @@ sidebar_label: More routing methods # More routing methods -These methods allow defining routes for common use cases while avoiding writing hard to read configuration objects. They all return the fetchMock instance, and are therefor chainable. Unless noted otherwise, each of the methods below have the same signature as `.route()`. +These methods allow defining routes for common use cases while avoiding writing hard to read configuration objects. They all return the fetchMock instance, and are therefor chainable. Unless noted otherwise, each of the methods below have the same signature as `.route()`. ## .catch() diff --git a/docs/docs/@fetch-mock/core/route/matcher.md b/docs/docs/@fetch-mock/core/route/matcher.md index 1e24eec5..5edac634 100644 --- a/docs/docs/@fetch-mock/core/route/matcher.md +++ b/docs/docs/@fetch-mock/core/route/matcher.md @@ -78,7 +78,8 @@ When the `express:` keyword is used in a string matcher, it can be combined with } ``` -The values of express parameters are made available in the `expressParams` property when +The values of express parameters are made available in the `expressParams` property when + - [Inspecting call history](/fetch-mock/docs/@fetch-mock/core/CallHistory#calllog-schema) - [Using a function to construct a response](/fetch-mock/docs/@fetch-mock/core/route/response#function) diff --git a/package.json b/package.json index 37257593..8f0dff1e 100644 --- a/package.json +++ b/package.json @@ -21,8 +21,10 @@ "docs" ], "scripts": { - "lint": "eslint --cache --fix --ext .js,.cjs . && prettier --cache --write *.md docs/**/*.md docs/**/**/*.md", - "lint:ci": "eslint --ext .js,.cjs . && prettier *.md docs/**/*.md docs/**/**/*.md", + "lint": "eslint --cache --fix --ext .js,.cjs .", + "lint:ci": "eslint --ext .js,.cjs .", + "prettier": "prettier --cache --write *.md \"./**/*.md\"", + "prettier:ci": "prettier *.md \"./**/*.md\"", "types:check": "tsc --project ./jsconfig.json", "types:lint": "dtslint --expectOnly packages/fetch-mock/types", "prepare": "husky || echo \"husky not available\"", @@ -72,6 +74,9 @@ "lint-staged": { "**/*.js": [ "npm run lint && npm run types:check" + ], + "**/*.md":[ + "npm run prettier" ] } }