From d92fcb639ab26426653ddd78206edcf28e3ae009 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Fri, 11 Mar 2022 15:37:12 +0100 Subject: [PATCH 1/4] feat(eslint-plugin): enable no-export-all:all for all packages public API --- packages/eslint-plugin/src/configs/react.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/eslint-plugin/src/configs/react.js b/packages/eslint-plugin/src/configs/react.js index a8e0890b78d021..b816184207e28b 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 From 403b7dcd5323711e1ed743020d65a3ccb678d306 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Fri, 11 Mar 2022 15:40:50 +0100 Subject: [PATCH 2/4] Change files --- ...eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json 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 00000000000000..386aedf72889d0 --- /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": "patch" +} From d234e61e32e723d6ffb2eae473a2fc11cdc0685a Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Fri, 11 Mar 2022 16:15:46 +0100 Subject: [PATCH 3/4] temporarily override export start lint rule so it still errors --- packages/react-components/.eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-components/.eslintrc.json b/packages/react-components/.eslintrc.json index 4b12a5aeb5fb86..88ce4c14930459 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", { From 4bb197ef5e8e6d1830be9648a31352ccb9cc628f Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Tue, 15 Mar 2022 11:35:03 +0100 Subject: [PATCH 4/4] Update change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json Co-authored-by: Elizabeth Craig --- ...ntui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json b/change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json index 386aedf72889d0..9c34ec3b1f7e4e 100644 --- a/change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json +++ b/change/@fluentui-eslint-plugin-4067e75c-636a-4ca2-a360-3d1e3e43a9bb.json @@ -3,5 +3,5 @@ "comment": "feat(eslint-plugin): enable no-export-all:all for all packages public API", "packageName": "@fluentui/eslint-plugin", "email": "martinhochel@microsoft.com", - "dependentChangeType": "patch" + "dependentChangeType": "none" }