Skip to content

Commit b067a58

Browse files
committed
docs: update docs for rule filename-blocklist
1 parent 99a1349 commit b067a58

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/rules/filename-blocklist.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ src/foo.models.ts
2929
src/bar.models.ts
3030
```
3131

32+
:warning: :warning: :warning:
33+
34+
**Versions <= v2.0.0 can only select target files by their filenames, not by their paths. This support has been deprecated and will be removed in the future. Please select your target files by their file path. For example, using `**/*.js` instead of `*.js` to select all `js` files.**
35+
3236

3337
### Options
3438

lib/rules/filename-blocklist.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ module.exports = {
6363
)) {
6464
const matchResult =
6565
matchRule(filenameWithPath, blockListPattern) ||
66+
// legacy support for versions <= 2.0.0
67+
// file only can be specified by its filename, not by file path pattern
68+
// it's a legacy feature, will be removed in the future
6669
matchRule(filename, blockListPattern);
6770

6871
if (matchResult) {

0 commit comments

Comments
 (0)