forked from microsoft/fluentui
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add eslint rule capability to ban exports of Commons types from react…
…-components (microsoft#21196)
- Loading branch information
1 parent
967d2e7
commit e208d6c
Showing
5 changed files
with
132 additions
and
46 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-eslint-plugin-e581f6ba-1682-40b1-9526-48c87c70a3f0.json
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,7 @@ | ||
{ | ||
"type": "minor", | ||
"comment": "Expand ban-imports rule to also support exports, and support regular expressions for names", | ||
"packageName": "@fluentui/eslint-plugin", | ||
"email": "elcraig@microsoft.com", | ||
"dependentChangeType": "none" | ||
} |
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 |
---|---|---|
@@ -1,4 +1,19 @@ | ||
{ | ||
"extends": ["plugin:@fluentui/eslint-plugin/react"], | ||
"root": true | ||
"root": true, | ||
"overrides": [ | ||
{ | ||
"files": "**/index.ts", | ||
"rules": { | ||
"@fluentui/ban-imports": [ | ||
"error", | ||
{ | ||
"pathRegex": ".*", | ||
"names": [{ "regex": "Commons$" }], | ||
"message": "Commons types should not be exported from @fluentui/react-components" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
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