Skip to content

Commit

Permalink
feat(eslint-plugin): enable no-export-all:all for all packages public… (
Browse files Browse the repository at this point in the history
#22073)

* feat(eslint-plugin): enable no-export-all:all for all packages public API

* Change files

* temporarily override export start lint rule so it still errors

* Update change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json

Co-authored-by: Elizabeth Craig <ecraig12345@gmail.com>

Co-authored-by: Elizabeth Craig <ecraig12345@gmail.com>
  • Loading branch information
Hotell and ecraig12345 authored Mar 15, 2022
1 parent 5c1c600 commit fcbdedc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "feat(eslint-plugin): enable no-export-all:all for all packages public API",
"packageName": "@fluentui/eslint-plugin",
"email": "martinhochel@microsoft.com",
"dependentChangeType": "none"
}
7 changes: 7 additions & 0 deletions packages/eslint-plugin/src/configs/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,13 @@ const typeAwareRules = {
const getOverrides = () => [
// Enable rules requiring type info only for appropriate files/circumstances
...configHelpers.getTypeInfoRuleOverrides(typeAwareRules),
{
files: '**/src/index.{ts,tsx,js}',
rules: {
// TODO: propagate to `error` once all packages barrel files have been fixed
'@rnx-kit/no-export-all': ['warn', { expand: 'all' }],
},
},
{
files: '**/*.{ts,tsx}',
// This turns off a few rules that don't work or are unnecessary for TS, and enables a few
Expand Down
1 change: 1 addition & 0 deletions packages/react-components/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{
"files": "**/index.ts",
"rules": {
"@rnx-kit/no-export-all": ["error", { "expand": "all" }],
"@fluentui/ban-imports": [
"error",
{
Expand Down

0 comments on commit fcbdedc

Please sign in to comment.