-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#75: README.md: improves explanation of options.allowRelativePaths
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 `[email protected]` | ||
This option brings backward compatibility with projects which based on `[email protected]`. 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({ | ||
|