diff --git a/.env.local b/.env.local new file mode 100644 index 00000000000000..5fde6dc938e591 --- /dev/null +++ b/.env.local @@ -0,0 +1,2 @@ +# TODO: remove after migration to flat eslint configs +ESLINT_USE_FLAT_CONFIG=false diff --git a/apps/chart-docsite/.eslintrc.json b/apps/chart-docsite/.eslintrc.json index 45462ffe5954dc..89c248171fdd41 100644 --- a/apps/chart-docsite/.eslintrc.json +++ b/apps/chart-docsite/.eslintrc.json @@ -4,7 +4,14 @@ "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", - "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }] + "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }], + "overrides": [ + { + "files": ["src/**/*.{tsx,ts}"], + "rules": { + "@typescript-eslint/no-deprecated": "off" + } + } + ] } } diff --git a/apps/pr-deploy-site/.eslintrc.json b/apps/pr-deploy-site/.eslintrc.json deleted file mode 100644 index 75b0d9e79f26dc..00000000000000 --- a/apps/pr-deploy-site/.eslintrc.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node"], - "root": true, - "overrides": [ - { - // pr-deploy-site.js is run without transpiling in all browsers, which means it must use - // IE 11-compatible syntax as long as we still support IE 11. - "files": ["pr-deploy-site.js"], - "plugins": ["es"], - "extends": ["plugin:es/restrict-to-es2015", "plugin:@microsoft/eslint-plugin-sdl/required"], - "rules": { - // turn off conflicting or unwanted rules from normal set - "curly": "off", - "no-var": "off", - "vars-on-top": "off", - "prefer-arrow-callback": "off", - "no-restricted-globals": "off" - } - } - ] -} diff --git a/apps/pr-deploy-site/eslint.config.js b/apps/pr-deploy-site/eslint.config.js new file mode 100644 index 00000000000000..b5f3fe55818431 --- /dev/null +++ b/apps/pr-deploy-site/eslint.config.js @@ -0,0 +1,29 @@ +const js = require('@eslint/js'); +const sdl = require('@microsoft/eslint-plugin-sdl'); +const es = require('eslint-plugin-es'); +const { FlatCompat } = require('@eslint/eslintrc'); + +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}); + +module.exports = [ + ...compat.extends('plugin:@fluentui/eslint-plugin/node'), + ...sdl.configs.recommended, + { + files: ['**/pr-deploy-site.js'], + plugins: { + es, + }, + + rules: { + curly: 'off', + 'no-var': 'off', + 'vars-on-top': 'off', + 'prefer-arrow-callback': 'off', + 'no-restricted-globals': 'off', + }, + }, +]; diff --git a/apps/pr-deploy-site/package.json b/apps/pr-deploy-site/package.json index a0f42e46d06d64..d694f119735d55 100644 --- a/apps/pr-deploy-site/package.json +++ b/apps/pr-deploy-site/package.json @@ -7,7 +7,7 @@ "scripts": { "clean": "just-scripts clean", "generate:site": "just-scripts generate:site", - "lint": "eslint --ext .js,.ts --cache .", + "lint": "eslint --cache .", "type-check": "tsc -p . --noEmit" }, "license": "MIT", diff --git a/apps/public-docsite-resources/.eslintrc.json b/apps/public-docsite-resources/.eslintrc.json index b9cc959897e9b2..c3cf568a1793cd 100644 --- a/apps/public-docsite-resources/.eslintrc.json +++ b/apps/public-docsite-resources/.eslintrc.json @@ -5,7 +5,6 @@ "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/explicit-member-accessibility": "off", "@typescript-eslint/member-ordering": "off", - "deprecation/deprecation": "off", "no-restricted-globals": "off" } } diff --git a/apps/public-docsite-v9/.eslintrc.json b/apps/public-docsite-v9/.eslintrc.json index 45462ffe5954dc..52c2a1e796faa6 100644 --- a/apps/public-docsite-v9/.eslintrc.json +++ b/apps/public-docsite-v9/.eslintrc.json @@ -4,7 +4,14 @@ "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }] - } + }, + "overrides": [ + { + "files": ["src/**/*.{tsx,ts}"], + "rules": { + "@typescript-eslint/no-deprecated": "off" + } + } + ] } diff --git a/apps/public-docsite-v9/src/Concepts/Positioning/PositioningAutoSize.stories.tsx b/apps/public-docsite-v9/src/Concepts/Positioning/PositioningAutoSize.stories.tsx index cfb1dfb54304fe..76c506b425a971 100644 --- a/apps/public-docsite-v9/src/Concepts/Positioning/PositioningAutoSize.stories.tsx +++ b/apps/public-docsite-v9/src/Concepts/Positioning/PositioningAutoSize.stories.tsx @@ -68,7 +68,7 @@ export const AutoSizeForSmallViewport = () => { {Array.from({ length: menuItemCount }, (_, i) => ( - Item {i} + Item {i} ))} diff --git a/apps/public-docsite-v9/src/Concepts/Positioning/PositioningShiftToCoverTarget.stories.tsx b/apps/public-docsite-v9/src/Concepts/Positioning/PositioningShiftToCoverTarget.stories.tsx index b6dfb48cadfc0b..4ce61533f73e40 100644 --- a/apps/public-docsite-v9/src/Concepts/Positioning/PositioningShiftToCoverTarget.stories.tsx +++ b/apps/public-docsite-v9/src/Concepts/Positioning/PositioningShiftToCoverTarget.stories.tsx @@ -112,7 +112,7 @@ export const CoverTargetForSmallViewport = () => { {Array.from({ length: menuItemCount }, (_, i) => ( - Item {i} + Item {i} ))} diff --git a/apps/public-docsite/.eslintrc.json b/apps/public-docsite/.eslintrc.json index 4a1010d7c11d98..8ee4a2176e324b 100644 --- a/apps/public-docsite/.eslintrc.json +++ b/apps/public-docsite/.eslintrc.json @@ -3,8 +3,7 @@ "root": true, "rules": { "@typescript-eslint/no-explicit-any": "off", - "deprecation/deprecation": "off", - "import/no-webpack-loader-syntax": "off", // ok in this project + "import/no-webpack-loader-syntax": "off", "prefer-const": "off", "react/jsx-no-bind": "off", "no-restricted-globals": "off" diff --git a/apps/public-docsite/src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx b/apps/public-docsite/src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx index 8ce1e823b4a0d9..7d8c3225e569f0 100644 --- a/apps/public-docsite/src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx +++ b/apps/public-docsite/src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx @@ -26,6 +26,7 @@ export const FabricIconsPage: React.FunctionComponent = props }; function _otherSections(platform: Platforms): IPageSectionProps[] { + // eslint-disable-next-line react-hooks/rules-of-hooks const [selectedItem, setSelectedItem] = React.useState('react-font'); switch (platform) { case 'web': diff --git a/apps/theming-designer/.eslintrc.json b/apps/theming-designer/.eslintrc.json index 0d9ca4c10f823d..2a1cbfeaf5e8ab 100644 --- a/apps/theming-designer/.eslintrc.json +++ b/apps/theming-designer/.eslintrc.json @@ -3,7 +3,6 @@ "root": true, "rules": { "@typescript-eslint/no-explicit-any": "off", - "deprecation/deprecation": "off", "prefer-const": "off", "no-restricted-globals": "off" } diff --git a/apps/vr-tests-react-components/.eslintrc.json b/apps/vr-tests-react-components/.eslintrc.json index 3301180702eb44..636b1b1643fdf9 100644 --- a/apps/vr-tests-react-components/.eslintrc.json +++ b/apps/vr-tests-react-components/.eslintrc.json @@ -7,8 +7,15 @@ "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/naming-convention": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }], "@nx/workspace-no-restricted-globals": "off" - } + }, + "overrides": [ + { + "files": ["**/*.{ts,tsx}"], + "rules": { + "@typescript-eslint/no-deprecated": "off" + } + } + ] } diff --git a/apps/vr-tests/.eslintrc.json b/apps/vr-tests/.eslintrc.json index 54ac641d7b3bfc..79cd49d2f6fec3 100644 --- a/apps/vr-tests/.eslintrc.json +++ b/apps/vr-tests/.eslintrc.json @@ -4,7 +4,6 @@ "rules": { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/jsx-no-bind": "off", - "deprecation/deprecation": "off", "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }], "no-restricted-globals": "off" } diff --git a/change/@fluentui-codemods-8844cd55-d23f-4d69-bddc-dea4d3bf53b1.json b/change/@fluentui-codemods-8844cd55-d23f-4d69-bddc-dea4d3bf53b1.json new file mode 100644 index 00000000000000..f22a8b8b5a2dd1 --- /dev/null +++ b/change/@fluentui-codemods-8844cd55-d23f-4d69-bddc-dea4d3bf53b1.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/codemods", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-eslint-plugin-274b7762-1e9f-4acf-9564-8a5807f28fab.json b/change/@fluentui-eslint-plugin-274b7762-1e9f-4acf-9564-8a5807f28fab.json new file mode 100644 index 00000000000000..1f9840d915e2fb --- /dev/null +++ b/change/@fluentui-eslint-plugin-274b7762-1e9f-4acf-9564-8a5807f28fab.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: update eslint dependencies", + "packageName": "@fluentui/eslint-plugin", + "email": "vgenaev@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-eslint-plugin-react-components-5aa6f121-e497-4541-8421-fc1891260c39.json b/change/@fluentui-eslint-plugin-react-components-5aa6f121-e497-4541-8421-fc1891260c39.json new file mode 100644 index 00000000000000..d2b7a6faf3dd00 --- /dev/null +++ b/change/@fluentui-eslint-plugin-react-components-5aa6f121-e497-4541-8421-fc1891260c39.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: update eslint dependencies", + "packageName": "@fluentui/eslint-plugin-react-components", + "email": "vgenaev@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-font-icons-mdl2-d304ab60-9b4c-4534-9847-227f7429d183.json b/change/@fluentui-font-icons-mdl2-d304ab60-9b4c-4534-9847-227f7429d183.json new file mode 100644 index 00000000000000..d3bd69a7d5d9c9 --- /dev/null +++ b/change/@fluentui-font-icons-mdl2-d304ab60-9b4c-4534-9847-227f7429d183.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin if favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/font-icons-mdl2", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-foundation-legacy-718eda53-f7ee-4984-9d03-d28b6d45f5e6.json b/change/@fluentui-foundation-legacy-718eda53-f7ee-4984-9d03-d28b6d45f5e6.json new file mode 100644 index 00000000000000..07bfd61ab012ad --- /dev/null +++ b/change/@fluentui-foundation-legacy-718eda53-f7ee-4984-9d03-d28b6d45f5e6.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/foundation-legacy", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-keyboard-key-71a90dec-416d-4f44-ad68-f42d06acbb8d.json b/change/@fluentui-keyboard-key-71a90dec-416d-4f44-ad68-f42d06acbb8d.json new file mode 100644 index 00000000000000..1aedbb4f838cf7 --- /dev/null +++ b/change/@fluentui-keyboard-key-71a90dec-416d-4f44-ad68-f42d06acbb8d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/keyboard-key", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-merge-styles-6ebebfc1-e789-4480-b8a9-33b0baffeb4a.json b/change/@fluentui-merge-styles-6ebebfc1-e789-4480-b8a9-33b0baffeb4a.json new file mode 100644 index 00000000000000..39c7e0393c4aa2 --- /dev/null +++ b/change/@fluentui-merge-styles-6ebebfc1-e789-4480-b8a9-33b0baffeb4a.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/merge-styles", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-public-docsite-setup-36190617-d9fe-4518-ac46-6d6a4ed9e20f.json b/change/@fluentui-public-docsite-setup-36190617-d9fe-4518-ac46-6d6a4ed9e20f.json new file mode 100644 index 00000000000000..78784f97fce334 --- /dev/null +++ b/change/@fluentui-public-docsite-setup-36190617-d9fe-4518-ac46-6d6a4ed9e20f.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: use eslint flat config", + "packageName": "@fluentui/public-docsite-setup", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-84852e0e-0bf5-4548-bcdc-5415cbfcbdcb.json b/change/@fluentui-react-84852e0e-0bf5-4548-bcdc-5415cbfcbdcb.json new file mode 100644 index 00000000000000..5ef600141092e7 --- /dev/null +++ b/change/@fluentui-react-84852e0e-0bf5-4548-bcdc-5415cbfcbdcb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-accordion-ba907847-cc03-4112-95ad-542ba88a4cb1.json b/change/@fluentui-react-accordion-ba907847-cc03-4112-95ad-542ba88a4cb1.json new file mode 100644 index 00000000000000..07ee532024c0b7 --- /dev/null +++ b/change/@fluentui-react-accordion-ba907847-cc03-4112-95ad-542ba88a4cb1.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-accordion", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-aria-57b925e1-eccf-4f91-a485-dd0131657734.json b/change/@fluentui-react-aria-57b925e1-eccf-4f91-a485-dd0131657734.json new file mode 100644 index 00000000000000..0c2287854f9836 --- /dev/null +++ b/change/@fluentui-react-aria-57b925e1-eccf-4f91-a485-dd0131657734.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-aria", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-avatar-92d7f766-cf8d-4331-8f34-38ac12c87bcc.json b/change/@fluentui-react-avatar-92d7f766-cf8d-4331-8f34-38ac12c87bcc.json new file mode 100644 index 00000000000000..d3b3f5e7f46f58 --- /dev/null +++ b/change/@fluentui-react-avatar-92d7f766-cf8d-4331-8f34-38ac12c87bcc.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-avatar", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-calendar-compat-4afe6ed7-ff63-4bd2-b0bd-6397368c66df.json b/change/@fluentui-react-calendar-compat-4afe6ed7-ff63-4bd2-b0bd-6397368c66df.json new file mode 100644 index 00000000000000..df05495f5e8b41 --- /dev/null +++ b/change/@fluentui-react-calendar-compat-4afe6ed7-ff63-4bd2-b0bd-6397368c66df.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-calendar-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-charting-be2804a1-36a4-468f-b286-140ffd7ba3d8.json b/change/@fluentui-react-charting-be2804a1-36a4-468f-b286-140ffd7ba3d8.json new file mode 100644 index 00000000000000..8e4275c1b8f2c8 --- /dev/null +++ b/change/@fluentui-react-charting-be2804a1-36a4-468f-b286-140ffd7ba3d8.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-charting", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-color-picker-preview-8e27d256-8f2c-4f6d-8de8-24aef5ca5b78.json b/change/@fluentui-react-color-picker-preview-8e27d256-8f2c-4f6d-8de8-24aef5ca5b78.json new file mode 100644 index 00000000000000..803c2a06152890 --- /dev/null +++ b/change/@fluentui-react-color-picker-preview-8e27d256-8f2c-4f6d-8de8-24aef5ca5b78.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-color-picker-preview", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-combobox-a2d971d5-ed8e-4644-8508-270e6ad4f44f.json b/change/@fluentui-react-combobox-a2d971d5-ed8e-4644-8508-270e6ad4f44f.json new file mode 100644 index 00000000000000..adfdf3485f0699 --- /dev/null +++ b/change/@fluentui-react-combobox-a2d971d5-ed8e-4644-8508-270e6ad4f44f.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-combobox", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-components-7c5c9f7a-49fd-485d-a98a-5ec800f32948.json b/change/@fluentui-react-components-7c5c9f7a-49fd-485d-a98a-5ec800f32948.json new file mode 100644 index 00000000000000..5552c02a7d5795 --- /dev/null +++ b/change/@fluentui-react-components-7c5c9f7a-49fd-485d-a98a-5ec800f32948.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-components", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-conformance-16fdfc71-2c17-4034-b573-b04f57d9eb4a.json b/change/@fluentui-react-conformance-16fdfc71-2c17-4034-b573-b04f57d9eb4a.json new file mode 100644 index 00000000000000..4f807a97a88e94 --- /dev/null +++ b/change/@fluentui-react-conformance-16fdfc71-2c17-4034-b573-b04f57d9eb4a.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-conformance", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-date-time-38666fb3-518b-4db4-a7c0-d81f04086114.json b/change/@fluentui-react-date-time-38666fb3-518b-4db4-a7c0-d81f04086114.json new file mode 100644 index 00000000000000..9a0117a04038a5 --- /dev/null +++ b/change/@fluentui-react-date-time-38666fb3-518b-4db4-a7c0-d81f04086114.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-date-time", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-experiments-18c8afb1-71f9-4a1b-b9d2-7c19585ea180.json b/change/@fluentui-react-experiments-18c8afb1-71f9-4a1b-b9d2-7c19585ea180.json new file mode 100644 index 00000000000000..0624fad904b258 --- /dev/null +++ b/change/@fluentui-react-experiments-18c8afb1-71f9-4a1b-b9d2-7c19585ea180.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-experiments", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-focus-169258aa-b0b4-431c-9519-c6a71329a50b.json b/change/@fluentui-react-focus-169258aa-b0b4-431c-9519-c6a71329a50b.json new file mode 100644 index 00000000000000..4a557c22595c3f --- /dev/null +++ b/change/@fluentui-react-focus-169258aa-b0b4-431c-9519-c6a71329a50b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-focus", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-icons-compat-a1cdd0c2-a09b-43af-91c3-793247a23f69.json b/change/@fluentui-react-icons-compat-a1cdd0c2-a09b-43af-91c3-793247a23f69.json new file mode 100644 index 00000000000000..6a3b3068af286e --- /dev/null +++ b/change/@fluentui-react-icons-compat-a1cdd0c2-a09b-43af-91c3-793247a23f69.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-icons-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-menu-277490f3-ee7e-4b9f-9c90-ed35bb918f55.json b/change/@fluentui-react-menu-277490f3-ee7e-4b9f-9c90-ed35bb918f55.json new file mode 100644 index 00000000000000..6660ea7bb23d75 --- /dev/null +++ b/change/@fluentui-react-menu-277490f3-ee7e-4b9f-9c90-ed35bb918f55.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-menu", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-message-bar-e0209ae1-250c-49ff-8b46-2715b064144b.json b/change/@fluentui-react-message-bar-e0209ae1-250c-49ff-8b46-2715b064144b.json new file mode 100644 index 00000000000000..a76ab161df95e2 --- /dev/null +++ b/change/@fluentui-react-message-bar-e0209ae1-250c-49ff-8b46-2715b064144b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-message-bar", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-monaco-editor-4813db8a-ede3-4b35-9d35-80eb8aba5ddc.json b/change/@fluentui-react-monaco-editor-4813db8a-ede3-4b35-9d35-80eb8aba5ddc.json new file mode 100644 index 00000000000000..0160998ddd2273 --- /dev/null +++ b/change/@fluentui-react-monaco-editor-4813db8a-ede3-4b35-9d35-80eb8aba5ddc.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-monaco-editor", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-5930535f-65f7-460d-a1bc-fc9f13fe8bda.json b/change/@fluentui-react-motion-5930535f-65f7-460d-a1bc-fc9f13fe8bda.json new file mode 100644 index 00000000000000..a544c560d03986 --- /dev/null +++ b/change/@fluentui-react-motion-5930535f-65f7-460d-a1bc-fc9f13fe8bda.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-motion", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-components-preview-c540a5a2-049f-4f49-a9e0-3276048852df.json b/change/@fluentui-react-motion-components-preview-c540a5a2-049f-4f49-a9e0-3276048852df.json new file mode 100644 index 00000000000000..4031438c2c572f --- /dev/null +++ b/change/@fluentui-react-motion-components-preview-c540a5a2-049f-4f49-a9e0-3276048852df.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-motion-components-preview", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-popover-e3209737-10b8-4203-8c93-2dee5536b5e7.json b/change/@fluentui-react-popover-e3209737-10b8-4203-8c93-2dee5536b5e7.json new file mode 100644 index 00000000000000..2bad9e41e6fd05 --- /dev/null +++ b/change/@fluentui-react-popover-e3209737-10b8-4203-8c93-2dee5536b5e7.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-popover", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-positioning-d55be656-25b5-43b5-9dbe-d33789d427e6.json b/change/@fluentui-react-positioning-d55be656-25b5-43b5-9dbe-d33789d427e6.json new file mode 100644 index 00000000000000..a9a5d08c078c54 --- /dev/null +++ b/change/@fluentui-react-positioning-d55be656-25b5-43b5-9dbe-d33789d427e6.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-positioning", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-radio-cf74dd79-55db-40a6-af9a-8eae8bcd5715.json b/change/@fluentui-react-radio-cf74dd79-55db-40a6-af9a-8eae8bcd5715.json new file mode 100644 index 00000000000000..bf49adae2d705c --- /dev/null +++ b/change/@fluentui-react-radio-cf74dd79-55db-40a6-af9a-8eae8bcd5715.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-radio", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-switch-852ebfe0-2546-4d47-912a-e0bca0191716.json b/change/@fluentui-react-switch-852ebfe0-2546-4d47-912a-e0bca0191716.json new file mode 100644 index 00000000000000..6f6f9e441e4416 --- /dev/null +++ b/change/@fluentui-react-switch-852ebfe0-2546-4d47-912a-e0bca0191716.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-switch", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-table-0abb1dae-b609-42db-aed0-eb536ad1fe59.json b/change/@fluentui-react-table-0abb1dae-b609-42db-aed0-eb536ad1fe59.json new file mode 100644 index 00000000000000..02b9b7032cee7c --- /dev/null +++ b/change/@fluentui-react-table-0abb1dae-b609-42db-aed0-eb536ad1fe59.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-table", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabs-0d16f9ad-4db0-4957-9236-c9783b0e4657.json b/change/@fluentui-react-tabs-0d16f9ad-4db0-4957-9236-c9783b0e4657.json new file mode 100644 index 00000000000000..e0760eae627830 --- /dev/null +++ b/change/@fluentui-react-tabs-0d16f9ad-4db0-4957-9236-c9783b0e4657.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-tabs", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabster-663acc3d-4efd-448a-bfad-9ddc7c033176.json b/change/@fluentui-react-tabster-663acc3d-4efd-448a-bfad-9ddc7c033176.json new file mode 100644 index 00000000000000..11e2da635f85d4 --- /dev/null +++ b/change/@fluentui-react-tabster-663acc3d-4efd-448a-bfad-9ddc7c033176.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-tabster", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tooltip-afd399a3-0d9f-48f0-9242-4f125f65e05d.json b/change/@fluentui-react-tooltip-afd399a3-0d9f-48f0-9242-4f125f65e05d.json new file mode 100644 index 00000000000000..fcd5b7d60c2b8b --- /dev/null +++ b/change/@fluentui-react-tooltip-afd399a3-0d9f-48f0-9242-4f125f65e05d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-tooltip", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tree-b517e645-3d09-4d83-a066-5cb0c885fdf8.json b/change/@fluentui-react-tree-b517e645-3d09-4d83-a066-5cb0c885fdf8.json new file mode 100644 index 00000000000000..11a474ed2a4058 --- /dev/null +++ b/change/@fluentui-react-tree-b517e645-3d09-4d83-a066-5cb0c885fdf8.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-tree", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-utilities-51a533ed-1fd2-4f6f-ba3c-d7da49d7ee15.json b/change/@fluentui-react-utilities-51a533ed-1fd2-4f6f-ba3c-d7da49d7ee15.json new file mode 100644 index 00000000000000..c43086594b8536 --- /dev/null +++ b/change/@fluentui-react-utilities-51a533ed-1fd2-4f6f-ba3c-d7da49d7ee15.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-virtualizer-fdfcb88d-56ce-477f-bf7f-190fbf08e8bf.json b/change/@fluentui-react-virtualizer-fdfcb88d-56ce-477f-bf7f-190fbf08e8bf.json new file mode 100644 index 00000000000000..7612fd91be7150 --- /dev/null +++ b/change/@fluentui-react-virtualizer-fdfcb88d-56ce-477f-bf7f-190fbf08e8bf.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/react-virtualizer", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-style-utilities-eded5b2d-7cf3-48d0-a7eb-1299b5da0b79.json b/change/@fluentui-style-utilities-eded5b2d-7cf3-48d0-a7eb-1299b5da0b79.json new file mode 100644 index 00000000000000..de994713cda428 --- /dev/null +++ b/change/@fluentui-style-utilities-eded5b2d-7cf3-48d0-a7eb-1299b5da0b79.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/style-utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-theme-4d06761d-f6fa-43a7-80b8-5446c2967a56.json b/change/@fluentui-theme-4d06761d-f6fa-43a7-80b8-5446c2967a56.json new file mode 100644 index 00000000000000..7f4d07c0ebd56f --- /dev/null +++ b/change/@fluentui-theme-4d06761d-f6fa-43a7-80b8-5446c2967a56.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/theme", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-utilities-b48fdfc2-5f53-4813-a10c-d536eb5afa9c.json b/change/@fluentui-utilities-b48fdfc2-5f53-4813-a10c-d536eb5afa9c.json new file mode 100644 index 00000000000000..9a721944fb8f5f --- /dev/null +++ b/change/@fluentui-utilities-b48fdfc2-5f53-4813-a10c-d536eb5afa9c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: remove deprecation plugin in favor of ts-eslint/no-deprecated", + "packageName": "@fluentui/utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/nx.json b/nx.json index 77cb282ed1252d..cb24b4215d7627 100644 --- a/nx.json +++ b/nx.json @@ -73,7 +73,7 @@ "{workspaceRoot}/eslint.config.js" ], "options": { - "command": "eslint src" + "command": "ESLINT_USE_FLAT_CONFIG=false eslint src" } }, "format": { diff --git a/package.json b/package.json index adb02e985a423c..4edde58632e34a 100644 --- a/package.json +++ b/package.json @@ -60,9 +60,10 @@ "@dnd-kit/sortable": "^7.0.2", "@dnd-kit/utilities": "^3.2.1", "@floating-ui/dom": "1.6.12", + "@eslint/js": "9.17.0", "@fluentui/react-icons": "^2.0.245", "@griffel/babel-preset": "1.5.8", - "@griffel/eslint-plugin": "^1.6.4", + "@griffel/eslint-plugin": "^2.0.0", "@griffel/jest-serializer": "1.1.24", "@griffel/react": "^1.5.22", "@griffel/shadow-dom": "0.2.2", @@ -71,7 +72,7 @@ "@mdx-js/loader": "2.3.0", "@microsoft/api-extractor": "7.39.0", "@microsoft/api-extractor-model": "7.28.3", - "@microsoft/eslint-plugin-sdl": "0.1.9", + "@microsoft/eslint-plugin-sdl": "1.0.1", "@microsoft/load-themed-styles": "1.10.26", "@microsoft/loader-load-themed-styles": "2.0.17", "@microsoft/tsdoc": "0.14.2", @@ -87,7 +88,7 @@ "@phenomnomnominal/tsquery": "6.1.3", "@playwright/test": "1.44.0", "@react-native/babel-preset": "0.73.21", - "@rnx-kit/eslint-plugin": "0.8.2", + "@rnx-kit/eslint-plugin": "0.8.4", "@rollup/plugin-node-resolve": "13.3.0", "@storybook/addon-a11y": "7.6.20", "@storybook/addon-actions": "7.6.20", @@ -133,7 +134,7 @@ "@types/doctrine": "0.0.5", "@types/ejs": "3.1.2", "@types/enzyme": "3.10.7", - "@types/eslint": "8.56.10", + "@types/eslint": "9.6.1", "@types/express": "4.17.21", "@types/fs-extra": "8.0.1", "@types/glob": "7.1.1", @@ -173,10 +174,7 @@ "@types/webpack-hot-middleware": "2.25.9", "@types/yargs": "13.0.11", "@types/yargs-unparser": "2.0.1", - "@typescript-eslint/eslint-plugin": "8.8.1", - "@typescript-eslint/parser": "8.8.1", - "@typescript-eslint/rule-tester": "8.8.1", - "@typescript-eslint/utils": "8.8.1", + "@typescript-eslint/rule-tester": "8.19.0", "@wojtekmaj/enzyme-adapter-react-17": "0.6.7", "ajv": "8.4.0", "autoprefixer": "10.2.1", @@ -226,20 +224,19 @@ "enzyme-to-json": "3.6.2", "esbuild": "0.20.1", "esbuild-loader": "4.1.0", - "eslint": "8.57.0", + "eslint": "9.17.0", "eslint-config-airbnb": "18.2.1", - "eslint-config-prettier": "8.3.0", - "eslint-import-resolver-typescript": "3.6.1", - "eslint-plugin-deprecation": "3.0.0", + "eslint-config-prettier": "9.1.0", + "eslint-import-resolver-typescript": "3.7.0", "eslint-plugin-es": "4.1.0", - "eslint-plugin-import": "2.29.1", - "eslint-plugin-jest": "28.8.0", - "eslint-plugin-jsdoc": "48.7.0", - "eslint-plugin-jsx-a11y": "6.9.0", - "eslint-plugin-playwright": "0.15.3", - "eslint-plugin-react": "7.26.0", + "eslint-plugin-import": "2.31.0", + "eslint-plugin-jest": "28.10.0", + "eslint-plugin-jsdoc": "50.6.1", + "eslint-plugin-jsx-a11y": "6.10.2", + "eslint-plugin-playwright": "2.1.0", + "eslint-plugin-react": "7.37.3", "eslint-plugin-react-compiler": "0.0.0-experimental-a97cca1-20240529", - "eslint-plugin-react-hooks": "4.6.2", + "eslint-plugin-react-hooks": "5.1.0", "express": "4.20.0", "extract-comments": "1.1.0", "file-loader": "6.2.0", @@ -341,6 +338,7 @@ "tsconfig-paths-webpack-plugin": "4.1.0", "tslib": "2.6.3", "typescript": "5.3.3", + "typescript-eslint": "8.19.0", "vinyl": "2.2.0", "webpack": "5.94.0", "webpack-bundle-analyzer": "4.10.1", @@ -375,7 +373,6 @@ "resolutions": { "@types/jest-axe/axe-core": "4.7.2", "esbuild": "0.20.1", - "eslint": "8.57.0", "swc-loader": "^0.2.6", "prettier": "2.8.8", "puppeteer": "19.6.0", diff --git a/packages/charts/react-charting/src/Styling.ts b/packages/charts/react-charting/src/Styling.ts index 31e6ed2005a051..563a5a90452e3b 100644 --- a/packages/charts/react-charting/src/Styling.ts +++ b/packages/charts/react-charting/src/Styling.ts @@ -6,7 +6,7 @@ export { DefaultEffects, DefaultFontStyles, DefaultPalette, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated EdgeChromiumHighContrastSelector, FontClassNames, FontSizes, @@ -39,11 +39,11 @@ export { createTheme, focusClear, fontFace, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getEdgeChromiumNoHighContrastAdjustSelector, getFadedOverflowStyle, getFocusOutlineStyle, - // eslint-disable-next-line deprecation/deprecation + // eslint-disable-next-line @typescript-eslint/no-deprecated getFocusStyle, getGlobalClassNames, getHighContrastNoAdjustStyle, diff --git a/packages/charts/react-charting/src/Utilities.ts b/packages/charts/react-charting/src/Utilities.ts index 0850eaa19b0634..82dae884afcb13 100644 --- a/packages/charts/react-charting/src/Utilities.ts +++ b/packages/charts/react-charting/src/Utilities.ts @@ -1,10 +1,8 @@ export { Async, AutoScroll, - // eslint-disable-next-line deprecation/deprecation BaseComponent, Customizations, - // eslint-disable-next-line deprecation/deprecation Customizer, CustomizerContext, DATA_IS_SCROLLABLE_ATTRIBUTE, @@ -87,7 +85,6 @@ export { getRTL, getRTLSafeKeyCode, getRect, - // eslint-disable-next-line deprecation/deprecation getResourceUrl, getScrollbarWidth, getVirtualParent, @@ -99,11 +96,9 @@ export { hoistStatics, htmlElementProperties, iframeProperties, - // eslint-disable-next-line deprecation/deprecation imageProperties, imgProperties, initializeComponentRef, - // eslint-disable-next-line deprecation/deprecation initializeFocusRects, inputProperties, isControlled, @@ -135,7 +130,6 @@ export { optionProperties, portalContainsElement, precisionRound, - // eslint-disable-next-line deprecation/deprecation raiseClick, removeIndex, replaceElement, @@ -145,15 +139,12 @@ export { safeRequestAnimationFrame, safeSetTimeout, selectProperties, - // eslint-disable-next-line deprecation/deprecation setBaseUrl, setFocusVisibility, - // eslint-disable-next-line deprecation/deprecation setLanguage, setMemoizeWeakMap, setPortalAttribute, setRTL, - // eslint-disable-next-line deprecation/deprecation setSSR, setVirtualParent, setWarningCallback, @@ -184,7 +175,6 @@ export type { ICancelable, IChangeDescription, IChangeEventCallback, - // eslint-disable-next-line deprecation/deprecation IClassNames, IClassNamesFunctionOptions, IComponentAs, @@ -207,7 +197,6 @@ export type { IPerfData, IPerfMeasurement, IPerfSummary, - // eslint-disable-next-line deprecation/deprecation IPoint, IPropsWithStyles, IRectangle, @@ -226,13 +215,10 @@ export type { IStyleFunctionOrObject, IVirtualElement, IWarnControlledUsageParams, - // eslint-disable-next-line deprecation/deprecation Omit, Point, RefObject, - // eslint-disable-next-line deprecation/deprecation Settings, - // eslint-disable-next-line deprecation/deprecation SettingsFunction, StyleFunction, } from '@fluentui/react/lib/Utilities'; diff --git a/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx b/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx index 083ea31524ddca..9dded504cf9d97 100644 --- a/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx +++ b/packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx @@ -177,6 +177,7 @@ export class DonutChartBase extends React.Component