Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: no-restricted-imports support casing
Path matching in `.gitignore` can be case-sensitive, and ignore@5.2.0 supports this as well as maintains support for relative paths, whose support was dropped after 4.0.6 but restored in 5.2.0 (this was a blocker for past upgrades). By default, this rule remains case-insensitive to maintain backwards compatibility with earlier versions. Only by explicitly specifying it in a custom pattern object can it be triggered.
- Loading branch information
Showing
6 changed files
with
82 additions
and
4 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
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @fileoverview Create instance of Ignore validator. | ||
* @author gfyoung | ||
*/ | ||
"use strict"; | ||
|
||
//------------------------------------------------------------------------------ | ||
// Requirements | ||
//------------------------------------------------------------------------------ | ||
|
||
const ignoreFactory = require("ignore"); | ||
|
||
//------------------------------------------------------------------------------ | ||
// Public Interface | ||
//------------------------------------------------------------------------------ | ||
|
||
module.exports = (additionalOptions = {}) => { | ||
const ignore = ignoreFactory({ | ||
allowRelativePaths: true, | ||
...additionalOptions | ||
}); | ||
|
||
return ignore; | ||
}; |
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
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