diff --git a/change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json b/change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json new file mode 100644 index 0000000000000..9c34ec3b1f7e4 --- /dev/null +++ b/change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json @@ -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" +} diff --git a/packages/eslint-plugin/src/configs/react.js b/packages/eslint-plugin/src/configs/react.js index a8e0890b78d02..b816184207e28 100644 --- a/packages/eslint-plugin/src/configs/react.js +++ b/packages/eslint-plugin/src/configs/react.js @@ -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 diff --git a/packages/react-components/.eslintrc.json b/packages/react-components/.eslintrc.json index 4b12a5aeb5fb8..88ce4c1493045 100644 --- a/packages/react-components/.eslintrc.json +++ b/packages/react-components/.eslintrc.json @@ -5,6 +5,7 @@ { "files": "**/index.ts", "rules": { + "@rnx-kit/no-export-all": ["error", { "expand": "all" }], "@fluentui/ban-imports": [ "error", {