From 0386842b5d25730233362a73c11abebaa9844c76 Mon Sep 17 00:00:00 2001 From: Dmytro Kirpa Date: Fri, 13 Dec 2024 09:45:09 +0100 Subject: [PATCH] review feedback --- .../eslint-plugin-react-components/README.md | 4 ---- .../etc/eslint-plugin-react-components.api.md | 4 +--- .../src/rules/prefer-fluentui-v9.ts | 7 +------ 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/packages/react-components/eslint-plugin-react-components/README.md b/packages/react-components/eslint-plugin-react-components/README.md index b53b66bcdd2a1d..0b22544de65533 100644 --- a/packages/react-components/eslint-plugin-react-components/README.md +++ b/packages/react-components/eslint-plugin-react-components/README.md @@ -57,10 +57,6 @@ module.exports = { This rule ensures the use of Fluent UI v9 counterparts for Fluent UI v8 components. -#### Options - -- `unstable` (boolean): Whether to enforce Fluent UI v9 preview component migrations. - #### Examples **✅ Do** diff --git a/packages/react-components/eslint-plugin-react-components/etc/eslint-plugin-react-components.api.md b/packages/react-components/eslint-plugin-react-components/etc/eslint-plugin-react-components.api.md index 1c5903fb43dd25..df77b926b27757 100644 --- a/packages/react-components/eslint-plugin-react-components/etc/eslint-plugin-react-components.api.md +++ b/packages/react-components/eslint-plugin-react-components/etc/eslint-plugin-react-components.api.md @@ -22,9 +22,7 @@ export const plugin: { }; }; rules: { - "prefer-fluentui-v9": RuleModule<"replaceFluent8With9" | "replaceIconWithJsx" | "replaceStackWithFlex" | "replaceFocusZoneWithTabster", { - preview?: boolean | undefined; - }[], unknown, RuleListener>; + "prefer-fluentui-v9": RuleModule<"replaceFluent8With9" | "replaceIconWithJsx" | "replaceStackWithFlex" | "replaceFocusZoneWithTabster", {}[], unknown, RuleListener>; }; }; diff --git a/packages/react-components/eslint-plugin-react-components/src/rules/prefer-fluentui-v9.ts b/packages/react-components/eslint-plugin-react-components/src/rules/prefer-fluentui-v9.ts index 125a4b564de9c3..a2f1002d3f097b 100644 --- a/packages/react-components/eslint-plugin-react-components/src/rules/prefer-fluentui-v9.ts +++ b/packages/react-components/eslint-plugin-react-components/src/rules/prefer-fluentui-v9.ts @@ -13,12 +13,7 @@ export const rule = createRule({ docs: { description: 'This rule ensures the use of Fluent UI v9 counterparts for Fluent UI v8 components.', }, - schema: [ - { - type: 'object', - properties: {}, - }, - ], + schema: [], messages: { replaceFluent8With9: `Avoid importing {{ fluent8 }} from '@fluentui/react', as this package has started migration to Fluent UI 9. Import {{ fluent9 }} from '{{ package }}' instead.`, replaceIconWithJsx: `Avoid using Icon from '@fluentui/react', as this package has already migrated to Fluent UI 9. Use a JSX SVG icon from '@fluentui/react-icons' instead.`,