diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 75cc7f5e917882..00000000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,31 +0,0 @@ -// Default eslintrc for packages without one, or files outside a package -// NOTE: -// - this is very old config (v8/v0 active era) - we don't use it anywhere -// - if nx migration adds any kind of overrides undo these changes as our config setup is not compatible with extending package from root -// TODO: -// - this needs to be re-done when doing whole lint re-structuring within monorepo -// - will be used to follow standard NX linting approach -{ - "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module" - }, - "env": { - "browser": true, - "es6": true, - "node": true - }, - "ignorePatterns": [ - "**/coverage", - "**/dist", - "**/etc", - "**/lib", - "**/lib-amd", - "**/lib-commonjs", - "**/node_modules", - "**/temp", - "**/*.scss.ts" - ] -} diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d430c6d33bbbf2..898a6967acc58e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -42,7 +42,6 @@ /typings @microsoft/fluentui-react-build #### Root Build files -/.eslintrc.* @microsoft/fluentui-react-build /.yarnrc @microsoft/fluentui-react-build /.gitattributes @microsoft/fluentui-react-build /.gitignore @microsoft/fluentui-react-build @@ -399,8 +398,9 @@ packages/react-experiments/src/components/TileList @ThomasMichon **/just.config.ts @microsoft/fluentui-react-build **/jest.config.js @microsoft/fluentui-react-build **/webpack.*.js @microsoft/fluentui-react-build -**/.eslintrc.js @microsoft/fluentui-react-build -**/.eslintrc.json @microsoft/fluentui-react-build +**/eslint.config.js @microsoft/fluentui-react-build +**/eslint.config.cjs @microsoft/fluentui-react-build +**/eslint.config.mjs @microsoft/fluentui-react-build **/tsconfig.json @microsoft/fluentui-react-build **/tsconfig.lib.json @microsoft/fluentui-react-build **/tsconfig.spec.json @microsoft/fluentui-react-build diff --git a/change/@fluentui-tokens-6e67aa3e-9b31-4d76-a1a1-8e891bbfa643.json b/change/@fluentui-tokens-6e67aa3e-9b31-4d76-a1a1-8e891bbfa643.json new file mode 100644 index 00000000000000..41025079491668 --- /dev/null +++ b/change/@fluentui-tokens-6e67aa3e-9b31-4d76-a1a1-8e891bbfa643.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to new eslint flat config format", + "packageName": "@fluentui/tokens", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-web-components-3349be97-7f32-49ff-bc78-1f2ff01d94b5.json b/change/@fluentui-web-components-3349be97-7f32-49ff-bc78-1f2ff01d94b5.json new file mode 100644 index 00000000000000..f552c326ee3052 --- /dev/null +++ b/change/@fluentui-web-components-3349be97-7f32-49ff-bc78-1f2ff01d94b5.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: update verify-packaging script to exclude root eslintrc file", + "packageName": "@fluentui/web-components", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-webpack-utilities-548f764d-130b-4ce2-b7ef-fb3b4ff26403.json b/change/@fluentui-webpack-utilities-548f764d-130b-4ce2-b7ef-fb3b4ff26403.json new file mode 100644 index 00000000000000..dc9535b0599652 --- /dev/null +++ b/change/@fluentui-webpack-utilities-548f764d-130b-4ce2-b7ef-fb3b4ff26403.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to new eslint flat config format", + "packageName": "@fluentui/webpack-utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000000000..28e4d7db82fa12 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,13 @@ +// @ts-check + +/** + * Root ESLint configuration for Fluent UI monorepo + * + * - Root config provides base rules for react-components (v9) packages + * - v9 packages extend this config and add overrides as needed + * - v8 and other legacy packages maintain their own independent configs + */ + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = fluentPlugin.configs['flat/react']; diff --git a/nx.json b/nx.json index cf2f5ed5a3a14b..65353a02d372fd 100644 --- a/nx.json +++ b/nx.json @@ -68,14 +68,9 @@ "executor": "nx:run-commands", "dependsOn": ["build"], "cache": true, - "inputs": [ - "default", - "{workspaceRoot}/.eslintrc.json", - "{workspaceRoot}/.eslintignore", - "{workspaceRoot}/eslint.config.js" - ], + "inputs": ["default", "{workspaceRoot/eslint.config.js}"], "options": { - "command": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint src" + "command": "eslint src" } }, "format": { diff --git a/packages/codemods/.eslintrc.json b/packages/codemods/.eslintrc.json deleted file mode 100644 index fb156f13b98918..00000000000000 --- a/packages/codemods/.eslintrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node", "plugin:@fluentui/eslint-plugin/react--legacy"], - "root": true, - "overrides": [ - { - "files": ["./src/**/*.{ts,tsx,js}"], - "rules": { - "@typescript-eslint/naming-convention": "off", - "@typescript-eslint/explicit-module-boundary-types": "off" - } - }, - { - "files": ["./src/codeMods/tests/mock/**/*.{ts,tsx}"], - "rules": { - "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/naming-convention": "off", - "import/no-extraneous-dependencies": "off", - "@typescript-eslint/no-deprecated": "off" - } - } - ] -} diff --git a/packages/codemods/eslint.config.js b/packages/codemods/eslint.config.js new file mode 100644 index 00000000000000..9170ceb0b32205 --- /dev/null +++ b/packages/codemods/eslint.config.js @@ -0,0 +1,25 @@ +// @ts-check +const fluentPlugin = require('@fluentui/eslint-plugin'); + +/** @type {import("eslint").Linter.Config[]} */ +module.exports = [ + ...fluentPlugin.configs['flat/node'], + ...fluentPlugin.configs['flat/react-legacy'], + { + files: ['./src/**/*.{ts,tsx,js}'], + rules: { + '@typescript-eslint/naming-convention': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + }, + }, + { + files: ['./src/codeMods/tests/mock/**/*.{ts,tsx}'], + rules: { + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/naming-convention': 'off', + 'import/no-extraneous-dependencies': 'off', + '@typescript-eslint/no-deprecated': 'off', + }, + }, +]; diff --git a/packages/react-components/component-selector-preview/library/eslint.config.js b/packages/react-components/component-selector-preview/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/component-selector-preview/library/eslint.config.js +++ b/packages/react-components/component-selector-preview/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/component-selector-preview/stories/eslint.config.js b/packages/react-components/component-selector-preview/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/component-selector-preview/stories/eslint.config.js +++ b/packages/react-components/component-selector-preview/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/deprecated/react-alert/eslint.config.js b/packages/react-components/deprecated/react-alert/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/deprecated/react-alert/eslint.config.js +++ b/packages/react-components/deprecated/react-alert/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/deprecated/react-infobutton/eslint.config.js b/packages/react-components/deprecated/react-infobutton/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/deprecated/react-infobutton/eslint.config.js +++ b/packages/react-components/deprecated/react-infobutton/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/deprecated/react-virtualizer/eslint.config.js b/packages/react-components/deprecated/react-virtualizer/eslint.config.js index 185228a80e3392..d2c9b48a74efb4 100644 --- a/packages/react-components/deprecated/react-virtualizer/eslint.config.js +++ b/packages/react-components/deprecated/react-virtualizer/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { '@typescript-eslint/no-deprecated': 'off', diff --git a/packages/react-components/global-context/eslint.config.js b/packages/react-components/global-context/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/global-context/eslint.config.js +++ b/packages/react-components/global-context/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/keyboard-keys/eslint.config.js b/packages/react-components/keyboard-keys/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/keyboard-keys/eslint.config.js +++ b/packages/react-components/keyboard-keys/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/priority-overflow/eslint.config.js b/packages/react-components/priority-overflow/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/priority-overflow/eslint.config.js +++ b/packages/react-components/priority-overflow/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-accordion/library/eslint.config.js b/packages/react-components/react-accordion/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-accordion/library/eslint.config.js +++ b/packages/react-components/react-accordion/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-accordion/stories/eslint.config.js b/packages/react-components/react-accordion/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-accordion/stories/eslint.config.js +++ b/packages/react-components/react-accordion/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-aria/library/eslint.config.js b/packages/react-components/react-aria/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-aria/library/eslint.config.js +++ b/packages/react-components/react-aria/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-aria/stories/eslint.config.js b/packages/react-components/react-aria/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-aria/stories/eslint.config.js +++ b/packages/react-components/react-aria/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-avatar/library/eslint.config.js b/packages/react-components/react-avatar/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-avatar/library/eslint.config.js +++ b/packages/react-components/react-avatar/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-avatar/stories/eslint.config.js b/packages/react-components/react-avatar/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-avatar/stories/eslint.config.js +++ b/packages/react-components/react-avatar/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-badge/library/eslint.config.js b/packages/react-components/react-badge/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-badge/library/eslint.config.js +++ b/packages/react-components/react-badge/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-badge/stories/eslint.config.js b/packages/react-components/react-badge/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-badge/stories/eslint.config.js +++ b/packages/react-components/react-badge/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-breadcrumb/library/eslint.config.js b/packages/react-components/react-breadcrumb/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-breadcrumb/library/eslint.config.js +++ b/packages/react-components/react-breadcrumb/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-breadcrumb/stories/eslint.config.js b/packages/react-components/react-breadcrumb/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-breadcrumb/stories/eslint.config.js +++ b/packages/react-components/react-breadcrumb/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-button/library/eslint.config.js b/packages/react-components/react-button/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-button/library/eslint.config.js +++ b/packages/react-components/react-button/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-button/stories/eslint.config.js b/packages/react-components/react-button/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-button/stories/eslint.config.js +++ b/packages/react-components/react-button/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-calendar-compat/library/eslint.config.js b/packages/react-components/react-calendar-compat/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-calendar-compat/library/eslint.config.js +++ b/packages/react-components/react-calendar-compat/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-calendar-compat/stories/eslint.config.js b/packages/react-components/react-calendar-compat/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-calendar-compat/stories/eslint.config.js +++ b/packages/react-components/react-calendar-compat/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-card/library/eslint.config.js b/packages/react-components/react-card/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-card/library/eslint.config.js +++ b/packages/react-components/react-card/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-card/stories/eslint.config.js b/packages/react-components/react-card/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-card/stories/eslint.config.js +++ b/packages/react-components/react-card/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-carousel/library/eslint.config.js b/packages/react-components/react-carousel/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-carousel/library/eslint.config.js +++ b/packages/react-components/react-carousel/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-carousel/stories/eslint.config.js b/packages/react-components/react-carousel/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-carousel/stories/eslint.config.js +++ b/packages/react-components/react-carousel/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-checkbox/library/eslint.config.js b/packages/react-components/react-checkbox/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-checkbox/library/eslint.config.js +++ b/packages/react-components/react-checkbox/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-checkbox/stories/eslint.config.js b/packages/react-components/react-checkbox/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-checkbox/stories/eslint.config.js +++ b/packages/react-components/react-checkbox/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-color-picker/library/eslint.config.js b/packages/react-components/react-color-picker/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-color-picker/library/eslint.config.js +++ b/packages/react-components/react-color-picker/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-color-picker/stories/eslint.config.js b/packages/react-components/react-color-picker/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-color-picker/stories/eslint.config.js +++ b/packages/react-components/react-color-picker/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-colorpicker-compat/eslint.config.js b/packages/react-components/react-colorpicker-compat/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/react-colorpicker-compat/eslint.config.js +++ b/packages/react-components/react-colorpicker-compat/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-combobox/library/eslint.config.js b/packages/react-components/react-combobox/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-combobox/library/eslint.config.js +++ b/packages/react-components/react-combobox/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-combobox/stories/eslint.config.js b/packages/react-components/react-combobox/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-combobox/stories/eslint.config.js +++ b/packages/react-components/react-combobox/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-components/eslint.config.js b/packages/react-components/react-components/eslint.config.js index 8d8a70cba7b28e..cc6dd31a1cf162 100644 --- a/packages/react-components/react-components/eslint.config.js +++ b/packages/react-components/react-components/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { files: ['src/index.ts'], rules: { diff --git a/packages/react-components/react-context-selector/eslint.config.js b/packages/react-components/react-context-selector/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/react-context-selector/eslint.config.js +++ b/packages/react-components/react-context-selector/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-datepicker-compat/library/eslint.config.js b/packages/react-components/react-datepicker-compat/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-datepicker-compat/library/eslint.config.js +++ b/packages/react-components/react-datepicker-compat/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-datepicker-compat/stories/eslint.config.js b/packages/react-components/react-datepicker-compat/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-datepicker-compat/stories/eslint.config.js +++ b/packages/react-components/react-datepicker-compat/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-dialog/library/eslint.config.js b/packages/react-components/react-dialog/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-dialog/library/eslint.config.js +++ b/packages/react-components/react-dialog/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-dialog/stories/eslint.config.js b/packages/react-components/react-dialog/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-dialog/stories/eslint.config.js +++ b/packages/react-components/react-dialog/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-divider/library/eslint.config.js b/packages/react-components/react-divider/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-divider/library/eslint.config.js +++ b/packages/react-components/react-divider/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-divider/stories/eslint.config.js b/packages/react-components/react-divider/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-divider/stories/eslint.config.js +++ b/packages/react-components/react-divider/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-drawer/library/eslint.config.js b/packages/react-components/react-drawer/library/eslint.config.js index a543563e06e929..2a2d96ef21845b 100644 --- a/packages/react-components/react-drawer/library/eslint.config.js +++ b/packages/react-components/react-drawer/library/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { files: ['./src/e2e/*.tsx'], rules: { diff --git a/packages/react-components/react-drawer/stories/eslint.config.js b/packages/react-components/react-drawer/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-drawer/stories/eslint.config.js +++ b/packages/react-components/react-drawer/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-field/library/eslint.config.js b/packages/react-components/react-field/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-field/library/eslint.config.js +++ b/packages/react-components/react-field/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-field/stories/eslint.config.js b/packages/react-components/react-field/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-field/stories/eslint.config.js +++ b/packages/react-components/react-field/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-icons-compat/library/eslint.config.js b/packages/react-components/react-icons-compat/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-icons-compat/library/eslint.config.js +++ b/packages/react-components/react-icons-compat/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-icons-compat/stories/eslint.config.js b/packages/react-components/react-icons-compat/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-icons-compat/stories/eslint.config.js +++ b/packages/react-components/react-icons-compat/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-image/library/eslint.config.js b/packages/react-components/react-image/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-image/library/eslint.config.js +++ b/packages/react-components/react-image/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-image/stories/eslint.config.js b/packages/react-components/react-image/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-image/stories/eslint.config.js +++ b/packages/react-components/react-image/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-infolabel/library/eslint.config.js b/packages/react-components/react-infolabel/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-infolabel/library/eslint.config.js +++ b/packages/react-components/react-infolabel/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-infolabel/stories/eslint.config.js b/packages/react-components/react-infolabel/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-infolabel/stories/eslint.config.js +++ b/packages/react-components/react-infolabel/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-input/library/eslint.config.js b/packages/react-components/react-input/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-input/library/eslint.config.js +++ b/packages/react-components/react-input/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-input/stories/eslint.config.js b/packages/react-components/react-input/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-input/stories/eslint.config.js +++ b/packages/react-components/react-input/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-jsx-runtime/eslint.config.js b/packages/react-components/react-jsx-runtime/eslint.config.js index 862526181bf8cc..a290c99bfa0bde 100644 --- a/packages/react-components/react-jsx-runtime/eslint.config.js +++ b/packages/react-components/react-jsx-runtime/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { files: ['**/*.{test,spec}.tsx'], rules: { diff --git a/packages/react-components/react-label/library/eslint.config.js b/packages/react-components/react-label/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-label/library/eslint.config.js +++ b/packages/react-components/react-label/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-label/stories/eslint.config.js b/packages/react-components/react-label/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-label/stories/eslint.config.js +++ b/packages/react-components/react-label/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-link/library/eslint.config.js b/packages/react-components/react-link/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-link/library/eslint.config.js +++ b/packages/react-components/react-link/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-link/stories/eslint.config.js b/packages/react-components/react-link/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-link/stories/eslint.config.js +++ b/packages/react-components/react-link/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-list/library/eslint.config.js b/packages/react-components/react-list/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-list/library/eslint.config.js +++ b/packages/react-components/react-list/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-list/stories/eslint.config.js b/packages/react-components/react-list/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-list/stories/eslint.config.js +++ b/packages/react-components/react-list/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-menu-grid-preview/library/eslint.config.js b/packages/react-components/react-menu-grid-preview/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-menu-grid-preview/library/eslint.config.js +++ b/packages/react-components/react-menu-grid-preview/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-menu-grid-preview/stories/eslint.config.js b/packages/react-components/react-menu-grid-preview/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-menu-grid-preview/stories/eslint.config.js +++ b/packages/react-components/react-menu-grid-preview/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-menu/library/eslint.config.js b/packages/react-components/react-menu/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-menu/library/eslint.config.js +++ b/packages/react-components/react-menu/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-menu/stories/eslint.config.js b/packages/react-components/react-menu/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-menu/stories/eslint.config.js +++ b/packages/react-components/react-menu/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-message-bar/library/eslint.config.js b/packages/react-components/react-message-bar/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-message-bar/library/eslint.config.js +++ b/packages/react-components/react-message-bar/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-message-bar/stories/eslint.config.js b/packages/react-components/react-message-bar/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-message-bar/stories/eslint.config.js +++ b/packages/react-components/react-message-bar/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-migration-v0-v9/library/eslint.config.js b/packages/react-components/react-migration-v0-v9/library/eslint.config.js index f66e868e7c5909..4b4c5a54236fce 100644 --- a/packages/react-components/react-migration-v0-v9/library/eslint.config.js +++ b/packages/react-components/react-migration-v0-v9/library/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { files: ['**/*.stories.{tsx,ts}'], rules: { diff --git a/packages/react-components/react-migration-v0-v9/stories/eslint.config.js b/packages/react-components/react-migration-v0-v9/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-migration-v0-v9/stories/eslint.config.js +++ b/packages/react-components/react-migration-v0-v9/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-migration-v8-v9/library/eslint.config.js b/packages/react-components/react-migration-v8-v9/library/eslint.config.js index f66e868e7c5909..4b4c5a54236fce 100644 --- a/packages/react-components/react-migration-v8-v9/library/eslint.config.js +++ b/packages/react-components/react-migration-v8-v9/library/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { files: ['**/*.stories.{tsx,ts}'], rules: { diff --git a/packages/react-components/react-migration-v8-v9/stories/eslint.config.js b/packages/react-components/react-migration-v8-v9/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-migration-v8-v9/stories/eslint.config.js +++ b/packages/react-components/react-migration-v8-v9/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-motion-components-preview/library/eslint.config.js b/packages/react-components/react-motion-components-preview/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-motion-components-preview/library/eslint.config.js +++ b/packages/react-components/react-motion-components-preview/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-motion-components-preview/stories/eslint.config.js b/packages/react-components/react-motion-components-preview/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-motion-components-preview/stories/eslint.config.js +++ b/packages/react-components/react-motion-components-preview/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-motion/library/eslint.config.js b/packages/react-components/react-motion/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-motion/library/eslint.config.js +++ b/packages/react-components/react-motion/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-motion/stories/eslint.config.js b/packages/react-components/react-motion/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-motion/stories/eslint.config.js +++ b/packages/react-components/react-motion/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-nav/library/eslint.config.js b/packages/react-components/react-nav/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-nav/library/eslint.config.js +++ b/packages/react-components/react-nav/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-nav/stories/eslint.config.js b/packages/react-components/react-nav/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-nav/stories/eslint.config.js +++ b/packages/react-components/react-nav/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-overflow/library/eslint.config.js b/packages/react-components/react-overflow/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-overflow/library/eslint.config.js +++ b/packages/react-components/react-overflow/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-overflow/stories/eslint.config.js b/packages/react-components/react-overflow/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-overflow/stories/eslint.config.js +++ b/packages/react-components/react-overflow/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-persona/library/eslint.config.js b/packages/react-components/react-persona/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-persona/library/eslint.config.js +++ b/packages/react-components/react-persona/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-persona/stories/eslint.config.js b/packages/react-components/react-persona/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-persona/stories/eslint.config.js +++ b/packages/react-components/react-persona/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-popover/library/eslint.config.js b/packages/react-components/react-popover/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-popover/library/eslint.config.js +++ b/packages/react-components/react-popover/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-popover/stories/eslint.config.js b/packages/react-components/react-popover/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-popover/stories/eslint.config.js +++ b/packages/react-components/react-popover/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-portal-compat-context/eslint.config.js b/packages/react-components/react-portal-compat-context/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/react-portal-compat-context/eslint.config.js +++ b/packages/react-components/react-portal-compat-context/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-portal-compat/eslint.config.js b/packages/react-components/react-portal-compat/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/react-portal-compat/eslint.config.js +++ b/packages/react-components/react-portal-compat/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-portal/library/eslint.config.js b/packages/react-components/react-portal/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-portal/library/eslint.config.js +++ b/packages/react-components/react-portal/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-portal/stories/eslint.config.js b/packages/react-components/react-portal/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-portal/stories/eslint.config.js +++ b/packages/react-components/react-portal/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-positioning/library/eslint.config.js b/packages/react-components/react-positioning/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-positioning/library/eslint.config.js +++ b/packages/react-components/react-positioning/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-positioning/stories/eslint.config.js b/packages/react-components/react-positioning/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-positioning/stories/eslint.config.js +++ b/packages/react-components/react-positioning/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-progress/library/eslint.config.js b/packages/react-components/react-progress/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-progress/library/eslint.config.js +++ b/packages/react-components/react-progress/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-progress/stories/eslint.config.js b/packages/react-components/react-progress/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-progress/stories/eslint.config.js +++ b/packages/react-components/react-progress/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-provider/library/eslint.config.js b/packages/react-components/react-provider/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-provider/library/eslint.config.js +++ b/packages/react-components/react-provider/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-provider/stories/eslint.config.js b/packages/react-components/react-provider/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-provider/stories/eslint.config.js +++ b/packages/react-components/react-provider/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-radio/library/eslint.config.js b/packages/react-components/react-radio/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-radio/library/eslint.config.js +++ b/packages/react-components/react-radio/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-radio/stories/eslint.config.js b/packages/react-components/react-radio/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-radio/stories/eslint.config.js +++ b/packages/react-components/react-radio/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-rating/library/eslint.config.js b/packages/react-components/react-rating/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-rating/library/eslint.config.js +++ b/packages/react-components/react-rating/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-rating/stories/eslint.config.js b/packages/react-components/react-rating/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-rating/stories/eslint.config.js +++ b/packages/react-components/react-rating/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-search/library/eslint.config.js b/packages/react-components/react-search/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-search/library/eslint.config.js +++ b/packages/react-components/react-search/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-search/stories/eslint.config.js b/packages/react-components/react-search/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-search/stories/eslint.config.js +++ b/packages/react-components/react-search/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-select/library/eslint.config.js b/packages/react-components/react-select/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-select/library/eslint.config.js +++ b/packages/react-components/react-select/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-select/stories/eslint.config.js b/packages/react-components/react-select/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-select/stories/eslint.config.js +++ b/packages/react-components/react-select/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-shared-contexts/library/eslint.config.js b/packages/react-components/react-shared-contexts/library/eslint.config.js index 82b4c64ee91c95..6efede5f666bdd 100644 --- a/packages/react-components/react-shared-contexts/library/eslint.config.js +++ b/packages/react-components/react-shared-contexts/library/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'prefer-const': 'off', diff --git a/packages/react-components/react-shared-contexts/stories/eslint.config.js b/packages/react-components/react-shared-contexts/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-shared-contexts/stories/eslint.config.js +++ b/packages/react-components/react-shared-contexts/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-skeleton/library/eslint.config.js b/packages/react-components/react-skeleton/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-skeleton/library/eslint.config.js +++ b/packages/react-components/react-skeleton/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-skeleton/stories/eslint.config.js b/packages/react-components/react-skeleton/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-skeleton/stories/eslint.config.js +++ b/packages/react-components/react-skeleton/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-slider/library/eslint.config.js b/packages/react-components/react-slider/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-slider/library/eslint.config.js +++ b/packages/react-components/react-slider/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-slider/stories/eslint.config.js b/packages/react-components/react-slider/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-slider/stories/eslint.config.js +++ b/packages/react-components/react-slider/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-spinbutton/library/eslint.config.js b/packages/react-components/react-spinbutton/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-spinbutton/library/eslint.config.js +++ b/packages/react-components/react-spinbutton/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-spinbutton/stories/eslint.config.js b/packages/react-components/react-spinbutton/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-spinbutton/stories/eslint.config.js +++ b/packages/react-components/react-spinbutton/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-spinner/library/eslint.config.js b/packages/react-components/react-spinner/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-spinner/library/eslint.config.js +++ b/packages/react-components/react-spinner/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-spinner/stories/eslint.config.js b/packages/react-components/react-spinner/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-spinner/stories/eslint.config.js +++ b/packages/react-components/react-spinner/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-storybook-addon/eslint.config.js b/packages/react-components/react-storybook-addon/eslint.config.js index ed35a5964ba9ed..ac31b0b01860d0 100644 --- a/packages/react-components/react-storybook-addon/eslint.config.js +++ b/packages/react-components/react-storybook-addon/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { files: ['**/*.ts', '**/*.tsx'], rules: { diff --git a/packages/react-components/react-swatch-picker/library/eslint.config.js b/packages/react-components/react-swatch-picker/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-swatch-picker/library/eslint.config.js +++ b/packages/react-components/react-swatch-picker/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-swatch-picker/stories/eslint.config.js b/packages/react-components/react-swatch-picker/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-swatch-picker/stories/eslint.config.js +++ b/packages/react-components/react-swatch-picker/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-switch/library/eslint.config.js b/packages/react-components/react-switch/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-switch/library/eslint.config.js +++ b/packages/react-components/react-switch/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-switch/stories/eslint.config.js b/packages/react-components/react-switch/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-switch/stories/eslint.config.js +++ b/packages/react-components/react-switch/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-table/library/eslint.config.js b/packages/react-components/react-table/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-table/library/eslint.config.js +++ b/packages/react-components/react-table/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-table/stories/eslint.config.js b/packages/react-components/react-table/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-table/stories/eslint.config.js +++ b/packages/react-components/react-table/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-tabs/library/eslint.config.js b/packages/react-components/react-tabs/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-tabs/library/eslint.config.js +++ b/packages/react-components/react-tabs/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-tabs/stories/eslint.config.js b/packages/react-components/react-tabs/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-tabs/stories/eslint.config.js +++ b/packages/react-components/react-tabs/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-tabster/eslint.config.js b/packages/react-components/react-tabster/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/react-tabster/eslint.config.js +++ b/packages/react-components/react-tabster/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-tag-picker/library/eslint.config.js b/packages/react-components/react-tag-picker/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-tag-picker/library/eslint.config.js +++ b/packages/react-components/react-tag-picker/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-tag-picker/stories/eslint.config.js b/packages/react-components/react-tag-picker/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-tag-picker/stories/eslint.config.js +++ b/packages/react-components/react-tag-picker/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-tags/library/eslint.config.js b/packages/react-components/react-tags/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-tags/library/eslint.config.js +++ b/packages/react-components/react-tags/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-tags/stories/eslint.config.js b/packages/react-components/react-tags/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-tags/stories/eslint.config.js +++ b/packages/react-components/react-tags/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-teaching-popover/library/eslint.config.js b/packages/react-components/react-teaching-popover/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-teaching-popover/library/eslint.config.js +++ b/packages/react-components/react-teaching-popover/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-teaching-popover/stories/eslint.config.js b/packages/react-components/react-teaching-popover/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-teaching-popover/stories/eslint.config.js +++ b/packages/react-components/react-teaching-popover/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-text/library/eslint.config.js b/packages/react-components/react-text/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-text/library/eslint.config.js +++ b/packages/react-components/react-text/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-text/stories/eslint.config.js b/packages/react-components/react-text/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-text/stories/eslint.config.js +++ b/packages/react-components/react-text/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-textarea/library/eslint.config.js b/packages/react-components/react-textarea/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-textarea/library/eslint.config.js +++ b/packages/react-components/react-textarea/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-textarea/stories/eslint.config.js b/packages/react-components/react-textarea/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-textarea/stories/eslint.config.js +++ b/packages/react-components/react-textarea/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-theme/library/eslint.config.js b/packages/react-components/react-theme/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-theme/library/eslint.config.js +++ b/packages/react-components/react-theme/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-theme/stories/eslint.config.js b/packages/react-components/react-theme/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-theme/stories/eslint.config.js +++ b/packages/react-components/react-theme/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-timepicker-compat/library/eslint.config.js b/packages/react-components/react-timepicker-compat/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-timepicker-compat/library/eslint.config.js +++ b/packages/react-components/react-timepicker-compat/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-timepicker-compat/stories/eslint.config.js b/packages/react-components/react-timepicker-compat/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-timepicker-compat/stories/eslint.config.js +++ b/packages/react-components/react-timepicker-compat/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-toast/library/eslint.config.js b/packages/react-components/react-toast/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-toast/library/eslint.config.js +++ b/packages/react-components/react-toast/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-toast/stories/eslint.config.js b/packages/react-components/react-toast/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-toast/stories/eslint.config.js +++ b/packages/react-components/react-toast/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-toolbar/library/eslint.config.js b/packages/react-components/react-toolbar/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-toolbar/library/eslint.config.js +++ b/packages/react-components/react-toolbar/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-toolbar/stories/eslint.config.js b/packages/react-components/react-toolbar/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-toolbar/stories/eslint.config.js +++ b/packages/react-components/react-toolbar/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-tooltip/library/eslint.config.js b/packages/react-components/react-tooltip/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-tooltip/library/eslint.config.js +++ b/packages/react-components/react-tooltip/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-tooltip/stories/eslint.config.js b/packages/react-components/react-tooltip/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-tooltip/stories/eslint.config.js +++ b/packages/react-components/react-tooltip/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-tree/library/eslint.config.js b/packages/react-components/react-tree/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-tree/library/eslint.config.js +++ b/packages/react-components/react-tree/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-tree/stories/eslint.config.js b/packages/react-components/react-tree/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-tree/stories/eslint.config.js +++ b/packages/react-components/react-tree/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-utilities-compat/library/eslint.config.js b/packages/react-components/react-utilities-compat/library/eslint.config.js index ec2e7cb1fc479f..cc02d6523de7bb 100644 --- a/packages/react-components/react-utilities-compat/library/eslint.config.js +++ b/packages/react-components/react-utilities-compat/library/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/react-utilities-compat/stories/eslint.config.js b/packages/react-components/react-utilities-compat/stories/eslint.config.js index 0f46bd94e8730e..5ccd96ece77ce5 100644 --- a/packages/react-components/react-utilities-compat/stories/eslint.config.js +++ b/packages/react-components/react-utilities-compat/stories/eslint.config.js @@ -1,10 +1,10 @@ // @ts-check const { defineConfig } = require('eslint/config'); -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../../eslint.config.js'); module.exports = defineConfig([ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { 'import/no-extraneous-dependencies': [ diff --git a/packages/react-components/react-utilities/eslint.config.js b/packages/react-components/react-utilities/eslint.config.js index ec2e7cb1fc479f..84160d88359587 100644 --- a/packages/react-components/react-utilities/eslint.config.js +++ b/packages/react-components/react-utilities/eslint.config.js @@ -1,5 +1,5 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); -module.exports = [...fluentPlugin.configs['flat/react']]; +module.exports = [...rootConfig]; diff --git a/packages/react-components/recipes/eslint.config.js b/packages/react-components/recipes/eslint.config.js index 64d0a8982104fc..d6a86298a46774 100644 --- a/packages/react-components/recipes/eslint.config.js +++ b/packages/react-components/recipes/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { '@nx/workspace-enforce-use-client': 'off', diff --git a/packages/react-components/theme-designer/eslint.config.js b/packages/react-components/theme-designer/eslint.config.js index a3e98bab42992c..bed0583efd44bf 100644 --- a/packages/react-components/theme-designer/eslint.config.js +++ b/packages/react-components/theme-designer/eslint.config.js @@ -1,9 +1,9 @@ // @ts-check -const fluentPlugin = require('@fluentui/eslint-plugin'); +const rootConfig = require('../../../eslint.config.js'); module.exports = [ - ...fluentPlugin.configs['flat/react'], + ...rootConfig, { rules: { '@griffel/styles-file': 'off', diff --git a/packages/tokens/.eslintrc.json b/packages/tokens/.eslintrc.json deleted file mode 100644 index 80ca7022e8d9b5..00000000000000 --- a/packages/tokens/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "no-restricted-imports": [ - "error", - { - "patterns": ["@fluentui/*", "react", "react-dom"] - } - ] - } -} diff --git a/packages/tokens/eslint.config.js b/packages/tokens/eslint.config.js new file mode 100644 index 00000000000000..cf64081cd2b109 --- /dev/null +++ b/packages/tokens/eslint.config.js @@ -0,0 +1,17 @@ +// @ts-check +const fluentPlugin = require('@fluentui/eslint-plugin'); + +/** @type {import("eslint").Linter.Config[]} */ +module.exports = [ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'no-restricted-imports': [ + 'error', + { + patterns: ['@fluentui/*', 'react', 'react-dom'], + }, + ], + }, + }, +]; diff --git a/packages/web-components/scripts/verify-packaging.js b/packages/web-components/scripts/verify-packaging.js index 25eec53ab30c2f..2726e84bb0cb52 100644 --- a/packages/web-components/scripts/verify-packaging.js +++ b/packages/web-components/scripts/verify-packaging.js @@ -20,7 +20,7 @@ function main() { const rootConfigFiles = [ 'just.config.[jt]s', 'jest.config.[jt]s', - '.eslintrc.(js|json)', + 'eslint.config.js', 'project.json', '.babelrc.json', '.swcrc', diff --git a/packages/webpack-utilities/.eslintrc.json b/packages/webpack-utilities/.eslintrc.json deleted file mode 100644 index a563e7abd8369c..00000000000000 --- a/packages/webpack-utilities/.eslintrc.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node--legacy"], - "root": true, - "rules": { - "@typescript-eslint/no-explicit-any": "off", - "prefer-arrow-callback": "off" - }, - "overrides": [ - { - "files": ["**/*.{ts,tsx}"], - "rules": { - "@typescript-eslint/no-deprecated": "off" - } - } - ] -} diff --git a/packages/webpack-utilities/eslint.config.js b/packages/webpack-utilities/eslint.config.js new file mode 100644 index 00000000000000..3ba2e43c4fcaa2 --- /dev/null +++ b/packages/webpack-utilities/eslint.config.js @@ -0,0 +1,19 @@ +// @ts-check +const fluentPlugin = require('@fluentui/eslint-plugin'); + +/** @type {import("eslint").Linter.Config[]} */ +module.exports = [ + ...fluentPlugin.configs['flat/node-legacy'], + { + rules: { + '@typescript-eslint/no-explicit-any': 'off', + 'prefer-arrow-callback': 'off', + }, + }, + { + files: ['**/*.{ts,tsx}'], + rules: { + '@typescript-eslint/no-deprecated': 'off', + }, + }, +]; diff --git a/scripts/beachball/base.config.json b/scripts/beachball/base.config.json index dcb3a3b9e22282..a4666c0fdd9e5f 100644 --- a/scripts/beachball/base.config.json +++ b/scripts/beachball/base.config.json @@ -7,6 +7,7 @@ "**/*.{test,spec,cy}.{ts,tsx}", "**/*.stories.{ts,tsx}", "**/.eslintrc.*", + "**/eslint.config.*", "**/rit.config.js", "**/__fixtures__/**", "**/__mocks__/**", diff --git a/scripts/beachball/src/config.test.ts b/scripts/beachball/src/config.test.ts index 8fa2b6eec85b78..b25d9b8e404605 100644 --- a/scripts/beachball/src/config.test.ts +++ b/scripts/beachball/src/config.test.ts @@ -20,6 +20,7 @@ describe(`beachball configs`, () => { '**/*.{test,spec,cy}.{ts,tsx}', '**/*.stories.{ts,tsx}', '**/.eslintrc.*', + '**/eslint.config.*', '**/rit.config.js', '**/__fixtures__/**', '**/__mocks__/**', diff --git a/scripts/lint-staged/src/eslint-for-package.js b/scripts/lint-staged/src/eslint-for-package.js index e7ff6bee07a439..f88e8ed9da7220 100644 --- a/scripts/lint-staged/src/eslint-for-package.js +++ b/scripts/lint-staged/src/eslint-for-package.js @@ -4,7 +4,7 @@ const fs = require('node:fs'); const path = require('node:path'); const { eslintConstants } = require('@fluentui/scripts-monorepo'); -const { LegacyESLint: ESLint } = require('eslint/use-at-your-own-risk'); +const { ESLint } = require('eslint'); const micromatch = require('micromatch'); /** diff --git a/scripts/lint-staged/src/eslint.js b/scripts/lint-staged/src/eslint.js index 4e9f8a6e505039..936e719ce44244 100644 --- a/scripts/lint-staged/src/eslint.js +++ b/scripts/lint-staged/src/eslint.js @@ -37,7 +37,9 @@ function groupFilesByPackage(files) { } const hasEslintConfig = - fs.existsSync(path.join(packagePath, '.eslintrc.json')) || fs.existsSync(path.join(packagePath, '.eslintrc.js')); + fs.existsSync(path.join(packagePath, 'eslint.config.js')) || + fs.existsSync(path.join(packagePath, 'eslint.config.cjs')) || + fs.existsSync(path.join(packagePath, 'eslint.config.mjs')); if (!hasEslintConfig) { continue; diff --git a/scripts/tasks/src/verify-packaging.ts b/scripts/tasks/src/verify-packaging.ts index cf437a1ecfce6b..eb00716372202b 100644 --- a/scripts/tasks/src/verify-packaging.ts +++ b/scripts/tasks/src/verify-packaging.ts @@ -14,7 +14,7 @@ const alwaysPublishedFiles = ['LICENSE', 'package.json', 'README.md']; const rootConfigFiles = [ 'just.config.[jt]s', 'jest.config.[jt]s', - '.eslintrc.(js|json)', + 'eslint.config.(js|cjs|mjs)', 'project.json', '.babelrc.json', '.swcrc', diff --git a/tools/eslint-rules/README.md b/tools/eslint-rules/README.md index fe88290640fe38..155ab3d13e3317 100644 --- a/tools/eslint-rules/README.md +++ b/tools/eslint-rules/README.md @@ -13,15 +13,22 @@ Let's say we implement custom lint rule named `uppercase-const`. Following rule declaration will enable it for particular lint config: -```jsonc -/* @filename /.eslintrc */ -{ - "extends:" ["../../.eslintrc"], - "rules": { - /* pattern: <@nx/workspace>- */ - "@nx/workspace-uppercase-const": "error" - } -} +```js +// @filename /eslint.config.js +// @ts-check +const fluentPlugin = require('@fluentui/eslint-plugin'); + +/** @type {import("eslint").Linter.Config[]} */ +module.exports = [ + // or 'flat/react-legacy', 'flat/node', etc. + ...fluentPlugin.configs['flat/core'], + { + rules: { + // pattern: <@nx/workspace>- + '@nx/workspace-uppercase-const': 'error', + }, + }, +]; ``` ## Adding new rule: diff --git a/tools/workspace-plugin/src/executors/verify-packaging/executor.ts b/tools/workspace-plugin/src/executors/verify-packaging/executor.ts index 37033028b6faa3..28990daba5b414 100644 --- a/tools/workspace-plugin/src/executors/verify-packaging/executor.ts +++ b/tools/workspace-plugin/src/executors/verify-packaging/executor.ts @@ -60,7 +60,7 @@ function normalizeOptions(schema: VerifyPackagingExecutorSchema, context: Execut const rootConfigFiles = [ 'just.config.[jt]s', 'jest.config.[jt]s', - '.eslintrc.(js|json)', + 'eslint.config.(js|cjs|mjs)', 'project.json', '.babelrc.json', '.swcrc', diff --git a/tools/workspace-plugin/src/plugins/workspace-plugin.spec.ts b/tools/workspace-plugin/src/plugins/workspace-plugin.spec.ts index 6951c7960909dd..68e7beaaf7ad3a 100644 --- a/tools/workspace-plugin/src/plugins/workspace-plugin.spec.ts +++ b/tools/workspace-plugin/src/plugins/workspace-plugin.spec.ts @@ -53,7 +53,7 @@ describe(`workspace-plugin`, () => { await tempFs.createFiles({ 'proj/project.json': serializeJson({}), 'proj/package.json': serializeJson({}), - 'proj/.eslintrc.json': '{}', + 'proj/eslint.config.js': 'module.exports = {}', 'proj/jest.config.js': 'module.exports = {}', 'proj/monosize.config.mjs': 'export default {}', }); @@ -66,14 +66,8 @@ describe(`workspace-plugin`, () => { "executor": "nx:run-commands", "inputs": Array [ "default", - "{projectRoot}/.eslintrc.json", - "{projectRoot}/.eslintrc.js", - "{projectRoot}/eslint.config.js", - "{projectRoot}/eslint.config.cjs", - "{projectRoot}/eslint.config.mjs", - "{workspaceRoot}/.eslintrc.json", - "{workspaceRoot}/.eslintignore", - "{workspaceRoot}/eslint.config.js", + "{projectRoot}/eslint.{js,cjs,mjs}", + "{workspaceRoot}/eslint.config.{js,cjs,mjs}", Object { "externalDependencies": Array [ "eslint", @@ -95,7 +89,7 @@ describe(`workspace-plugin`, () => { ], }, "options": Object { - "command": "yarn cross-env ESLINT_USE_FLAT_CONFIG=false eslint src", + "command": "yarn eslint src", "cwd": "proj", }, "outputs": Array [ diff --git a/tools/workspace-plugin/src/plugins/workspace-plugin.ts b/tools/workspace-plugin/src/plugins/workspace-plugin.ts index 3080919f851981..c96d0175a5a2ef 100644 --- a/tools/workspace-plugin/src/plugins/workspace-plugin.ts +++ b/tools/workspace-plugin/src/plugins/workspace-plugin.ts @@ -322,35 +322,23 @@ function buildLintTarget( context: CreateNodesContextV2, config: TaskBuilderConfig, ): TargetConfiguration | null { - const hasFlatConfig = + const hasEslintConfig = existsSync(join(projectRoot, 'eslint.config.js')) || existsSync(join(projectRoot, 'eslint.config.cjs')) || existsSync(join(projectRoot, 'eslint.config.mjs')); - const hasLegacyConfig = - existsSync(join(projectRoot, '.eslintrc.json')) || existsSync(join(projectRoot, '.eslintrc.js')); - if (!hasFlatConfig && !hasLegacyConfig) { + if (!hasEslintConfig) { return null; } - const command = hasFlatConfig - ? `${config.pmc.exec} eslint src` - : `${config.pmc.exec} cross-env ESLINT_USE_FLAT_CONFIG=false eslint src`; - return { executor: 'nx:run-commands', cache: true, - options: { cwd: projectRoot, command }, + options: { cwd: projectRoot, command: `${config.pmc.exec} eslint src` }, inputs: [ 'default', - '{projectRoot}/.eslintrc.json', - '{projectRoot}/.eslintrc.js', - '{projectRoot}/eslint.config.js', - '{projectRoot}/eslint.config.cjs', - '{projectRoot}/eslint.config.mjs', - '{workspaceRoot}/.eslintrc.json', - '{workspaceRoot}/.eslintignore', - '{workspaceRoot}/eslint.config.js', + '{projectRoot}/eslint.{js,cjs,mjs}', + '{workspaceRoot}/eslint.config.{js,cjs,mjs}', { externalDependencies: ['eslint'] }, ], outputs: ['{options.outputFile}'],