From e70745325ff9e085acc6843dd8bfae5550645d4f Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Thu, 5 Dec 2019 00:32:49 +0100 Subject: [PATCH] Docs: Fix configuration example in no-restricted-imports (fixes #11717) (#12638) --- docs/rules/no-restricted-imports.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/rules/no-restricted-imports.md b/docs/rules/no-restricted-imports.md index 62747ebcecb1..e86544d2e6fe 100644 --- a/docs/rules/no-restricted-imports.md +++ b/docs/rules/no-restricted-imports.md @@ -38,20 +38,26 @@ When using the object form, you can also specify an array of gitignore-style pat You may also specify a custom message for any paths you want to restrict as follows: ```json -"no-restricted-imports": ["error", [{ - "name": "import-foo", - "message": "Please use import-bar instead." -}]] +"no-restricted-imports": ["error", { + "name": "import-foo", + "message": "Please use import-bar instead." +}, { + "name": "import-baz", + "message": "Please use import-quux instead." +}] ``` or like this: ```json "no-restricted-imports": ["error", { - "paths": [{ - "name": "import-foo", - "message": "Please use import-bar instead." - }] + "paths": [{ + "name": "import-foo", + "message": "Please use import-bar instead." + }, { + "name": "import-baz", + "message": "Please use import-quux instead." + }] }] ```