From 950d66537d66bfe3ef6203fbcf91a5a69e41a029 Mon Sep 17 00:00:00 2001 From: Kael Zhang Date: Sun, 19 Dec 2021 11:45:36 +0800 Subject: [PATCH] #75: README.md: improves explanation of options.allowRelativePaths --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8f26cc6..584508c 100644 --- a/README.md +++ b/README.md @@ -330,9 +330,9 @@ Which is alternative to `options.ignoreCase` ### `options.allowRelativePaths?: boolean` since 5.2.0 -This option brings backward compatibility with projects which based on `ignore@4.x` +This option brings backward compatibility with projects which based on `ignore@4.x`. If `options.allowRelativePaths` is `true`, `ignore` will not check whether the given path to be tested is [`path.relative()`d](#pathname-conventions). -However, passing a relative path to test if it is ignored or not is not a good practise, which might lead to unexpected behavior +However, passing a relative path, such as `'./foo'` or `'../foo'`, to test if it is ignored or not is not a good practise, which might lead to unexpected behavior ```js ignore({