Skip to content

Commit

Permalink
Fix RegExp escaping in readme
Browse files Browse the repository at this point in the history
In the `ignore` example the backslash in `'\.img$'` was escaping the "." as a string character, not in the RegExp sense.
  • Loading branch information
stephtr committed Dec 18, 2021
1 parent e156316 commit f7fa3d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/no-unresolved.md
Expand Up @@ -60,7 +60,7 @@ This rule has its own ignore list, separate from [`import/ignore`]. This is beca
To suppress errors from files that may not be properly resolved by your [resolver settings](../../README.md#resolver-plugins), you may add an `ignore` key with an array of `RegExp` pattern strings:

```js
/*eslint import/no-unresolved: [2, { ignore: ['\.img$'] }]*/
/*eslint import/no-unresolved: [2, { ignore: ['\\.img$'] }]*/

import { x } from './mod' // may be reported, if not resolved to a module

Expand Down

0 comments on commit f7fa3d5

Please sign in to comment.