Skip to content

Commit

Permalink
#75: README.md: improves explanation of options.allowRelativePaths
Browse files Browse the repository at this point in the history
  • Loading branch information
kaelzhang committed Dec 19, 2021
1 parent 052a722 commit 950d665
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -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({
Expand Down

0 comments on commit 950d665

Please sign in to comment.