diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index b33584bb52d87..396f907dade05 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -2,7 +2,7 @@ name: CI on: push: branches: - - master + - chore/migrate-to-eslint-flat-configs-test pull_request: concurrency: @@ -23,8 +23,8 @@ env: jobs: main: - if: ${{ github.repository_owner == 'microsoft' }} - runs-on: macos-14-xlarge + # if: ${{ github.repository_owner == 'microsoft' }} + runs-on: ubuntu-latest permissions: contents: 'read' actions: 'read' @@ -44,7 +44,7 @@ jobs: cache: 'yarn' node-version: '22' - - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" - run: yarn install --frozen-lockfile @@ -54,156 +54,156 @@ jobs: yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify - - name: Type-check just.config.ts files - run: | - # following packages need to be build in advance: - # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, - # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance - # - # NOTE: we are running this via nx in order to get cache hits later on - yarn nx run-many -t build -p api-docs digest - yarn tsc -p ./tsconfig.just-scripts-configs.json - - - name: 'check packages: installed dependencies versions' - run: | - yarn check:installed-dependencies-versions + # - name: Type-check just.config.ts files + # run: | + # # following packages need to be build in advance: + # # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, + # # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance + # # + # # NOTE: we are running this via nx in order to get cache hits later on + # yarn nx run-many -t build -p api-docs digest + # yarn tsc -p ./tsconfig.just-scripts-configs.json - - name: check formatting - run: | - yarn nx format:check --base origin/master + # - name: 'check packages: installed dependencies versions' + # run: | + # yarn check:installed-dependencies-versions - - name: build, test, lint, test-ssr (affected) - run: | - FLUENT_JEST_WORKER=2 yarn nx affected -t build test lint type-check test-ssr test-integration verify-packaging --exclude react-19-tests-v9 --nxBail + # - name: check formatting + # run: | + # yarn nx format:check --base origin/master - - name: 'Check for unstaged changes' - run: | - git status --porcelain - git diff-index --quiet HEAD -- || exit 1 - - react-major-versions-integration: - if: ${{ github.repository_owner == 'microsoft' }} - runs-on: macos-14-xlarge - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 - with: - main-branch-name: 'master' - - - uses: actions/setup-node@v4 - with: - cache: 'yarn' - node-version: '22' - - - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" - - - run: | - yarn install --frozen-lockfile - yarn rit --react 17 --install-deps - yarn rit --react 19 --install-deps - - - name: Verify Cypress installs from RIT temp workspaces (React 17 -> v13, React 19 -> v14) - run: | - "$GITHUB_WORKSPACE"/tmp/rit/react-17/node_modules/.bin/cypress verify - "$GITHUB_WORKSPACE"/tmp/rit/react-19/node_modules/.bin/cypress verify - - - name: React Versions Integration Tests (17,19) - E2E - id: e2e - run: | - yarn nx affected -t test-rit--17--e2e,test-rit--19--e2e --exclude='react-19-tests-v9,react-charting,react' - - - name: Upload Cypress screenshots if exist - uses: actions/upload-artifact@v4 - if: always() && steps.e2e.outcome == 'failure' - with: - name: cypress-screenshots-react-test-rit - path: | - tmp/rit/**/cypress/screenshots/**/*.png - retention-days: 1 - - - name: React Versions Integration Tests (17,19) - Type-check & Test + - name: build, test, lint, test-ssr (affected) run: | - FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--type-check,test-rit--19--type-check,test-rit--17--test,test-rit--19--test --exclude='react-19-tests-v9' - - react_19_v9_source_code_typecheck: - if: ${{ github.repository_owner == 'microsoft' }} - runs-on: ubuntu-latest - permissions: - contents: 'read' - actions: 'read' - name: v9 source code type-check against React 19 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 - with: - main-branch-name: 'master' - - - uses: actions/setup-node@v4 - with: - cache: 'yarn' - node-version: '22' - - - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" - - - run: | - yarn install --frozen-lockfile - yarn rit --react 19 --install-deps - - - run: | - yarn nx affected -t test-rit--19--type-check --exclude='*,!react-19-tests-v9' - - e2e: - if: ${{ github.repository_owner == 'microsoft' }} - # TODO: switch to macos once problematic tests are fixed - # https://github.com/microsoft/fluentui/issues/33173 - # https://github.com/microsoft/fluentui/issues/33172 - runs-on: ubuntu-latest - permissions: - contents: 'read' - actions: 'read' - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Derive appropriate SHAs for base and head for `nx affected` commands - uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 - with: - main-branch-name: 'master' - - - uses: actions/setup-node@v4 - with: - cache: 'yarn' - node-version: '22' - - - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" - - - run: yarn install --frozen-lockfile - - - name: Install Playwright dependencies - run: yarn playwright install --with-deps - - - name: Verify Cypress install - run: yarn cypress verify - - - name: Cypress/Playwright E2E tests - run: yarn nx affected -t e2e --exclude react-19-tests-v9 --nxBail --parallel 1 - - - name: Upload Cypress screenshots if exist - uses: actions/upload-artifact@v4 - if: failure() - with: - name: cypress-screenshots - path: | - apps/*/cypress/screenshots/**/*.png - packages/**/cypress/screenshots/**/*.png - retention-days: 1 + FLUENT_JEST_WORKER=2 yarn nx run-many -t lint --exclude react-19-tests-v9 --nxBail + + # - name: 'Check for unstaged changes' + # run: | + # git status --porcelain + # git diff-index --quiet HEAD -- || exit 1 + + # react-major-versions-integration: + # if: ${{ github.repository_owner == 'microsoft' }} + # runs-on: macos-14-xlarge + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # + # - name: Derive appropriate SHAs for base and head for `nx affected` commands + # uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 + # with: + # main-branch-name: 'master' + # + # - uses: actions/setup-node@v4 + # with: + # cache: 'yarn' + # node-version: '22' + # + # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + # + # - run: | + # yarn install --frozen-lockfile + # yarn rit --react 17 --install-deps + # yarn rit --react 19 --install-deps + # + # - name: Verify Cypress installs from RIT temp workspaces (React 17 -> v13, React 19 -> v14) + # run: | + # "$GITHUB_WORKSPACE"/tmp/rit/react-17/node_modules/.bin/cypress verify + # "$GITHUB_WORKSPACE"/tmp/rit/react-19/node_modules/.bin/cypress verify + # + # - name: React Versions Integration Tests (17,19) - E2E + # id: e2e + # run: | + # yarn nx affected -t test-rit--17--e2e,test-rit--19--e2e --exclude='react-19-tests-v9,react-charting,react' + # + # - name: Upload Cypress screenshots if exist + # uses: actions/upload-artifact@v4 + # if: always() && steps.e2e.outcome == 'failure' + # with: + # name: cypress-screenshots-react-test-rit + # path: | + # tmp/rit/**/cypress/screenshots/**/*.png + # retention-days: 1 + # + # - name: React Versions Integration Tests (17,19) - Type-check & Test + # run: | + # FLUENT_JEST_WORKER=2 yarn nx affected -t test-rit--17--type-check,test-rit--19--type-check,test-rit--17--test,test-rit--19--test --exclude='react-19-tests-v9' + + # react_19_v9_source_code_typecheck: + # if: ${{ github.repository_owner == 'microsoft' }} + # runs-on: ubuntu-latest + # permissions: + # contents: 'read' + # actions: 'read' + # name: v9 source code type-check against React 19 + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # + # - name: Derive appropriate SHAs for base and head for `nx affected` commands + # uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 + # with: + # main-branch-name: 'master' + # + # - uses: actions/setup-node@v4 + # with: + # cache: 'yarn' + # node-version: '22' + # + # # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + # + # - run: | + # yarn install --frozen-lockfile + # # yarn rit --react 19 --install-deps + # + # - run: | + # yarn nx affected -t test-rit--19--type-check --exclude='*,!react-19-tests-v9' + + # e2e: + # if: ${{ github.repository_owner == 'microsoft' }} + # # TODO: switch to macos once problematic tests are fixed + # # https://github.com/microsoft/fluentui/issues/33173 + # # https://github.com/microsoft/fluentui/issues/33172 + # runs-on: ubuntu-latest + # permissions: + # contents: 'read' + # actions: 'read' + # + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + # + # - name: Derive appropriate SHAs for base and head for `nx affected` commands + # uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3 + # with: + # main-branch-name: 'master' + # + # - uses: actions/setup-node@v4 + # with: + # cache: 'yarn' + # node-version: '22' + # + # - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + # + # - run: yarn install --frozen-lockfile + # + # - name: Install Playwright dependencies + # run: yarn playwright install --with-deps + # + # - name: Verify Cypress install + # run: yarn cypress verify + # + # - name: Cypress/Playwright E2E tests + # run: yarn nx affected -t e2e --exclude react-19-tests-v9 --nxBail --parallel 1 + # + # - name: Upload Cypress screenshots if exist + # uses: actions/upload-artifact@v4 + # if: failure() + # with: + # name: cypress-screenshots + # path: | + # apps/*/cypress/screenshots/**/*.png + # packages/**/cypress/screenshots/**/*.png + # retention-days: 1 diff --git a/change/@fluentui-babel-preset-global-context-705679a5-80b4-48f7-bb30-1a11814f14da.json b/change/@fluentui-babel-preset-global-context-705679a5-80b4-48f7-bb30-1a11814f14da.json new file mode 100644 index 0000000000000..09e3e63fd8c96 --- /dev/null +++ b/change/@fluentui-babel-preset-global-context-705679a5-80b4-48f7-bb30-1a11814f14da.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/babel-preset-global-context", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-babel-preset-storybook-full-source-b4177f21-b247-4a46-8342-2723a0cbf10e.json b/change/@fluentui-babel-preset-storybook-full-source-b4177f21-b247-4a46-8342-2723a0cbf10e.json new file mode 100644 index 0000000000000..25209f5f1b5d9 --- /dev/null +++ b/change/@fluentui-babel-preset-storybook-full-source-b4177f21-b247-4a46-8342-2723a0cbf10e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/babel-preset-storybook-full-source", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-eslint-plugin-react-components-2a2c85bc-4bd3-4417-b692-eed550453db8.json b/change/@fluentui-eslint-plugin-react-components-2a2c85bc-4bd3-4417-b692-eed550453db8.json new file mode 100644 index 0000000000000..f6887942bde8a --- /dev/null +++ b/change/@fluentui-eslint-plugin-react-components-2a2c85bc-4bd3-4417-b692-eed550453db8.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/eslint-plugin-react-components", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-global-context-469e26ee-dad2-47e7-9cd0-c8c2ffae2b04.json b/change/@fluentui-global-context-469e26ee-dad2-47e7-9cd0-c8c2ffae2b04.json new file mode 100644 index 0000000000000..d7f69789558bd --- /dev/null +++ b/change/@fluentui-global-context-469e26ee-dad2-47e7-9cd0-c8c2ffae2b04.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/global-context", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-keyboard-keys-2ae0a3d9-70d3-4b49-8c4c-53c9b5da7e35.json b/change/@fluentui-keyboard-keys-2ae0a3d9-70d3-4b49-8c4c-53c9b5da7e35.json new file mode 100644 index 0000000000000..46de1c21dd60e --- /dev/null +++ b/change/@fluentui-keyboard-keys-2ae0a3d9-70d3-4b49-8c4c-53c9b5da7e35.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/keyboard-keys", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-priority-overflow-6d1fb23c-9862-46ff-b31a-65fa26d2102e.json b/change/@fluentui-priority-overflow-6d1fb23c-9862-46ff-b31a-65fa26d2102e.json new file mode 100644 index 0000000000000..86c45ae969a41 --- /dev/null +++ b/change/@fluentui-priority-overflow-6d1fb23c-9862-46ff-b31a-65fa26d2102e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/priority-overflow", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-accordion-149523bb-ba7e-4ecf-a03b-13fda021316d.json b/change/@fluentui-react-accordion-149523bb-ba7e-4ecf-a03b-13fda021316d.json new file mode 100644 index 0000000000000..ffed0604b9cbe --- /dev/null +++ b/change/@fluentui-react-accordion-149523bb-ba7e-4ecf-a03b-13fda021316d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-accordion", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-alert-c4194014-dd62-4380-8eac-a82c28d970bb.json b/change/@fluentui-react-alert-c4194014-dd62-4380-8eac-a82c28d970bb.json new file mode 100644 index 0000000000000..57aac86a4dd2a --- /dev/null +++ b/change/@fluentui-react-alert-c4194014-dd62-4380-8eac-a82c28d970bb.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-alert", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-aria-ac834fbb-591c-4382-9101-ff7b6534d0f0.json b/change/@fluentui-react-aria-ac834fbb-591c-4382-9101-ff7b6534d0f0.json new file mode 100644 index 0000000000000..5ee5ff78d7196 --- /dev/null +++ b/change/@fluentui-react-aria-ac834fbb-591c-4382-9101-ff7b6534d0f0.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-aria", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-avatar-c06c603a-05cf-40f5-8e36-804a6639642e.json b/change/@fluentui-react-avatar-c06c603a-05cf-40f5-8e36-804a6639642e.json new file mode 100644 index 0000000000000..de1cb689a417d --- /dev/null +++ b/change/@fluentui-react-avatar-c06c603a-05cf-40f5-8e36-804a6639642e.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-avatar", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-badge-cbc91997-d54e-4111-9310-5d6c7e6a75ca.json b/change/@fluentui-react-badge-cbc91997-d54e-4111-9310-5d6c7e6a75ca.json new file mode 100644 index 0000000000000..cf436e4bbf1fc --- /dev/null +++ b/change/@fluentui-react-badge-cbc91997-d54e-4111-9310-5d6c7e6a75ca.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-badge", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-breadcrumb-acc90695-35ed-4ef0-af29-0e8e967a89d1.json b/change/@fluentui-react-breadcrumb-acc90695-35ed-4ef0-af29-0e8e967a89d1.json new file mode 100644 index 0000000000000..fb61120aacb03 --- /dev/null +++ b/change/@fluentui-react-breadcrumb-acc90695-35ed-4ef0-af29-0e8e967a89d1.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-breadcrumb", + "email": "vgenaev@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-button-f7223656-8c3e-44a7-aaf3-2c22af17ba20.json b/change/@fluentui-react-button-f7223656-8c3e-44a7-aaf3-2c22af17ba20.json new file mode 100644 index 0000000000000..f1f080d3f7325 --- /dev/null +++ b/change/@fluentui-react-button-f7223656-8c3e-44a7-aaf3-2c22af17ba20.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-button", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-calendar-compat-5cfff2fd-a06c-4c5e-a233-df7bb6424256.json b/change/@fluentui-react-calendar-compat-5cfff2fd-a06c-4c5e-a233-df7bb6424256.json new file mode 100644 index 0000000000000..0ef861f9fca3e --- /dev/null +++ b/change/@fluentui-react-calendar-compat-5cfff2fd-a06c-4c5e-a233-df7bb6424256.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-calendar-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-card-8f9ff726-95e7-41ba-a834-74a0fc1191fd.json b/change/@fluentui-react-card-8f9ff726-95e7-41ba-a834-74a0fc1191fd.json new file mode 100644 index 0000000000000..cd3ef16c675e0 --- /dev/null +++ b/change/@fluentui-react-card-8f9ff726-95e7-41ba-a834-74a0fc1191fd.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-card", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-carousel-1f23621d-32a5-481d-9a89-1f464ead16e5.json b/change/@fluentui-react-carousel-1f23621d-32a5-481d-9a89-1f464ead16e5.json new file mode 100644 index 0000000000000..f868e55855f18 --- /dev/null +++ b/change/@fluentui-react-carousel-1f23621d-32a5-481d-9a89-1f464ead16e5.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-carousel", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-checkbox-0cdb7466-1fb6-47f2-b66c-dbbc752c722c.json b/change/@fluentui-react-checkbox-0cdb7466-1fb6-47f2-b66c-dbbc752c722c.json new file mode 100644 index 0000000000000..874cd202202ad --- /dev/null +++ b/change/@fluentui-react-checkbox-0cdb7466-1fb6-47f2-b66c-dbbc752c722c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-checkbox", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-color-picker-c6a8f415-ea70-4191-b926-f634b576609f.json b/change/@fluentui-react-color-picker-c6a8f415-ea70-4191-b926-f634b576609f.json new file mode 100644 index 0000000000000..a48af6a85f1a6 --- /dev/null +++ b/change/@fluentui-react-color-picker-c6a8f415-ea70-4191-b926-f634b576609f.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-color-picker", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-combobox-3955dd8e-615a-48b8-9681-76cf545af922.json b/change/@fluentui-react-combobox-3955dd8e-615a-48b8-9681-76cf545af922.json new file mode 100644 index 0000000000000..f31c90ee06af5 --- /dev/null +++ b/change/@fluentui-react-combobox-3955dd8e-615a-48b8-9681-76cf545af922.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-combobox", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-components-99a219a8-cbd3-415c-80b9-8577d9b52763.json b/change/@fluentui-react-components-99a219a8-cbd3-415c-80b9-8577d9b52763.json new file mode 100644 index 0000000000000..436d0cebe4e16 --- /dev/null +++ b/change/@fluentui-react-components-99a219a8-cbd3-415c-80b9-8577d9b52763.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-components", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-conformance-griffel-bf8a7ac7-8bac-4c9c-880c-7efcd9d1e0ae.json b/change/@fluentui-react-conformance-griffel-bf8a7ac7-8bac-4c9c-880c-7efcd9d1e0ae.json new file mode 100644 index 0000000000000..3c87b49888528 --- /dev/null +++ b/change/@fluentui-react-conformance-griffel-bf8a7ac7-8bac-4c9c-880c-7efcd9d1e0ae.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-conformance-griffel", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-context-selector-0fab1e16-0997-4b15-8dc3-c405895ca934.json b/change/@fluentui-react-context-selector-0fab1e16-0997-4b15-8dc3-c405895ca934.json new file mode 100644 index 0000000000000..5c450c9b7a330 --- /dev/null +++ b/change/@fluentui-react-context-selector-0fab1e16-0997-4b15-8dc3-c405895ca934.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-context-selector", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-datepicker-compat-701f7e64-547b-4174-b66b-f2c43c00a82a.json b/change/@fluentui-react-datepicker-compat-701f7e64-547b-4174-b66b-f2c43c00a82a.json new file mode 100644 index 0000000000000..a33dd7b1a78ca --- /dev/null +++ b/change/@fluentui-react-datepicker-compat-701f7e64-547b-4174-b66b-f2c43c00a82a.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-datepicker-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-dialog-da75237f-f3a8-4374-8c2f-0ce806a68665.json b/change/@fluentui-react-dialog-da75237f-f3a8-4374-8c2f-0ce806a68665.json new file mode 100644 index 0000000000000..dfc0bf880a792 --- /dev/null +++ b/change/@fluentui-react-dialog-da75237f-f3a8-4374-8c2f-0ce806a68665.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-dialog", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-divider-caf57e98-d1ab-4b26-9601-3b2d548c4ebe.json b/change/@fluentui-react-divider-caf57e98-d1ab-4b26-9601-3b2d548c4ebe.json new file mode 100644 index 0000000000000..9bdac30532cbb --- /dev/null +++ b/change/@fluentui-react-divider-caf57e98-d1ab-4b26-9601-3b2d548c4ebe.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-divider", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-drawer-91207cf8-72ad-4d85-8dab-ffb4b24f7c08.json b/change/@fluentui-react-drawer-91207cf8-72ad-4d85-8dab-ffb4b24f7c08.json new file mode 100644 index 0000000000000..def42f1cf93e7 --- /dev/null +++ b/change/@fluentui-react-drawer-91207cf8-72ad-4d85-8dab-ffb4b24f7c08.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-drawer", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-field-cc79a790-f4f8-41b7-8727-192b9f37896d.json b/change/@fluentui-react-field-cc79a790-f4f8-41b7-8727-192b9f37896d.json new file mode 100644 index 0000000000000..5d1a895a89953 --- /dev/null +++ b/change/@fluentui-react-field-cc79a790-f4f8-41b7-8727-192b9f37896d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-field", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-icons-compat-c929a316-fa46-4336-8fae-b3f929b21328.json b/change/@fluentui-react-icons-compat-c929a316-fa46-4336-8fae-b3f929b21328.json new file mode 100644 index 0000000000000..8f77f32b6aa94 --- /dev/null +++ b/change/@fluentui-react-icons-compat-c929a316-fa46-4336-8fae-b3f929b21328.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-icons-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-image-cbf73677-4cfc-47f9-b601-3ccbb6d2aba2.json b/change/@fluentui-react-image-cbf73677-4cfc-47f9-b601-3ccbb6d2aba2.json new file mode 100644 index 0000000000000..3c8a4942663ff --- /dev/null +++ b/change/@fluentui-react-image-cbf73677-4cfc-47f9-b601-3ccbb6d2aba2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-image", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-infobutton-a060b4d6-ddf0-4c9f-a384-d2026af73cf1.json b/change/@fluentui-react-infobutton-a060b4d6-ddf0-4c9f-a384-d2026af73cf1.json new file mode 100644 index 0000000000000..0d5900424584f --- /dev/null +++ b/change/@fluentui-react-infobutton-a060b4d6-ddf0-4c9f-a384-d2026af73cf1.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-infobutton", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-infolabel-5e2a8946-e0de-42b0-941d-5a7017d63b2d.json b/change/@fluentui-react-infolabel-5e2a8946-e0de-42b0-941d-5a7017d63b2d.json new file mode 100644 index 0000000000000..b0105fbc14944 --- /dev/null +++ b/change/@fluentui-react-infolabel-5e2a8946-e0de-42b0-941d-5a7017d63b2d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-infolabel", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-input-4cf8c9c8-b26f-47de-a15e-67d0560ec254.json b/change/@fluentui-react-input-4cf8c9c8-b26f-47de-a15e-67d0560ec254.json new file mode 100644 index 0000000000000..90fae815b8063 --- /dev/null +++ b/change/@fluentui-react-input-4cf8c9c8-b26f-47de-a15e-67d0560ec254.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-input", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-jsx-runtime-399b8988-6ae6-4f9f-a05b-52168ed3ae4c.json b/change/@fluentui-react-jsx-runtime-399b8988-6ae6-4f9f-a05b-52168ed3ae4c.json new file mode 100644 index 0000000000000..0cf88f828816d --- /dev/null +++ b/change/@fluentui-react-jsx-runtime-399b8988-6ae6-4f9f-a05b-52168ed3ae4c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-jsx-runtime", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-label-2051dd03-6709-437a-872e-22434f1a9635.json b/change/@fluentui-react-label-2051dd03-6709-437a-872e-22434f1a9635.json new file mode 100644 index 0000000000000..6545247ef5714 --- /dev/null +++ b/change/@fluentui-react-label-2051dd03-6709-437a-872e-22434f1a9635.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-label", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-link-0c9d27c5-8721-4486-92af-e2d7da0b3567.json b/change/@fluentui-react-link-0c9d27c5-8721-4486-92af-e2d7da0b3567.json new file mode 100644 index 0000000000000..03244a780c24f --- /dev/null +++ b/change/@fluentui-react-link-0c9d27c5-8721-4486-92af-e2d7da0b3567.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-link", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-list-134f697a-d9b9-4dae-9609-b4a19afff29c.json b/change/@fluentui-react-list-134f697a-d9b9-4dae-9609-b4a19afff29c.json new file mode 100644 index 0000000000000..6501e05c3fe7c --- /dev/null +++ b/change/@fluentui-react-list-134f697a-d9b9-4dae-9609-b4a19afff29c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-list", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-menu-eb4e4efc-9128-4973-976e-5e03bc285f35.json b/change/@fluentui-react-menu-eb4e4efc-9128-4973-976e-5e03bc285f35.json new file mode 100644 index 0000000000000..79739d73cdba1 --- /dev/null +++ b/change/@fluentui-react-menu-eb4e4efc-9128-4973-976e-5e03bc285f35.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-menu", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-menu-grid-preview-cfb3bf9c-4598-484a-9464-809bed401ea8.json b/change/@fluentui-react-menu-grid-preview-cfb3bf9c-4598-484a-9464-809bed401ea8.json new file mode 100644 index 0000000000000..8174214f43193 --- /dev/null +++ b/change/@fluentui-react-menu-grid-preview-cfb3bf9c-4598-484a-9464-809bed401ea8.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-menu-grid-preview", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-message-bar-16fa3faf-a9b6-4985-9101-ce90482d36ec.json b/change/@fluentui-react-message-bar-16fa3faf-a9b6-4985-9101-ce90482d36ec.json new file mode 100644 index 0000000000000..0f0a272a835af --- /dev/null +++ b/change/@fluentui-react-message-bar-16fa3faf-a9b6-4985-9101-ce90482d36ec.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-message-bar", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-migration-v0-v9-111f96d3-4d78-4524-86ca-bb44ce7904b0.json b/change/@fluentui-react-migration-v0-v9-111f96d3-4d78-4524-86ca-bb44ce7904b0.json new file mode 100644 index 0000000000000..68998709dfded --- /dev/null +++ b/change/@fluentui-react-migration-v0-v9-111f96d3-4d78-4524-86ca-bb44ce7904b0.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-migration-v0-v9", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-migration-v8-v9-8327f965-5c55-4359-8754-11af2e8bee4b.json b/change/@fluentui-react-migration-v8-v9-8327f965-5c55-4359-8754-11af2e8bee4b.json new file mode 100644 index 0000000000000..ad7b5e304f029 --- /dev/null +++ b/change/@fluentui-react-migration-v8-v9-8327f965-5c55-4359-8754-11af2e8bee4b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-migration-v8-v9", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-9c7a7e64-08e2-45a1-a0ee-cb2e0a23a23b.json b/change/@fluentui-react-motion-9c7a7e64-08e2-45a1-a0ee-cb2e0a23a23b.json new file mode 100644 index 0000000000000..2eb4e6e077b64 --- /dev/null +++ b/change/@fluentui-react-motion-9c7a7e64-08e2-45a1-a0ee-cb2e0a23a23b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-motion", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-motion-components-preview-224b7fd3-6246-46bc-bb77-0993f101f960.json b/change/@fluentui-react-motion-components-preview-224b7fd3-6246-46bc-bb77-0993f101f960.json new file mode 100644 index 0000000000000..f696eedc5e81b --- /dev/null +++ b/change/@fluentui-react-motion-components-preview-224b7fd3-6246-46bc-bb77-0993f101f960.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-motion-components-preview", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-nav-61eda3f5-607a-462a-839d-0049e2e502de.json b/change/@fluentui-react-nav-61eda3f5-607a-462a-839d-0049e2e502de.json new file mode 100644 index 0000000000000..0e6c6c23acfbf --- /dev/null +++ b/change/@fluentui-react-nav-61eda3f5-607a-462a-839d-0049e2e502de.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-nav", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-overflow-70bcdf79-f936-4c7c-8ce8-d5e8955c10ac.json b/change/@fluentui-react-overflow-70bcdf79-f936-4c7c-8ce8-d5e8955c10ac.json new file mode 100644 index 0000000000000..8e8c53f47b303 --- /dev/null +++ b/change/@fluentui-react-overflow-70bcdf79-f936-4c7c-8ce8-d5e8955c10ac.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-overflow", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-persona-26b73f58-8b98-4f05-b6f5-0522eb12c02c.json b/change/@fluentui-react-persona-26b73f58-8b98-4f05-b6f5-0522eb12c02c.json new file mode 100644 index 0000000000000..e296f49efea38 --- /dev/null +++ b/change/@fluentui-react-persona-26b73f58-8b98-4f05-b6f5-0522eb12c02c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-persona", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-popover-a65bbc8b-14b3-4e4b-863d-6f12178c7276.json b/change/@fluentui-react-popover-a65bbc8b-14b3-4e4b-863d-6f12178c7276.json new file mode 100644 index 0000000000000..7463c7091d078 --- /dev/null +++ b/change/@fluentui-react-popover-a65bbc8b-14b3-4e4b-863d-6f12178c7276.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-popover", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-portal-715f760e-f793-4e8c-be10-5aaa4ea87277.json b/change/@fluentui-react-portal-715f760e-f793-4e8c-be10-5aaa4ea87277.json new file mode 100644 index 0000000000000..866514aa0f4a1 --- /dev/null +++ b/change/@fluentui-react-portal-715f760e-f793-4e8c-be10-5aaa4ea87277.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-portal", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-portal-compat-c9bcea46-0590-476c-a9fa-9e49643c7146.json b/change/@fluentui-react-portal-compat-c9bcea46-0590-476c-a9fa-9e49643c7146.json new file mode 100644 index 0000000000000..774b551651ba1 --- /dev/null +++ b/change/@fluentui-react-portal-compat-c9bcea46-0590-476c-a9fa-9e49643c7146.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-portal-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-portal-compat-context-a1896fe8-dbac-4c55-a0e9-04ed21f4e4f3.json b/change/@fluentui-react-portal-compat-context-a1896fe8-dbac-4c55-a0e9-04ed21f4e4f3.json new file mode 100644 index 0000000000000..399a9478ae352 --- /dev/null +++ b/change/@fluentui-react-portal-compat-context-a1896fe8-dbac-4c55-a0e9-04ed21f4e4f3.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-portal-compat-context", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-positioning-39fe8186-7097-46b4-8777-b6505ce8d923.json b/change/@fluentui-react-positioning-39fe8186-7097-46b4-8777-b6505ce8d923.json new file mode 100644 index 0000000000000..525621f84ee9f --- /dev/null +++ b/change/@fluentui-react-positioning-39fe8186-7097-46b4-8777-b6505ce8d923.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-positioning", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-progress-2b37488e-cd4e-4db8-b29e-b502afb3af95.json b/change/@fluentui-react-progress-2b37488e-cd4e-4db8-b29e-b502afb3af95.json new file mode 100644 index 0000000000000..633666e725bdc --- /dev/null +++ b/change/@fluentui-react-progress-2b37488e-cd4e-4db8-b29e-b502afb3af95.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-progress", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-provider-169790c7-dc60-4b72-a85a-323a524f87a9.json b/change/@fluentui-react-provider-169790c7-dc60-4b72-a85a-323a524f87a9.json new file mode 100644 index 0000000000000..a5f5974aee856 --- /dev/null +++ b/change/@fluentui-react-provider-169790c7-dc60-4b72-a85a-323a524f87a9.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-provider", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-radio-db9a7e94-d679-47a5-b17e-4bdcffed39de.json b/change/@fluentui-react-radio-db9a7e94-d679-47a5-b17e-4bdcffed39de.json new file mode 100644 index 0000000000000..491105855ec2a --- /dev/null +++ b/change/@fluentui-react-radio-db9a7e94-d679-47a5-b17e-4bdcffed39de.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-radio", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-rating-056afdd5-c0ef-4e1e-a721-15b233ff3c62.json b/change/@fluentui-react-rating-056afdd5-c0ef-4e1e-a721-15b233ff3c62.json new file mode 100644 index 0000000000000..c5fb090a94f43 --- /dev/null +++ b/change/@fluentui-react-rating-056afdd5-c0ef-4e1e-a721-15b233ff3c62.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-rating", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-search-08015bbc-c913-4f76-a821-3075a4188be8.json b/change/@fluentui-react-search-08015bbc-c913-4f76-a821-3075a4188be8.json new file mode 100644 index 0000000000000..b42f97bab53eb --- /dev/null +++ b/change/@fluentui-react-search-08015bbc-c913-4f76-a821-3075a4188be8.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-search", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-select-99f67ca1-f339-483d-934c-81f946761733.json b/change/@fluentui-react-select-99f67ca1-f339-483d-934c-81f946761733.json new file mode 100644 index 0000000000000..953b6a5f65e07 --- /dev/null +++ b/change/@fluentui-react-select-99f67ca1-f339-483d-934c-81f946761733.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-select", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-shared-contexts-5c384ed6-94a0-452a-8c00-0a9e60f25c98.json b/change/@fluentui-react-shared-contexts-5c384ed6-94a0-452a-8c00-0a9e60f25c98.json new file mode 100644 index 0000000000000..75258b4add295 --- /dev/null +++ b/change/@fluentui-react-shared-contexts-5c384ed6-94a0-452a-8c00-0a9e60f25c98.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-shared-contexts", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-skeleton-8082aeef-17c0-4d72-899e-840d66c853ac.json b/change/@fluentui-react-skeleton-8082aeef-17c0-4d72-899e-840d66c853ac.json new file mode 100644 index 0000000000000..03690074b24cc --- /dev/null +++ b/change/@fluentui-react-skeleton-8082aeef-17c0-4d72-899e-840d66c853ac.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-skeleton", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-slider-69428818-1659-4cb5-aa1e-c563a243cd84.json b/change/@fluentui-react-slider-69428818-1659-4cb5-aa1e-c563a243cd84.json new file mode 100644 index 0000000000000..01f8739295cc4 --- /dev/null +++ b/change/@fluentui-react-slider-69428818-1659-4cb5-aa1e-c563a243cd84.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-slider", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-spinbutton-8ac962c4-50b4-40c2-b07b-515b53b439ec.json b/change/@fluentui-react-spinbutton-8ac962c4-50b4-40c2-b07b-515b53b439ec.json new file mode 100644 index 0000000000000..8e8b1c2841d0e --- /dev/null +++ b/change/@fluentui-react-spinbutton-8ac962c4-50b4-40c2-b07b-515b53b439ec.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-spinbutton", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-spinner-0fd4b394-2d30-4f44-875e-769d1cbd9bc2.json b/change/@fluentui-react-spinner-0fd4b394-2d30-4f44-875e-769d1cbd9bc2.json new file mode 100644 index 0000000000000..0c0654123144b --- /dev/null +++ b/change/@fluentui-react-spinner-0fd4b394-2d30-4f44-875e-769d1cbd9bc2.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-spinner", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-storybook-addon-5243d49f-a981-4164-8496-46694743261b.json b/change/@fluentui-react-storybook-addon-5243d49f-a981-4164-8496-46694743261b.json new file mode 100644 index 0000000000000..eae5245f2f675 --- /dev/null +++ b/change/@fluentui-react-storybook-addon-5243d49f-a981-4164-8496-46694743261b.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-storybook-addon", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-storybook-addon-export-to-sandbox-02366fc8-47ad-48b9-8729-bb7b4542ef5c.json b/change/@fluentui-react-storybook-addon-export-to-sandbox-02366fc8-47ad-48b9-8729-bb7b4542ef5c.json new file mode 100644 index 0000000000000..dff53968d2c9e --- /dev/null +++ b/change/@fluentui-react-storybook-addon-export-to-sandbox-02366fc8-47ad-48b9-8729-bb7b4542ef5c.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-storybook-addon-export-to-sandbox", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-swatch-picker-ffbd51e0-acfb-43ff-8097-b2df9cf9acee.json b/change/@fluentui-react-swatch-picker-ffbd51e0-acfb-43ff-8097-b2df9cf9acee.json new file mode 100644 index 0000000000000..cfdf241a424bc --- /dev/null +++ b/change/@fluentui-react-swatch-picker-ffbd51e0-acfb-43ff-8097-b2df9cf9acee.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-swatch-picker", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-switch-651c4b6b-e6ba-4920-b4b5-a163e7b45399.json b/change/@fluentui-react-switch-651c4b6b-e6ba-4920-b4b5-a163e7b45399.json new file mode 100644 index 0000000000000..db6247f2add3d --- /dev/null +++ b/change/@fluentui-react-switch-651c4b6b-e6ba-4920-b4b5-a163e7b45399.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-switch", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-table-fb797715-c98d-4a8d-ba36-9fba08dd0691.json b/change/@fluentui-react-table-fb797715-c98d-4a8d-ba36-9fba08dd0691.json new file mode 100644 index 0000000000000..dfcf741df191b --- /dev/null +++ b/change/@fluentui-react-table-fb797715-c98d-4a8d-ba36-9fba08dd0691.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-table", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabs-b5909258-18f8-4bb3-add4-4427e6c5d386.json b/change/@fluentui-react-tabs-b5909258-18f8-4bb3-add4-4427e6c5d386.json new file mode 100644 index 0000000000000..18f2f38fa40ce --- /dev/null +++ b/change/@fluentui-react-tabs-b5909258-18f8-4bb3-add4-4427e6c5d386.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-tabs", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tabster-040d2f9a-ab80-43c0-8519-06c23669f6f6.json b/change/@fluentui-react-tabster-040d2f9a-ab80-43c0-8519-06c23669f6f6.json new file mode 100644 index 0000000000000..6ae1c79fe3dc5 --- /dev/null +++ b/change/@fluentui-react-tabster-040d2f9a-ab80-43c0-8519-06c23669f6f6.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-tabster", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tag-picker-04b24f98-7e5c-4391-802f-ed56ad3a8623.json b/change/@fluentui-react-tag-picker-04b24f98-7e5c-4391-802f-ed56ad3a8623.json new file mode 100644 index 0000000000000..9d18216e855c9 --- /dev/null +++ b/change/@fluentui-react-tag-picker-04b24f98-7e5c-4391-802f-ed56ad3a8623.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-tag-picker", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tags-887d67ad-773b-47d2-9b72-07d221cc7efc.json b/change/@fluentui-react-tags-887d67ad-773b-47d2-9b72-07d221cc7efc.json new file mode 100644 index 0000000000000..2b600b32d9c66 --- /dev/null +++ b/change/@fluentui-react-tags-887d67ad-773b-47d2-9b72-07d221cc7efc.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-tags", + "email": "vgenaev@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@fluentui-react-teaching-popover-0efd1e72-fcae-4a38-8231-9f241bfd4629.json b/change/@fluentui-react-teaching-popover-0efd1e72-fcae-4a38-8231-9f241bfd4629.json new file mode 100644 index 0000000000000..390ae768fa4a7 --- /dev/null +++ b/change/@fluentui-react-teaching-popover-0efd1e72-fcae-4a38-8231-9f241bfd4629.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-teaching-popover", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-text-15788b86-5f64-4fdb-acb0-b2bf52de0066.json b/change/@fluentui-react-text-15788b86-5f64-4fdb-acb0-b2bf52de0066.json new file mode 100644 index 0000000000000..5dd0638bc8d30 --- /dev/null +++ b/change/@fluentui-react-text-15788b86-5f64-4fdb-acb0-b2bf52de0066.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-text", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-textarea-ce7c0ba8-dcad-4e41-92ff-59666483d844.json b/change/@fluentui-react-textarea-ce7c0ba8-dcad-4e41-92ff-59666483d844.json new file mode 100644 index 0000000000000..84154fcb6272b --- /dev/null +++ b/change/@fluentui-react-textarea-ce7c0ba8-dcad-4e41-92ff-59666483d844.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-textarea", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-theme-bda80be8-9934-4c82-8025-dea13be5b855.json b/change/@fluentui-react-theme-bda80be8-9934-4c82-8025-dea13be5b855.json new file mode 100644 index 0000000000000..991b233dbe5ce --- /dev/null +++ b/change/@fluentui-react-theme-bda80be8-9934-4c82-8025-dea13be5b855.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-theme", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-theme-sass-40f11d56-a26d-44df-b7d0-49b6edee2966.json b/change/@fluentui-react-theme-sass-40f11d56-a26d-44df-b7d0-49b6edee2966.json new file mode 100644 index 0000000000000..350a81706c171 --- /dev/null +++ b/change/@fluentui-react-theme-sass-40f11d56-a26d-44df-b7d0-49b6edee2966.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-theme-sass", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-timepicker-compat-c003b0d9-95fe-4dac-b43f-e6aefa0d3fad.json b/change/@fluentui-react-timepicker-compat-c003b0d9-95fe-4dac-b43f-e6aefa0d3fad.json new file mode 100644 index 0000000000000..3b080d83d3f40 --- /dev/null +++ b/change/@fluentui-react-timepicker-compat-c003b0d9-95fe-4dac-b43f-e6aefa0d3fad.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-timepicker-compat", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-toast-74586b1e-c33a-4456-8dcf-233e53c239e5.json b/change/@fluentui-react-toast-74586b1e-c33a-4456-8dcf-233e53c239e5.json new file mode 100644 index 0000000000000..947e1c4d2ba80 --- /dev/null +++ b/change/@fluentui-react-toast-74586b1e-c33a-4456-8dcf-233e53c239e5.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-toast", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-toolbar-7f302180-de49-4220-916c-9adf4e24258d.json b/change/@fluentui-react-toolbar-7f302180-de49-4220-916c-9adf4e24258d.json new file mode 100644 index 0000000000000..77a3c03337d7c --- /dev/null +++ b/change/@fluentui-react-toolbar-7f302180-de49-4220-916c-9adf4e24258d.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-toolbar", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tooltip-24e80093-8eaf-477a-9d73-e52d11d461e1.json b/change/@fluentui-react-tooltip-24e80093-8eaf-477a-9d73-e52d11d461e1.json new file mode 100644 index 0000000000000..7f8276a02fc48 --- /dev/null +++ b/change/@fluentui-react-tooltip-24e80093-8eaf-477a-9d73-e52d11d461e1.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-tooltip", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-tree-9775572c-9560-48c7-80f3-a74fbebcf5dc.json b/change/@fluentui-react-tree-9775572c-9560-48c7-80f3-a74fbebcf5dc.json new file mode 100644 index 0000000000000..a0bd18df557d6 --- /dev/null +++ b/change/@fluentui-react-tree-9775572c-9560-48c7-80f3-a74fbebcf5dc.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-tree", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-utilities-35cfc07b-0c07-4ed9-a088-87eb3df970f5.json b/change/@fluentui-react-utilities-35cfc07b-0c07-4ed9-a088-87eb3df970f5.json new file mode 100644 index 0000000000000..b8588ed41d7c2 --- /dev/null +++ b/change/@fluentui-react-utilities-35cfc07b-0c07-4ed9-a088-87eb3df970f5.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-utilities", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/change/@fluentui-react-virtualizer-bf43b373-5f46-47d9-a76b-3bdc77fbece9.json b/change/@fluentui-react-virtualizer-bf43b373-5f46-47d9-a76b-3bdc77fbece9.json new file mode 100644 index 0000000000000..d1d02a3ec0311 --- /dev/null +++ b/change/@fluentui-react-virtualizer-bf43b373-5f46-47d9-a76b-3bdc77fbece9.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: migrate to eslint flat config", + "packageName": "@fluentui/react-virtualizer", + "email": "vgenaev@gmail.com", + "dependentChangeType": "none" +} diff --git a/packages/eslint-plugin/src/flat-configs/base/index.js b/packages/eslint-plugin/src/flat-configs/base/index.js index 6c3e725679625..8d8ad6f2657ea 100644 --- a/packages/eslint-plugin/src/flat-configs/base/index.js +++ b/packages/eslint-plugin/src/flat-configs/base/index.js @@ -1,13 +1,13 @@ // @ts-check const core = require('../core'); const compat = require('eslint-plugin-compat'); -const tseslint = require('typescript-eslint'); +const { defineConfig } = require('eslint/config'); const { testFiles, storyFiles } = require('../../utils/configHelpers'); -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config( - ...core, +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig( + core, { rules: { '@fluentui/max-len': 'off', @@ -17,8 +17,9 @@ module.exports = tseslint.config( { files: ['**/src/**/*.{ts,tsx,js}'], ignores: [...testFiles, ...storyFiles], - extends: [compat.configs['flat/recommended']], + ...compat.configs['flat/recommended'], rules: { + ...compat.configs['flat/recommended'].rules, '@rnx-kit/no-export-all': ['error', { expand: 'all' }], }, settings: { diff --git a/packages/eslint-plugin/src/flat-configs/base/legacy.js b/packages/eslint-plugin/src/flat-configs/base/legacy.js index 1401f22e7b9c3..8b5b0cad3cd7d 100644 --- a/packages/eslint-plugin/src/flat-configs/base/legacy.js +++ b/packages/eslint-plugin/src/flat-configs/base/legacy.js @@ -1,11 +1,11 @@ // @ts-check const core = require('../core'); -const tseslint = require('typescript-eslint'); const { getNamingConventionRule } = require('../../utils/configHelpers'); +const { defineConfig } = require('eslint/config'); -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config( - ...core, +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig( + core, { rules: { /** diff --git a/packages/eslint-plugin/src/flat-configs/core.js b/packages/eslint-plugin/src/flat-configs/core.js index 4524548db489c..b2e80823981bb 100644 --- a/packages/eslint-plugin/src/flat-configs/core.js +++ b/packages/eslint-plugin/src/flat-configs/core.js @@ -11,6 +11,7 @@ const { __internal } = require('../internal-flat'); const { globalIgnores } = require('eslint/config'); const airbnbConfig = require('eslint-config-airbnb-extended/legacy'); const rules = require('../rules'); +const { defineConfig } = require('eslint/config'); const IGNORES = [ '**/coverage', @@ -110,6 +111,7 @@ const disabledRules = { 'no-await-in-loop': 'off', 'max-len': 'off', 'no-empty-character-class': 'off', + 'default-param-last': 'off', }; /** @type {import('eslint').Linter.RulesRecord} */ @@ -193,8 +195,8 @@ const typeAwareRules = { '@typescript-eslint/no-deprecated': 'error', }; -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config( +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig( globalIgnores(IGNORES), ...airbnbConfig.configs.base.legacy, importPlugin.flatConfigs.typescript, @@ -242,8 +244,7 @@ module.exports = tseslint.config( }, }, { - files: ['**/*.{ts,tsx}'], - extends: [tseslint.configs.eslintRecommended], + ...tseslint.configs.eslintRecommended, languageOptions: { parser: tseslint.parser, }, @@ -252,6 +253,7 @@ module.exports = tseslint.config( * `@typescript-eslint`plugin eslint rules * @see https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin */ + ...tseslint.configs.eslintRecommended.rules, ...configHelpers.getNamingConventionRule(), '@typescript-eslint/ban-ts-comment': 'error', '@typescript-eslint/explicit-member-accessibility': [ diff --git a/packages/eslint-plugin/src/flat-configs/imports.js b/packages/eslint-plugin/src/flat-configs/imports.js index 1e0957fb7f623..97075ba93a8d0 100644 --- a/packages/eslint-plugin/src/flat-configs/imports.js +++ b/packages/eslint-plugin/src/flat-configs/imports.js @@ -1,9 +1,9 @@ // @ts-check const importPlugin = require('eslint-plugin-import'); -const tseslint = require('typescript-eslint'); +const { defineConfig } = require('eslint/config'); -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config({ +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig({ files: ['**/*.{ts,tsx,js,jsx,cjs,mjs}'], plugins: { import: importPlugin, diff --git a/packages/eslint-plugin/src/flat-configs/node/index.js b/packages/eslint-plugin/src/flat-configs/node/index.js index d62752af68d74..638602c159a9c 100644 --- a/packages/eslint-plugin/src/flat-configs/node/index.js +++ b/packages/eslint-plugin/src/flat-configs/node/index.js @@ -1,10 +1,9 @@ // @ts-check const base = require('../base'); -const tseslint = require('typescript-eslint'); +const { defineConfig } = require('eslint/config'); -/** @type {import('typescript-eslint').ConfigArray} */ - -module.exports = tseslint.config(base, { +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig(base, { files: ['**/*.{ts,js}'], rules: { 'no-console': 'off', diff --git a/packages/eslint-plugin/src/flat-configs/node/legacy.js b/packages/eslint-plugin/src/flat-configs/node/legacy.js index 4d81644a102f4..2c774ab862626 100644 --- a/packages/eslint-plugin/src/flat-configs/node/legacy.js +++ b/packages/eslint-plugin/src/flat-configs/node/legacy.js @@ -1,9 +1,9 @@ // @ts-check const legacy = require('../base/legacy'); -const tseslint = require('typescript-eslint'); +const { defineConfig } = require('eslint/config'); -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config(legacy, { +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig(legacy, { files: ['**/*.{ts,js}'], rules: {}, }); diff --git a/packages/eslint-plugin/src/flat-configs/react/config.js b/packages/eslint-plugin/src/flat-configs/react/config.js index eeea7f1c58951..3e4bbb9c5d501 100644 --- a/packages/eslint-plugin/src/flat-configs/react/config.js +++ b/packages/eslint-plugin/src/flat-configs/react/config.js @@ -4,13 +4,13 @@ const reactPlugin = require('eslint-plugin-react'); const reactHooksPlugin = require('eslint-plugin-react-hooks'); const griffelPlugin = require('@griffel/eslint-plugin'); const configHelpers = require('../../utils/configHelpers'); -const tseslint = require('typescript-eslint'); const { fixupPluginRules } = require('@eslint/compat'); +const { defineConfig } = require('eslint/config'); -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config( +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig( { - files: ['**/*.{jsx,tsx}'], + files: ['**/*.{jsx,tsx,ts,js}'], plugins: { react: reactPlugin, '@griffel': fixupPluginRules(/** @type {any} */ (griffelPlugin)), diff --git a/packages/eslint-plugin/src/flat-configs/react/index.js b/packages/eslint-plugin/src/flat-configs/react/index.js index 98eb14f291f50..8f84f1d0c7a6d 100644 --- a/packages/eslint-plugin/src/flat-configs/react/index.js +++ b/packages/eslint-plugin/src/flat-configs/react/index.js @@ -1,11 +1,11 @@ // @ts-check const configHelpers = require('../../utils/configHelpers'); const baseConfig = require('../base/index'); -const tseslint = require('typescript-eslint'); const reactConfig = require('./config'); const reactCompilerPlugin = require('eslint-plugin-react-compiler'); const { __internal } = require('../../internal-flat'); const { createReactCrossVersionRules } = require('../../shared/react-cross-version-rules'); +const { defineConfig } = require('eslint/config'); /** @type {import("eslint").Linter.RulesRecord} */ const typeAwareRules = { @@ -18,10 +18,10 @@ const v9PackageDeps = Object.keys(configHelpers.getPackageJson({ root, name: 're pkg => !unstableV9Packages.has(pkg), ); -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config( - ...baseConfig, - ...reactConfig, +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig( + baseConfig, + reactConfig, { files: ['**/*.{ts,tsx}'], languageOptions: { @@ -81,7 +81,16 @@ module.exports = tseslint.config( }, }, { - files: ['**/*.cy.{ts,tsx,js}', '**/isConformant.{ts,tsx,js}'], + files: ['cypress.config.ts', '**/*.cy.{ts,tsx}'], + languageOptions: { + parserOptions: { + projectService: false, + project: './tsconfig.cy.json', + }, + }, + }, + { + files: ['**/*.cy.js', '**/isConformant.{ts,tsx,js}'], rules: { 'import/no-extraneous-dependencies': 'off', 'react/jsx-no-bind': 'off', diff --git a/packages/eslint-plugin/src/flat-configs/react/legacy.js b/packages/eslint-plugin/src/flat-configs/react/legacy.js index 347d71efac261..6b8a92f9292d0 100644 --- a/packages/eslint-plugin/src/flat-configs/react/legacy.js +++ b/packages/eslint-plugin/src/flat-configs/react/legacy.js @@ -2,14 +2,15 @@ const baseLegacyConfig = require('../base/legacy'); const reactConfig = require('../react/config'); const configHelpers = require('../../utils/configHelpers'); -const tseslint = require('typescript-eslint'); const { reactLegacy: restrictedGlobals } = require('../../shared/restricted-globals'); const { createReactCrossVersionRules } = require('../../shared/react-cross-version-rules'); +const { defineConfig } = require('eslint/config'); -/** @type {import('typescript-eslint').ConfigArray} */ -module.exports = tseslint.config( +/** @type { import("eslint").Linter.Config } */ +module.exports = defineConfig( + baseLegacyConfig, + reactConfig, { - extends: [baseLegacyConfig, reactConfig], rules: { 'jsdoc/check-tag-names': 'off', '@griffel/no-shorthands': 'off', diff --git a/packages/eslint-plugin/src/utils/configHelpers.js b/packages/eslint-plugin/src/utils/configHelpers.js index d9b4277af51be..37789c7e9a150 100644 --- a/packages/eslint-plugin/src/utils/configHelpers.js +++ b/packages/eslint-plugin/src/utils/configHelpers.js @@ -33,8 +33,10 @@ const testFiles = [ '**/*{.,-}{test,spec,e2e,cy}.{ts,tsx}', '**/{test,tests}/**', '**/testUtilities.{ts,tsx}', + '**/testing/**', '**/common/{isConformant,snapshotSerializers}.{ts,tsx}', './e2e/**', + '**/e2e/**', ]; const docsFiles = ['**/*Page.tsx', '**/{docs,demo}/**', '**/*.doc.{ts,tsx}']; diff --git a/packages/react-components/babel-preset-global-context/.eslintrc.json b/packages/react-components/babel-preset-global-context/.eslintrc.json deleted file mode 100644 index 4a62a51679394..0000000000000 --- a/packages/react-components/babel-preset-global-context/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node"], - "root": true, - "rules": { - "@nx/workspace-enforce-use-client": "off" - } -} diff --git a/packages/react-components/babel-preset-global-context/eslint.config.js b/packages/react-components/babel-preset-global-context/eslint.config.js new file mode 100644 index 0000000000000..6784113bd60a6 --- /dev/null +++ b/packages/react-components/babel-preset-global-context/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/node']]; diff --git a/packages/react-components/babel-preset-storybook-full-source/.eslintrc.json b/packages/react-components/babel-preset-storybook-full-source/.eslintrc.json deleted file mode 100644 index 24ece4e08168b..0000000000000 --- a/packages/react-components/babel-preset-storybook-full-source/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node"], - "root": true -} diff --git a/packages/react-components/babel-preset-storybook-full-source/eslint.config.js b/packages/react-components/babel-preset-storybook-full-source/eslint.config.js new file mode 100644 index 0000000000000..6784113bd60a6 --- /dev/null +++ b/packages/react-components/babel-preset-storybook-full-source/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/node']]; diff --git a/packages/react-components/component-selector-preview/library/.eslintrc.json b/packages/react-components/component-selector-preview/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/component-selector-preview/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/component-selector-preview/library/eslint.config.js b/packages/react-components/component-selector-preview/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/component-selector-preview/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/component-selector-preview/library/jest.config.js b/packages/react-components/component-selector-preview/library/jest.config.js index 6be0523d0159b..0742514c8f982 100644 --- a/packages/react-components/component-selector-preview/library/jest.config.js +++ b/packages/react-components/component-selector-preview/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/component-selector-preview/library/package.json b/packages/react-components/component-selector-preview/library/package.json index 9a59041a270e3..b841419453b06 100644 --- a/packages/react-components/component-selector-preview/library/package.json +++ b/packages/react-components/component-selector-preview/library/package.json @@ -52,5 +52,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/component-selector-preview/stories/.eslintrc.json b/packages/react-components/component-selector-preview/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/component-selector-preview/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/component-selector-preview/stories/eslint.config.js b/packages/react-components/component-selector-preview/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/component-selector-preview/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/component-selector-preview/stories/package.json b/packages/react-components/component-selector-preview/stories/package.json index 65481a662e28e..ecba83046fcee 100644 --- a/packages/react-components/component-selector-preview/stories/package.json +++ b/packages/react-components/component-selector-preview/stories/package.json @@ -7,5 +7,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/deprecated/react-alert/.eslintrc.json b/packages/react-components/deprecated/react-alert/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/deprecated/react-alert/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/deprecated/react-alert/eslint.config.js b/packages/react-components/deprecated/react-alert/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/deprecated/react-alert/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/deprecated/react-infobutton/.eslintrc.json b/packages/react-components/deprecated/react-infobutton/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/deprecated/react-infobutton/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/deprecated/react-infobutton/eslint.config.js b/packages/react-components/deprecated/react-infobutton/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/deprecated/react-infobutton/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/deprecated/react-virtualizer/.eslintrc.json b/packages/react-components/deprecated/react-virtualizer/.eslintrc.json deleted file mode 100644 index e4a3a70dd4445..0000000000000 --- a/packages/react-components/deprecated/react-virtualizer/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "@typescript-eslint/no-deprecated": "off" - } -} diff --git a/packages/react-components/deprecated/react-virtualizer/eslint.config.js b/packages/react-components/deprecated/react-virtualizer/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/deprecated/react-virtualizer/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/eslint-plugin-react-components/.eslintrc.json b/packages/react-components/eslint-plugin-react-components/.eslintrc.json deleted file mode 100644 index 700ea69cb4542..0000000000000 --- a/packages/react-components/eslint-plugin-react-components/.eslintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node", "plugin:eslint-plugin/recommended"], - "plugins": ["eslint-plugin"], - "root": true, - "overrides": [ - { - "files": ["src/rules/*.ts"], - "rules": { - "@typescript-eslint/naming-convention": "off" - } - } - ] -} diff --git a/packages/react-components/eslint-plugin-react-components/eslint.config.js b/packages/react-components/eslint-plugin-react-components/eslint.config.js new file mode 100644 index 0000000000000..f8fca41244f42 --- /dev/null +++ b/packages/react-components/eslint-plugin-react-components/eslint.config.js @@ -0,0 +1,12 @@ +// @ts-check +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [ + ...fluentPlugin.configs['flat/node'], + { + files: ['**/src/**/*.ts'], + rules: { + '@typescript-eslint/naming-convention': 'off', + }, + }, +]; diff --git a/packages/react-components/eslint-plugin-react-components/jest.config.js b/packages/react-components/eslint-plugin-react-components/jest.config.js index e50974c69c865..8be15f3fdcc6e 100644 --- a/packages/react-components/eslint-plugin-react-components/jest.config.js +++ b/packages/react-components/eslint-plugin-react-components/jest.config.js @@ -1,5 +1,4 @@ // @ts-check -/* eslint-disable */ const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/eslint-plugin-react-components/package.json b/packages/react-components/eslint-plugin-react-components/package.json index 1f5a4f8704aea..73616d9e21378 100644 --- a/packages/react-components/eslint-plugin-react-components/package.json +++ b/packages/react-components/eslint-plugin-react-components/package.json @@ -35,5 +35,8 @@ "dist/*.d.ts", "lib-commonjs", "lib" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/global-context/.eslintrc.json b/packages/react-components/global-context/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/global-context/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/global-context/eslint.config.js b/packages/react-components/global-context/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/global-context/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/keyboard-keys/.eslintrc.json b/packages/react-components/keyboard-keys/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/keyboard-keys/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/keyboard-keys/eslint.config.js b/packages/react-components/keyboard-keys/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/keyboard-keys/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/priority-overflow/.eslintrc.json b/packages/react-components/priority-overflow/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/priority-overflow/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/priority-overflow/eslint.config.js b/packages/react-components/priority-overflow/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/priority-overflow/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-accordion/library/.eslintrc.json b/packages/react-components/react-accordion/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-accordion/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-accordion/library/eslint.config.js b/packages/react-components/react-accordion/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-accordion/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-accordion/library/jest.config.js b/packages/react-components/react-accordion/library/jest.config.js index 709e4a2a4da59..974fb858d94f1 100644 --- a/packages/react-components/react-accordion/library/jest.config.js +++ b/packages/react-components/react-accordion/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-accordion/library/package.json b/packages/react-components/react-accordion/library/package.json index af1794f7f2926..52cb2ed5f132a 100644 --- a/packages/react-components/react-accordion/library/package.json +++ b/packages/react-components/react-accordion/library/package.json @@ -57,5 +57,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-accordion/stories/.eslintrc.json b/packages/react-components/react-accordion/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-accordion/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-accordion/stories/eslint.config.js b/packages/react-components/react-accordion/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-accordion/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-accordion/stories/package.json b/packages/react-components/react-accordion/stories/package.json index 1a6011b0e419d..d845066e0d712 100644 --- a/packages/react-components/react-accordion/stories/package.json +++ b/packages/react-components/react-accordion/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-aria/library/.eslintrc.json b/packages/react-components/react-aria/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-aria/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-aria/library/eslint.config.js b/packages/react-components/react-aria/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-aria/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-aria/library/jest.config.js b/packages/react-components/react-aria/library/jest.config.js index 57deee862a091..45b6b46e86ffe 100644 --- a/packages/react-components/react-aria/library/jest.config.js +++ b/packages/react-components/react-aria/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-aria/library/package.json b/packages/react-components/react-aria/library/package.json index f5ce45b6bbab8..5014811cc1804 100644 --- a/packages/react-components/react-aria/library/package.json +++ b/packages/react-components/react-aria/library/package.json @@ -51,5 +51,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-aria/library/tsconfig.cy.json b/packages/react-components/react-aria/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-aria/library/tsconfig.cy.json +++ b/packages/react-components/react-aria/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-aria/stories/.eslintrc.json b/packages/react-components/react-aria/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-aria/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-aria/stories/eslint.config.js b/packages/react-components/react-aria/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-aria/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-aria/stories/package.json b/packages/react-components/react-aria/stories/package.json index 1fa46250e1a8e..a1cecc93ad16f 100644 --- a/packages/react-components/react-aria/stories/package.json +++ b/packages/react-components/react-aria/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-avatar/library/.eslintrc.json b/packages/react-components/react-avatar/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-avatar/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-avatar/library/eslint.config.js b/packages/react-components/react-avatar/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-avatar/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-avatar/library/jest.config.js b/packages/react-components/react-avatar/library/jest.config.js index dc18a8504c421..8f5a7bc359d7c 100644 --- a/packages/react-components/react-avatar/library/jest.config.js +++ b/packages/react-components/react-avatar/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-avatar/library/package.json b/packages/react-components/react-avatar/library/package.json index f3173a65457fe..cc9b1f8a9b6e4 100644 --- a/packages/react-components/react-avatar/library/package.json +++ b/packages/react-components/react-avatar/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-avatar/library/tsconfig.cy.json b/packages/react-components/react-avatar/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-avatar/library/tsconfig.cy.json +++ b/packages/react-components/react-avatar/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-avatar/stories/.eslintrc.json b/packages/react-components/react-avatar/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-avatar/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-avatar/stories/eslint.config.js b/packages/react-components/react-avatar/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-avatar/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-avatar/stories/package.json b/packages/react-components/react-avatar/stories/package.json index 548db9ca313e8..8883bd5142ae3 100644 --- a/packages/react-components/react-avatar/stories/package.json +++ b/packages/react-components/react-avatar/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-badge/library/.eslintrc.json b/packages/react-components/react-badge/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-badge/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-badge/library/eslint.config.js b/packages/react-components/react-badge/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-badge/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-badge/library/jest.config.js b/packages/react-components/react-badge/library/jest.config.js index 9774395ae9a23..6689119946f10 100644 --- a/packages/react-components/react-badge/library/jest.config.js +++ b/packages/react-components/react-badge/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-badge/library/package.json b/packages/react-components/react-badge/library/package.json index 6356c9625b9a7..4e5f39e0794df 100644 --- a/packages/react-components/react-badge/library/package.json +++ b/packages/react-components/react-badge/library/package.json @@ -52,5 +52,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-badge/stories/.eslintrc.json b/packages/react-components/react-badge/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-badge/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-badge/stories/eslint.config.js b/packages/react-components/react-badge/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-badge/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-badge/stories/package.json b/packages/react-components/react-badge/stories/package.json index 17a5dc9839330..3b245ca3f1263 100644 --- a/packages/react-components/react-badge/stories/package.json +++ b/packages/react-components/react-badge/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-breadcrumb/library/.eslintrc.json b/packages/react-components/react-breadcrumb/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-breadcrumb/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-breadcrumb/library/eslint.config.js b/packages/react-components/react-breadcrumb/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-breadcrumb/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-breadcrumb/library/jest.config.js b/packages/react-components/react-breadcrumb/library/jest.config.js index 3e1bdbdcd121b..4e5e493f44c70 100644 --- a/packages/react-components/react-breadcrumb/library/jest.config.js +++ b/packages/react-components/react-breadcrumb/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-breadcrumb/library/package.json b/packages/react-components/react-breadcrumb/library/package.json index 2f4a27fd9caa5..5562e525ff12e 100644 --- a/packages/react-components/react-breadcrumb/library/package.json +++ b/packages/react-components/react-breadcrumb/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-breadcrumb/library/tsconfig.cy.json b/packages/react-components/react-breadcrumb/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-breadcrumb/library/tsconfig.cy.json +++ b/packages/react-components/react-breadcrumb/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-breadcrumb/stories/.eslintrc.json b/packages/react-components/react-breadcrumb/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-breadcrumb/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-breadcrumb/stories/eslint.config.js b/packages/react-components/react-breadcrumb/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-breadcrumb/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-breadcrumb/stories/package.json b/packages/react-components/react-breadcrumb/stories/package.json index 6cd629337a36b..85f8ae1969ee0 100644 --- a/packages/react-components/react-breadcrumb/stories/package.json +++ b/packages/react-components/react-breadcrumb/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-button/library/.eslintrc.json b/packages/react-components/react-button/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-button/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-button/library/eslint.config.js b/packages/react-components/react-button/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-button/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-button/library/jest.config.js b/packages/react-components/react-button/library/jest.config.js index 6d295e622d5f8..5e392ae6c8b3c 100644 --- a/packages/react-components/react-button/library/jest.config.js +++ b/packages/react-components/react-button/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-button/library/package.json b/packages/react-components/react-button/library/package.json index c7e19f91eea2c..34b7eefb2b3f6 100644 --- a/packages/react-components/react-button/library/package.json +++ b/packages/react-components/react-button/library/package.json @@ -56,5 +56,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-button/stories/.eslintrc.json b/packages/react-components/react-button/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-button/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-button/stories/eslint.config.js b/packages/react-components/react-button/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-button/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-button/stories/package.json b/packages/react-components/react-button/stories/package.json index 0dffb2dc7a368..7bbb7321b1e5d 100644 --- a/packages/react-components/react-button/stories/package.json +++ b/packages/react-components/react-button/stories/package.json @@ -9,5 +9,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-calendar-compat/library/.eslintrc.json b/packages/react-components/react-calendar-compat/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-calendar-compat/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-calendar-compat/library/eslint.config.js b/packages/react-components/react-calendar-compat/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-calendar-compat/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-calendar-compat/library/jest.config.js b/packages/react-components/react-calendar-compat/library/jest.config.js index f6ebe01a386f1..20d04bcaed4fa 100644 --- a/packages/react-components/react-calendar-compat/library/jest.config.js +++ b/packages/react-components/react-calendar-compat/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-calendar-compat/library/package.json b/packages/react-components/react-calendar-compat/library/package.json index a9d183c68e375..96645059012ed 100644 --- a/packages/react-components/react-calendar-compat/library/package.json +++ b/packages/react-components/react-calendar-compat/library/package.json @@ -54,5 +54,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-calendar-compat/stories/.eslintrc.json b/packages/react-components/react-calendar-compat/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-calendar-compat/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-calendar-compat/stories/eslint.config.js b/packages/react-components/react-calendar-compat/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-calendar-compat/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-calendar-compat/stories/package.json b/packages/react-components/react-calendar-compat/stories/package.json index 7e948927ad742..171e6db5b6a43 100644 --- a/packages/react-components/react-calendar-compat/stories/package.json +++ b/packages/react-components/react-calendar-compat/stories/package.json @@ -9,5 +9,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-card/library/.eslintrc.json b/packages/react-components/react-card/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-card/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-card/library/eslint.config.js b/packages/react-components/react-card/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-card/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-card/library/jest.config.js b/packages/react-components/react-card/library/jest.config.js index 818a6fd0a53f6..75a28634c1f07 100644 --- a/packages/react-components/react-card/library/jest.config.js +++ b/packages/react-components/react-card/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-card/library/package.json b/packages/react-components/react-card/library/package.json index d7d9d342d65cf..e90e582ca084d 100644 --- a/packages/react-components/react-card/library/package.json +++ b/packages/react-components/react-card/library/package.json @@ -57,5 +57,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-card/library/tsconfig.cy.json b/packages/react-components/react-card/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-card/library/tsconfig.cy.json +++ b/packages/react-components/react-card/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-card/stories/.eslintrc.json b/packages/react-components/react-card/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-card/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-card/stories/eslint.config.js b/packages/react-components/react-card/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-card/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-card/stories/package.json b/packages/react-components/react-card/stories/package.json index 50e505b0e95ce..7aefe12b52869 100644 --- a/packages/react-components/react-card/stories/package.json +++ b/packages/react-components/react-card/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-carousel/library/.eslintrc.json b/packages/react-components/react-carousel/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-carousel/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-carousel/library/eslint.config.js b/packages/react-components/react-carousel/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-carousel/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-carousel/library/jest.config.js b/packages/react-components/react-carousel/library/jest.config.js index 6a3aa3bac93e0..35941be9804a0 100644 --- a/packages/react-components/react-carousel/library/jest.config.js +++ b/packages/react-components/react-carousel/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-carousel/library/package.json b/packages/react-components/react-carousel/library/package.json index d175d3cb42294..e8124c75c8e73 100644 --- a/packages/react-components/react-carousel/library/package.json +++ b/packages/react-components/react-carousel/library/package.json @@ -61,5 +61,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-carousel/library/tsconfig.cy.json b/packages/react-components/react-carousel/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-carousel/library/tsconfig.cy.json +++ b/packages/react-components/react-carousel/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-carousel/stories/.eslintrc.json b/packages/react-components/react-carousel/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-carousel/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-carousel/stories/eslint.config.js b/packages/react-components/react-carousel/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-carousel/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-carousel/stories/package.json b/packages/react-components/react-carousel/stories/package.json index c0bc249ee9469..f53b62775f9a6 100644 --- a/packages/react-components/react-carousel/stories/package.json +++ b/packages/react-components/react-carousel/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-checkbox/library/.eslintrc.json b/packages/react-components/react-checkbox/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-checkbox/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-checkbox/library/eslint.config.js b/packages/react-components/react-checkbox/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-checkbox/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-checkbox/library/jest.config.js b/packages/react-components/react-checkbox/library/jest.config.js index 99ac23722e12f..fca8c13feb110 100644 --- a/packages/react-components/react-checkbox/library/jest.config.js +++ b/packages/react-components/react-checkbox/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-checkbox/library/package.json b/packages/react-components/react-checkbox/library/package.json index 174bbff7668a6..1402ebfed3656 100644 --- a/packages/react-components/react-checkbox/library/package.json +++ b/packages/react-components/react-checkbox/library/package.json @@ -55,5 +55,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-checkbox/stories/.eslintrc.json b/packages/react-components/react-checkbox/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-checkbox/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-checkbox/stories/eslint.config.js b/packages/react-components/react-checkbox/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-checkbox/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-checkbox/stories/package.json b/packages/react-components/react-checkbox/stories/package.json index 4e5438c9602e3..908d9535a67be 100644 --- a/packages/react-components/react-checkbox/stories/package.json +++ b/packages/react-components/react-checkbox/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-color-picker/library/.eslintrc.json b/packages/react-components/react-color-picker/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-color-picker/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-color-picker/library/eslint.config.js b/packages/react-components/react-color-picker/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-color-picker/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-color-picker/library/jest.config.js b/packages/react-components/react-color-picker/library/jest.config.js index 8476bbf5af6f9..250031a5d78a7 100644 --- a/packages/react-components/react-color-picker/library/jest.config.js +++ b/packages/react-components/react-color-picker/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-color-picker/library/package.json b/packages/react-components/react-color-picker/library/package.json index bd2f3a91589ec..5b225aa326e92 100644 --- a/packages/react-components/react-color-picker/library/package.json +++ b/packages/react-components/react-color-picker/library/package.json @@ -54,5 +54,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-color-picker/library/tsconfig.cy.json b/packages/react-components/react-color-picker/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-color-picker/library/tsconfig.cy.json +++ b/packages/react-components/react-color-picker/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-color-picker/stories/.eslintrc.json b/packages/react-components/react-color-picker/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-color-picker/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-color-picker/stories/eslint.config.js b/packages/react-components/react-color-picker/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-color-picker/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-color-picker/stories/package.json b/packages/react-components/react-color-picker/stories/package.json index 6d98c333dc174..a68a3c8fa7889 100644 --- a/packages/react-components/react-color-picker/stories/package.json +++ b/packages/react-components/react-color-picker/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-colorpicker-compat/.eslintrc.json b/packages/react-components/react-colorpicker-compat/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-colorpicker-compat/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-colorpicker-compat/eslint.config.js b/packages/react-components/react-colorpicker-compat/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-colorpicker-compat/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-combobox/library/.eslintrc.json b/packages/react-components/react-combobox/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-combobox/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-combobox/library/eslint.config.js b/packages/react-components/react-combobox/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-combobox/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-combobox/library/jest.config.js b/packages/react-components/react-combobox/library/jest.config.js index c37f332f562de..29c710d147dbd 100644 --- a/packages/react-components/react-combobox/library/jest.config.js +++ b/packages/react-components/react-combobox/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-combobox/library/package.json b/packages/react-components/react-combobox/library/package.json index 1cfb337ac1f31..e8e23c83315a9 100644 --- a/packages/react-components/react-combobox/library/package.json +++ b/packages/react-components/react-combobox/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-combobox/library/tsconfig.cy.json b/packages/react-components/react-combobox/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-combobox/library/tsconfig.cy.json +++ b/packages/react-components/react-combobox/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-combobox/stories/.eslintrc.json b/packages/react-components/react-combobox/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-combobox/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-combobox/stories/eslint.config.js b/packages/react-components/react-combobox/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-combobox/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-combobox/stories/package.json b/packages/react-components/react-combobox/stories/package.json index 08dd13587d30b..6caa0ccabbb13 100644 --- a/packages/react-components/react-combobox/stories/package.json +++ b/packages/react-components/react-combobox/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-components/.eslintrc.json b/packages/react-components/react-components/.eslintrc.json deleted file mode 100644 index d2d1c87a52d9b..0000000000000 --- a/packages/react-components/react-components/.eslintrc.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "overrides": [ - { - "files": "src/index.ts", - "rules": { - "no-restricted-imports": "off", - "@typescript-eslint/no-restricted-imports": [ - "error", - { - "patterns": [ - { - "regex": "@fluentui/react-(infobutton|alert|virtualizer)", - "message": "Alpha/Beta packages cannot be exposed as part of stable api of @fluentui/react-components" - } - ] - } - ] - } - }, - { - "files": "**/index.ts", - "rules": { - "@rnx-kit/no-export-all": [ - "error", - { - "expand": "all" - } - ], - "@fluentui/ban-imports": [ - "error", - { - "pathRegex": ".*", - "names": [ - { - "regex": "Commons$" - } - ], - "message": "Commons types should not be exported from @fluentui/react-components" - } - ] - } - } - ] -} diff --git a/packages/react-components/react-components/eslint.config.js b/packages/react-components/react-components/eslint.config.js new file mode 100644 index 0000000000000..8d8a70cba7b28 --- /dev/null +++ b/packages/react-components/react-components/eslint.config.js @@ -0,0 +1,48 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + files: ['src/index.ts'], + rules: { + 'no-restricted-imports': 'off', + '@typescript-eslint/no-restricted-imports': [ + 'error', + { + patterns: [ + { + regex: '@fluentui/react-(infobutton|alert|virtualizer)', + message: 'Alpha/Beta packages cannot be exposed as part of stable api of @fluentui/react-components', + }, + ], + }, + ], + }, + }, + { + files: ['**/index.ts'], + rules: { + '@rnx-kit/no-export-all': [ + 'error', + { + expand: 'all', + }, + ], + '@fluentui/ban-imports': [ + 'error', + { + pathRegex: '.*', + names: [ + { + regex: 'Commons$', + }, + ], + message: 'Commons types should not be exported from @fluentui/react-components', + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-conformance-griffel/.eslintrc.json b/packages/react-components/react-conformance-griffel/.eslintrc.json deleted file mode 100644 index 24ece4e08168b..0000000000000 --- a/packages/react-components/react-conformance-griffel/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node"], - "root": true -} diff --git a/packages/react-components/react-conformance-griffel/eslint.config.js b/packages/react-components/react-conformance-griffel/eslint.config.js new file mode 100644 index 0000000000000..6784113bd60a6 --- /dev/null +++ b/packages/react-components/react-conformance-griffel/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/node']]; diff --git a/packages/react-components/react-context-selector/.eslintrc.json b/packages/react-components/react-context-selector/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-context-selector/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-context-selector/eslint.config.js b/packages/react-components/react-context-selector/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-context-selector/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-datepicker-compat/library/.eslintrc.json b/packages/react-components/react-datepicker-compat/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-datepicker-compat/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-datepicker-compat/library/eslint.config.js b/packages/react-components/react-datepicker-compat/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-datepicker-compat/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-datepicker-compat/library/jest.config.js b/packages/react-components/react-datepicker-compat/library/jest.config.js index f78b4bb2bdb9c..8fccd7b8065f9 100644 --- a/packages/react-components/react-datepicker-compat/library/jest.config.js +++ b/packages/react-components/react-datepicker-compat/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-datepicker-compat/library/package.json b/packages/react-components/react-datepicker-compat/library/package.json index ba2c377af084e..90f1a294f0829 100644 --- a/packages/react-components/react-datepicker-compat/library/package.json +++ b/packages/react-components/react-datepicker-compat/library/package.json @@ -62,5 +62,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json b/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json +++ b/packages/react-components/react-datepicker-compat/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-datepicker-compat/stories/.eslintrc.json b/packages/react-components/react-datepicker-compat/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-datepicker-compat/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-datepicker-compat/stories/eslint.config.js b/packages/react-components/react-datepicker-compat/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-datepicker-compat/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-datepicker-compat/stories/package.json b/packages/react-components/react-datepicker-compat/stories/package.json index 9a860a5e7365c..6bc0ec7c55273 100644 --- a/packages/react-components/react-datepicker-compat/stories/package.json +++ b/packages/react-components/react-datepicker-compat/stories/package.json @@ -10,5 +10,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-datepicker-compat/stories/src/DatePicker/DatePickerErrorHandling.stories.tsx b/packages/react-components/react-datepicker-compat/stories/src/DatePicker/DatePickerErrorHandling.stories.tsx index e0cade716e534..1c07d062eb69a 100644 --- a/packages/react-components/react-datepicker-compat/stories/src/DatePicker/DatePickerErrorHandling.stories.tsx +++ b/packages/react-components/react-datepicker-compat/stories/src/DatePicker/DatePickerErrorHandling.stories.tsx @@ -16,7 +16,7 @@ const minDate = addMonths(today, -1); const maxDate = addYears(today, 1); const onFormatDate = (date?: Date): string => { - return !date ? '' : `${date?.getMonth() + 1}/${date?.getDate()}/${date?.getFullYear()}`; + return !date ? '' : `${date.getMonth() + 1}/${date.getDate()}/${date.getFullYear()}`; }; export const ErrorHandling = (): JSXElement => { diff --git a/packages/react-components/react-dialog/library/.eslintrc.json b/packages/react-components/react-dialog/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-dialog/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-dialog/library/eslint.config.js b/packages/react-components/react-dialog/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-dialog/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-dialog/library/jest.config.js b/packages/react-components/react-dialog/library/jest.config.js index 9bb2d9dde732d..21837e98e989a 100644 --- a/packages/react-components/react-dialog/library/jest.config.js +++ b/packages/react-components/react-dialog/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-dialog/library/package.json b/packages/react-components/react-dialog/library/package.json index f59f5e047c132..9756553a7b166 100644 --- a/packages/react-components/react-dialog/library/package.json +++ b/packages/react-components/react-dialog/library/package.json @@ -65,5 +65,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-dialog/library/tsconfig.cy.json b/packages/react-components/react-dialog/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-dialog/library/tsconfig.cy.json +++ b/packages/react-components/react-dialog/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-dialog/stories/.eslintrc.json b/packages/react-components/react-dialog/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-dialog/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-dialog/stories/eslint.config.js b/packages/react-components/react-dialog/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-dialog/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-dialog/stories/package.json b/packages/react-components/react-dialog/stories/package.json index 8b0db20780b69..a9dd67bb45c62 100644 --- a/packages/react-components/react-dialog/stories/package.json +++ b/packages/react-components/react-dialog/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-divider/library/.eslintrc.json b/packages/react-components/react-divider/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-divider/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-divider/library/eslint.config.js b/packages/react-components/react-divider/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-divider/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-divider/library/jest.config.js b/packages/react-components/react-divider/library/jest.config.js index e54733aa0d7ce..05e93a432e5ea 100644 --- a/packages/react-components/react-divider/library/jest.config.js +++ b/packages/react-components/react-divider/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-divider/library/package.json b/packages/react-components/react-divider/library/package.json index 805e7cf5d3479..93b24eb2bc1fd 100644 --- a/packages/react-components/react-divider/library/package.json +++ b/packages/react-components/react-divider/library/package.json @@ -51,5 +51,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-divider/stories/.eslintrc.json b/packages/react-components/react-divider/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-divider/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-divider/stories/eslint.config.js b/packages/react-components/react-divider/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-divider/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-divider/stories/package.json b/packages/react-components/react-divider/stories/package.json index 1b2e9cdf57ff4..81db17452615b 100644 --- a/packages/react-components/react-divider/stories/package.json +++ b/packages/react-components/react-divider/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-drawer/library/.eslintrc.json b/packages/react-components/react-drawer/library/.eslintrc.json deleted file mode 100644 index 4a3eab3566f1d..0000000000000 --- a/packages/react-components/react-drawer/library/.eslintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "overrides": [ - { - "files": ["./src/e2e/*.tsx"], - "rules": { - "import/no-extraneous-dependencies": "off", - "react/jsx-no-bind": "off" - } - } - ] -} diff --git a/packages/react-components/react-drawer/library/eslint.config.js b/packages/react-components/react-drawer/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-drawer/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-drawer/library/jest.config.js b/packages/react-components/react-drawer/library/jest.config.js index 30599cabbbac9..23fa48d06b517 100644 --- a/packages/react-components/react-drawer/library/jest.config.js +++ b/packages/react-components/react-drawer/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-drawer/library/package.json b/packages/react-components/react-drawer/library/package.json index bfc39fa0da14d..1e4623ec9701a 100644 --- a/packages/react-components/react-drawer/library/package.json +++ b/packages/react-components/react-drawer/library/package.json @@ -57,5 +57,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-drawer/library/tsconfig.cy.json b/packages/react-components/react-drawer/library/tsconfig.cy.json index 232a935426f7a..1e289eefd5a76 100644 --- a/packages/react-components/react-drawer/library/tsconfig.cy.json +++ b/packages/react-components/react-drawer/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx", "./src/e2e/*.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "./src/e2e/*.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-drawer/stories/.eslintrc.json b/packages/react-components/react-drawer/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-drawer/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-drawer/stories/eslint.config.js b/packages/react-components/react-drawer/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-drawer/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-drawer/stories/package.json b/packages/react-components/react-drawer/stories/package.json index 187d852075c9f..7a9fd66eb9d23 100644 --- a/packages/react-components/react-drawer/stories/package.json +++ b/packages/react-components/react-drawer/stories/package.json @@ -9,5 +9,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-field/library/.eslintrc.json b/packages/react-components/react-field/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-field/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-field/library/eslint.config.js b/packages/react-components/react-field/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-field/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-field/library/jest.config.js b/packages/react-components/react-field/library/jest.config.js index 40140f5bad8a8..2ab1061e6f969 100644 --- a/packages/react-components/react-field/library/jest.config.js +++ b/packages/react-components/react-field/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-field/library/package.json b/packages/react-components/react-field/library/package.json index 22acb8c16f21c..76eb8e8102f42 100644 --- a/packages/react-components/react-field/library/package.json +++ b/packages/react-components/react-field/library/package.json @@ -55,5 +55,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-field/stories/.eslintrc.json b/packages/react-components/react-field/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-field/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-field/stories/eslint.config.js b/packages/react-components/react-field/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-field/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-field/stories/package.json b/packages/react-components/react-field/stories/package.json index 6badef4706c9f..db28112bfb421 100644 --- a/packages/react-components/react-field/stories/package.json +++ b/packages/react-components/react-field/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-icons-compat/library/.eslintrc.json b/packages/react-components/react-icons-compat/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-icons-compat/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-icons-compat/library/eslint.config.js b/packages/react-components/react-icons-compat/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-icons-compat/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-icons-compat/library/jest.config.js b/packages/react-components/react-icons-compat/library/jest.config.js index a2f259c7b7791..914855b1250d6 100644 --- a/packages/react-components/react-icons-compat/library/jest.config.js +++ b/packages/react-components/react-icons-compat/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-icons-compat/library/package.json b/packages/react-components/react-icons-compat/library/package.json index 541fe8a76a61f..08ae24472e66f 100644 --- a/packages/react-components/react-icons-compat/library/package.json +++ b/packages/react-components/react-icons-compat/library/package.json @@ -51,5 +51,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-icons-compat/stories/.eslintrc.json b/packages/react-components/react-icons-compat/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-icons-compat/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-icons-compat/stories/eslint.config.js b/packages/react-components/react-icons-compat/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-icons-compat/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-icons-compat/stories/package.json b/packages/react-components/react-icons-compat/stories/package.json index cd1d0af850b0e..a3a9b42d91e30 100644 --- a/packages/react-components/react-icons-compat/stories/package.json +++ b/packages/react-components/react-icons-compat/stories/package.json @@ -7,5 +7,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-image/library/.eslintrc.json b/packages/react-components/react-image/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-image/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-image/library/eslint.config.js b/packages/react-components/react-image/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-image/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-image/library/jest.config.js b/packages/react-components/react-image/library/jest.config.js index 1228d0798c7e2..b86eb80d2c0c9 100644 --- a/packages/react-components/react-image/library/jest.config.js +++ b/packages/react-components/react-image/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-image/library/package.json b/packages/react-components/react-image/library/package.json index e85707ab8c5cc..30d0d215a8999 100644 --- a/packages/react-components/react-image/library/package.json +++ b/packages/react-components/react-image/library/package.json @@ -51,5 +51,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-image/stories/.eslintrc.json b/packages/react-components/react-image/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-image/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-image/stories/eslint.config.js b/packages/react-components/react-image/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-image/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-image/stories/package.json b/packages/react-components/react-image/stories/package.json index 8e5756f634edb..5605471e159f5 100644 --- a/packages/react-components/react-image/stories/package.json +++ b/packages/react-components/react-image/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-infolabel/library/.eslintrc.json b/packages/react-components/react-infolabel/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-infolabel/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-infolabel/library/eslint.config.js b/packages/react-components/react-infolabel/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-infolabel/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-infolabel/library/jest.config.js b/packages/react-components/react-infolabel/library/jest.config.js index c871bda7ac9f7..f4a8b47b3c3a3 100644 --- a/packages/react-components/react-infolabel/library/jest.config.js +++ b/packages/react-components/react-infolabel/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-infolabel/library/package.json b/packages/react-components/react-infolabel/library/package.json index 207d8e7f30fcf..785484183a220 100644 --- a/packages/react-components/react-infolabel/library/package.json +++ b/packages/react-components/react-infolabel/library/package.json @@ -57,5 +57,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-infolabel/library/tsconfig.cy.json b/packages/react-components/react-infolabel/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-infolabel/library/tsconfig.cy.json +++ b/packages/react-components/react-infolabel/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-infolabel/stories/.eslintrc.json b/packages/react-components/react-infolabel/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-infolabel/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-infolabel/stories/eslint.config.js b/packages/react-components/react-infolabel/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-infolabel/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-infolabel/stories/package.json b/packages/react-components/react-infolabel/stories/package.json index 08e4ff8302974..9d0cb81a996d4 100644 --- a/packages/react-components/react-infolabel/stories/package.json +++ b/packages/react-components/react-infolabel/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-input/library/.eslintrc.json b/packages/react-components/react-input/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-input/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-input/library/eslint.config.js b/packages/react-components/react-input/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-input/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-input/library/jest.config.js b/packages/react-components/react-input/library/jest.config.js index 699e1f6ec8e8d..f570a8dc78fea 100644 --- a/packages/react-components/react-input/library/jest.config.js +++ b/packages/react-components/react-input/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-input/library/package.json b/packages/react-components/react-input/library/package.json index f9ff35dca743e..4d4cae5848f90 100644 --- a/packages/react-components/react-input/library/package.json +++ b/packages/react-components/react-input/library/package.json @@ -53,5 +53,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-input/stories/.eslintrc.json b/packages/react-components/react-input/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-input/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-input/stories/eslint.config.js b/packages/react-components/react-input/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-input/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-input/stories/package.json b/packages/react-components/react-input/stories/package.json index b41c2f1be8332..a7721db646a71 100644 --- a/packages/react-components/react-input/stories/package.json +++ b/packages/react-components/react-input/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-jsx-runtime/.eslintrc.json b/packages/react-components/react-jsx-runtime/.eslintrc.json deleted file mode 100644 index d7fa07c6d0b5a..0000000000000 --- a/packages/react-components/react-jsx-runtime/.eslintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "overrides": [ - { - "files": ["**/*.{test,spec}.tsx"], - "excludedFiles": ["jsx-runtime.test.tsx"], - "rules": { - "@nx/workspace-no-missing-jsx-pragma": ["error", { "runtime": "classic" }] - } - } - ] -} diff --git a/packages/react-components/react-jsx-runtime/eslint.config.js b/packages/react-components/react-jsx-runtime/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-jsx-runtime/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-label/library/.eslintrc.json b/packages/react-components/react-label/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-label/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-label/library/eslint.config.js b/packages/react-components/react-label/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-label/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-label/library/jest.config.js b/packages/react-components/react-label/library/jest.config.js index 53f7c7b70ea8b..9790b1732260d 100644 --- a/packages/react-components/react-label/library/jest.config.js +++ b/packages/react-components/react-label/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-label/library/package.json b/packages/react-components/react-label/library/package.json index 348f5ee66115c..020d5c867f24c 100644 --- a/packages/react-components/react-label/library/package.json +++ b/packages/react-components/react-label/library/package.json @@ -51,5 +51,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-label/stories/.eslintrc.json b/packages/react-components/react-label/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-label/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-label/stories/eslint.config.js b/packages/react-components/react-label/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-label/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-label/stories/package.json b/packages/react-components/react-label/stories/package.json index d5657274fc939..66735a5b7cc3e 100644 --- a/packages/react-components/react-label/stories/package.json +++ b/packages/react-components/react-label/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-link/library/.eslintrc.json b/packages/react-components/react-link/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-link/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-link/library/eslint.config.js b/packages/react-components/react-link/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-link/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-link/library/jest.config.js b/packages/react-components/react-link/library/jest.config.js index fba3cb18a026f..4d334df787764 100644 --- a/packages/react-components/react-link/library/jest.config.js +++ b/packages/react-components/react-link/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-link/library/package.json b/packages/react-components/react-link/library/package.json index e2d1055038116..441eb65d2201a 100644 --- a/packages/react-components/react-link/library/package.json +++ b/packages/react-components/react-link/library/package.json @@ -54,5 +54,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-link/stories/.eslintrc.json b/packages/react-components/react-link/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-link/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-link/stories/eslint.config.js b/packages/react-components/react-link/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-link/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-link/stories/package.json b/packages/react-components/react-link/stories/package.json index addc80f8817cf..0612c2c6eb11c 100644 --- a/packages/react-components/react-link/stories/package.json +++ b/packages/react-components/react-link/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-list/library/.eslintrc.json b/packages/react-components/react-list/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-list/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-list/library/eslint.config.js b/packages/react-components/react-list/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-list/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-list/library/jest.config.js b/packages/react-components/react-list/library/jest.config.js index b8b9f61ddfbf8..3e712d88882a5 100644 --- a/packages/react-components/react-list/library/jest.config.js +++ b/packages/react-components/react-list/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-list/library/package.json b/packages/react-components/react-list/library/package.json index bc80f51edfb22..376f5f3551cbb 100644 --- a/packages/react-components/react-list/library/package.json +++ b/packages/react-components/react-list/library/package.json @@ -57,5 +57,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-list/library/tsconfig.cy.json b/packages/react-components/react-list/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-list/library/tsconfig.cy.json +++ b/packages/react-components/react-list/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-list/stories/.eslintrc.json b/packages/react-components/react-list/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-list/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-list/stories/eslint.config.js b/packages/react-components/react-list/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-list/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-list/stories/package.json b/packages/react-components/react-list/stories/package.json index dbfdc3b711cf5..d4c131c8b2d54 100644 --- a/packages/react-components/react-list/stories/package.json +++ b/packages/react-components/react-list/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-menu-grid-preview/library/.eslintrc.json b/packages/react-components/react-menu-grid-preview/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-menu-grid-preview/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} 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 new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-menu-grid-preview/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-menu-grid-preview/library/jest.config.js b/packages/react-components/react-menu-grid-preview/library/jest.config.js index 29443c89f9fdb..c431b7a29278e 100644 --- a/packages/react-components/react-menu-grid-preview/library/jest.config.js +++ b/packages/react-components/react-menu-grid-preview/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-menu-grid-preview/library/package.json b/packages/react-components/react-menu-grid-preview/library/package.json index a828451553971..7ddc2bab97224 100644 --- a/packages/react-components/react-menu-grid-preview/library/package.json +++ b/packages/react-components/react-menu-grid-preview/library/package.json @@ -56,5 +56,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-menu-grid-preview/stories/.eslintrc.json b/packages/react-components/react-menu-grid-preview/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-menu-grid-preview/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} 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 new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-menu-grid-preview/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-menu-grid-preview/stories/package.json b/packages/react-components/react-menu-grid-preview/stories/package.json index 72bcfb6a8b0c4..e84c8a1964c0c 100644 --- a/packages/react-components/react-menu-grid-preview/stories/package.json +++ b/packages/react-components/react-menu-grid-preview/stories/package.json @@ -9,5 +9,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-menu/library/.eslintrc.json b/packages/react-components/react-menu/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-menu/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-menu/library/eslint.config.js b/packages/react-components/react-menu/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-menu/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-menu/library/jest.config.js b/packages/react-components/react-menu/library/jest.config.js index 9bc6e63b6603e..b0408d0ab154f 100644 --- a/packages/react-components/react-menu/library/jest.config.js +++ b/packages/react-components/react-menu/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-menu/library/package.json b/packages/react-components/react-menu/library/package.json index 66e7c67f70a16..7bea88e663768 100644 --- a/packages/react-components/react-menu/library/package.json +++ b/packages/react-components/react-menu/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-menu/library/tsconfig.cy.json b/packages/react-components/react-menu/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-menu/library/tsconfig.cy.json +++ b/packages/react-components/react-menu/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-menu/stories/.eslintrc.json b/packages/react-components/react-menu/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-menu/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-menu/stories/eslint.config.js b/packages/react-components/react-menu/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-menu/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-menu/stories/package.json b/packages/react-components/react-menu/stories/package.json index 5722f995fc1d1..67fce2b4fabb3 100644 --- a/packages/react-components/react-menu/stories/package.json +++ b/packages/react-components/react-menu/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-message-bar/library/.eslintrc.json b/packages/react-components/react-message-bar/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-message-bar/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-message-bar/library/eslint.config.js b/packages/react-components/react-message-bar/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-message-bar/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-message-bar/library/jest.config.js b/packages/react-components/react-message-bar/library/jest.config.js index 2669112fea23b..77c428722a82d 100644 --- a/packages/react-components/react-message-bar/library/jest.config.js +++ b/packages/react-components/react-message-bar/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-message-bar/library/package.json b/packages/react-components/react-message-bar/library/package.json index 1381f8aabb44a..8728bbf60f2ab 100644 --- a/packages/react-components/react-message-bar/library/package.json +++ b/packages/react-components/react-message-bar/library/package.json @@ -57,5 +57,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-message-bar/library/tsconfig.cy.json b/packages/react-components/react-message-bar/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-message-bar/library/tsconfig.cy.json +++ b/packages/react-components/react-message-bar/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-message-bar/stories/.eslintrc.json b/packages/react-components/react-message-bar/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-message-bar/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-message-bar/stories/eslint.config.js b/packages/react-components/react-message-bar/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-message-bar/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-message-bar/stories/package.json b/packages/react-components/react-message-bar/stories/package.json index 76975340047de..54a2745f52bc4 100644 --- a/packages/react-components/react-message-bar/stories/package.json +++ b/packages/react-components/react-message-bar/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-migration-v0-v9/library/.eslintrc.json b/packages/react-components/react-migration-v0-v9/library/.eslintrc.json deleted file mode 100644 index 9b007cc562294..0000000000000 --- a/packages/react-components/react-migration-v0-v9/library/.eslintrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "overrides": [ - { - "files": "**/*.stories.{tsx,ts}", - "rules": { - "no-restricted-imports": [ - "error", - { - "patterns": ["src/"] - } - ] - } - } - ] -} 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 new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-migration-v0-v9/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-migration-v0-v9/library/jest.config.js b/packages/react-components/react-migration-v0-v9/library/jest.config.js index 3a6e9af089f37..b1260c3682098 100644 --- a/packages/react-components/react-migration-v0-v9/library/jest.config.js +++ b/packages/react-components/react-migration-v0-v9/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-migration-v0-v9/library/package.json b/packages/react-components/react-migration-v0-v9/library/package.json index 0e4e3cc58f605..b8eaaca0f547e 100644 --- a/packages/react-components/react-migration-v0-v9/library/package.json +++ b/packages/react-components/react-migration-v0-v9/library/package.json @@ -59,5 +59,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-migration-v0-v9/stories/.eslintrc.json b/packages/react-components/react-migration-v0-v9/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-migration-v0-v9/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} 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 new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-migration-v0-v9/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-migration-v0-v9/stories/package.json b/packages/react-components/react-migration-v0-v9/stories/package.json index f1648e81a304f..77e5984f18f22 100644 --- a/packages/react-components/react-migration-v0-v9/stories/package.json +++ b/packages/react-components/react-migration-v0-v9/stories/package.json @@ -11,5 +11,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-migration-v8-v9/library/.eslintrc.json b/packages/react-components/react-migration-v8-v9/library/.eslintrc.json deleted file mode 100644 index 9b007cc562294..0000000000000 --- a/packages/react-components/react-migration-v8-v9/library/.eslintrc.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "overrides": [ - { - "files": "**/*.stories.{tsx,ts}", - "rules": { - "no-restricted-imports": [ - "error", - { - "patterns": ["src/"] - } - ] - } - } - ] -} 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 new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-migration-v8-v9/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-migration-v8-v9/library/jest.config.js b/packages/react-components/react-migration-v8-v9/library/jest.config.js index 8f4369d2c78a4..1153d0311361a 100644 --- a/packages/react-components/react-migration-v8-v9/library/jest.config.js +++ b/packages/react-components/react-migration-v8-v9/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-migration-v8-v9/library/package.json b/packages/react-components/react-migration-v8-v9/library/package.json index 1c41084c96a71..338ad3074b10f 100644 --- a/packages/react-components/react-migration-v8-v9/library/package.json +++ b/packages/react-components/react-migration-v8-v9/library/package.json @@ -52,5 +52,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-migration-v8-v9/stories/.eslintrc.json b/packages/react-components/react-migration-v8-v9/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-migration-v8-v9/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} 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 new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-migration-v8-v9/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-migration-v8-v9/stories/package.json b/packages/react-components/react-migration-v8-v9/stories/package.json index 36b56d4600bef..2d47065a0d8b2 100644 --- a/packages/react-components/react-migration-v8-v9/stories/package.json +++ b/packages/react-components/react-migration-v8-v9/stories/package.json @@ -10,5 +10,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-motion-components-preview/library/.eslintrc.json b/packages/react-components/react-motion-components-preview/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-motion-components-preview/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} 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 new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-motion-components-preview/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-motion-components-preview/library/jest.config.js b/packages/react-components/react-motion-components-preview/library/jest.config.js index 4b0d5f8d848f1..363146e9ba5b1 100644 --- a/packages/react-components/react-motion-components-preview/library/jest.config.js +++ b/packages/react-components/react-motion-components-preview/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-motion-components-preview/library/package.json b/packages/react-components/react-motion-components-preview/library/package.json index 5a10f14f9f13f..2aaea7ee3a764 100644 --- a/packages/react-components/react-motion-components-preview/library/package.json +++ b/packages/react-components/react-motion-components-preview/library/package.json @@ -47,5 +47,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-motion-components-preview/stories/.eslintrc.json b/packages/react-components/react-motion-components-preview/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-motion-components-preview/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} 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 new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-motion-components-preview/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-motion-components-preview/stories/package.json b/packages/react-components/react-motion-components-preview/stories/package.json index d5f82d9cbe22d..9267f7b13fd12 100644 --- a/packages/react-components/react-motion-components-preview/stories/package.json +++ b/packages/react-components/react-motion-components-preview/stories/package.json @@ -9,5 +9,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-motion/library/.eslintrc.json b/packages/react-components/react-motion/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-motion/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-motion/library/eslint.config.js b/packages/react-components/react-motion/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-motion/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-motion/library/jest.config.js b/packages/react-components/react-motion/library/jest.config.js index 5a71c159afce6..294f7710ace60 100644 --- a/packages/react-components/react-motion/library/jest.config.js +++ b/packages/react-components/react-motion/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-motion/library/package.json b/packages/react-components/react-motion/library/package.json index b518225861a93..05e23984f3760 100644 --- a/packages/react-components/react-motion/library/package.json +++ b/packages/react-components/react-motion/library/package.json @@ -49,5 +49,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-motion/library/tsconfig.cy.json b/packages/react-components/react-motion/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-motion/library/tsconfig.cy.json +++ b/packages/react-components/react-motion/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-motion/stories/.eslintrc.json b/packages/react-components/react-motion/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-motion/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-motion/stories/eslint.config.js b/packages/react-components/react-motion/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-motion/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-motion/stories/package.json b/packages/react-components/react-motion/stories/package.json index 7f1664e025491..985499a0836b6 100644 --- a/packages/react-components/react-motion/stories/package.json +++ b/packages/react-components/react-motion/stories/package.json @@ -9,5 +9,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-nav/library/.eslintrc.json b/packages/react-components/react-nav/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-nav/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-nav/library/eslint.config.js b/packages/react-components/react-nav/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-nav/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-nav/library/jest.config.js b/packages/react-components/react-nav/library/jest.config.js index 2732be85a0c0e..ed2eaf91d6163 100644 --- a/packages/react-components/react-nav/library/jest.config.js +++ b/packages/react-components/react-nav/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-nav/library/package.json b/packages/react-components/react-nav/library/package.json index 3cb4f20721bf4..f20fb53429a5c 100644 --- a/packages/react-components/react-nav/library/package.json +++ b/packages/react-components/react-nav/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-nav/stories/.eslintrc.json b/packages/react-components/react-nav/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-nav/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-nav/stories/eslint.config.js b/packages/react-components/react-nav/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-nav/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-nav/stories/package.json b/packages/react-components/react-nav/stories/package.json index 21687b43430f9..415aac6b0dc72 100644 --- a/packages/react-components/react-nav/stories/package.json +++ b/packages/react-components/react-nav/stories/package.json @@ -9,5 +9,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-overflow/library/.eslintrc.json b/packages/react-components/react-overflow/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-overflow/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-overflow/library/eslint.config.js b/packages/react-components/react-overflow/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-overflow/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-overflow/library/jest.config.js b/packages/react-components/react-overflow/library/jest.config.js index 2993091e84b41..70b7638efd34c 100644 --- a/packages/react-components/react-overflow/library/jest.config.js +++ b/packages/react-components/react-overflow/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-overflow/library/package.json b/packages/react-components/react-overflow/library/package.json index b0dac04b9d320..d31218a12aa3d 100644 --- a/packages/react-components/react-overflow/library/package.json +++ b/packages/react-components/react-overflow/library/package.json @@ -52,5 +52,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-overflow/library/tsconfig.cy.json b/packages/react-components/react-overflow/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-overflow/library/tsconfig.cy.json +++ b/packages/react-components/react-overflow/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-overflow/stories/.eslintrc.json b/packages/react-components/react-overflow/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-overflow/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-overflow/stories/eslint.config.js b/packages/react-components/react-overflow/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-overflow/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-overflow/stories/package.json b/packages/react-components/react-overflow/stories/package.json index 3fe8cb75ec62b..37953db2ed7cb 100644 --- a/packages/react-components/react-overflow/stories/package.json +++ b/packages/react-components/react-overflow/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-persona/library/.eslintrc.json b/packages/react-components/react-persona/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-persona/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-persona/library/eslint.config.js b/packages/react-components/react-persona/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-persona/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-persona/library/jest.config.js b/packages/react-components/react-persona/library/jest.config.js index bad8ac27c7cbe..20d0e409c4e78 100644 --- a/packages/react-components/react-persona/library/jest.config.js +++ b/packages/react-components/react-persona/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-persona/library/package.json b/packages/react-components/react-persona/library/package.json index 20cd5df51d400..7c21772af7b01 100644 --- a/packages/react-components/react-persona/library/package.json +++ b/packages/react-components/react-persona/library/package.json @@ -53,5 +53,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-persona/stories/.eslintrc.json b/packages/react-components/react-persona/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-persona/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-persona/stories/eslint.config.js b/packages/react-components/react-persona/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-persona/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-persona/stories/package.json b/packages/react-components/react-persona/stories/package.json index 1c65be34aac7a..e61b0aa537939 100644 --- a/packages/react-components/react-persona/stories/package.json +++ b/packages/react-components/react-persona/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-popover/library/.eslintrc.json b/packages/react-components/react-popover/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-popover/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-popover/library/eslint.config.js b/packages/react-components/react-popover/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-popover/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-popover/library/jest.config.js b/packages/react-components/react-popover/library/jest.config.js index ae5ce8aeee59a..44d384654b064 100644 --- a/packages/react-components/react-popover/library/jest.config.js +++ b/packages/react-components/react-popover/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-popover/library/package.json b/packages/react-components/react-popover/library/package.json index 9cc0b2228042e..8d068b91edacc 100644 --- a/packages/react-components/react-popover/library/package.json +++ b/packages/react-components/react-popover/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-popover/library/tsconfig.cy.json b/packages/react-components/react-popover/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-popover/library/tsconfig.cy.json +++ b/packages/react-components/react-popover/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-popover/stories/.eslintrc.json b/packages/react-components/react-popover/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-popover/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-popover/stories/eslint.config.js b/packages/react-components/react-popover/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-popover/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-popover/stories/package.json b/packages/react-components/react-popover/stories/package.json index 4455a85ca3ca0..d30679d000a1a 100644 --- a/packages/react-components/react-popover/stories/package.json +++ b/packages/react-components/react-popover/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-portal-compat-context/.eslintrc.json b/packages/react-components/react-portal-compat-context/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-portal-compat-context/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-portal-compat-context/eslint.config.js b/packages/react-components/react-portal-compat-context/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-portal-compat-context/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-portal-compat/.eslintrc.json b/packages/react-components/react-portal-compat/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-portal-compat/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-portal-compat/eslint.config.js b/packages/react-components/react-portal-compat/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-portal-compat/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-portal/library/.eslintrc.json b/packages/react-components/react-portal/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-portal/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-portal/library/eslint.config.js b/packages/react-components/react-portal/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-portal/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-portal/library/jest.config.js b/packages/react-components/react-portal/library/jest.config.js index 955789b7724bb..b7a54eeb6b616 100644 --- a/packages/react-components/react-portal/library/jest.config.js +++ b/packages/react-components/react-portal/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-portal/library/package.json b/packages/react-components/react-portal/library/package.json index 240a9a3861404..4eaf5e2fe53f5 100644 --- a/packages/react-components/react-portal/library/package.json +++ b/packages/react-components/react-portal/library/package.json @@ -50,5 +50,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-portal/stories/.eslintrc.json b/packages/react-components/react-portal/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-portal/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-portal/stories/eslint.config.js b/packages/react-components/react-portal/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-portal/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-portal/stories/package.json b/packages/react-components/react-portal/stories/package.json index d64e78e681909..d6db9c217ba53 100644 --- a/packages/react-components/react-portal/stories/package.json +++ b/packages/react-components/react-portal/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-positioning/library/.eslintrc.json b/packages/react-components/react-positioning/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-positioning/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-positioning/library/eslint.config.js b/packages/react-components/react-positioning/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-positioning/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-positioning/library/jest.config.js b/packages/react-components/react-positioning/library/jest.config.js index 049161bc2b8dd..97c5d952c7e58 100644 --- a/packages/react-components/react-positioning/library/jest.config.js +++ b/packages/react-components/react-positioning/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-positioning/library/package.json b/packages/react-components/react-positioning/library/package.json index a0588978fd882..ff4aab3fcc30f 100644 --- a/packages/react-components/react-positioning/library/package.json +++ b/packages/react-components/react-positioning/library/package.json @@ -51,5 +51,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-positioning/library/tsconfig.cy.json b/packages/react-components/react-positioning/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-positioning/library/tsconfig.cy.json +++ b/packages/react-components/react-positioning/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-positioning/stories/.eslintrc.json b/packages/react-components/react-positioning/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-positioning/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-positioning/stories/eslint.config.js b/packages/react-components/react-positioning/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-positioning/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-positioning/stories/package.json b/packages/react-components/react-positioning/stories/package.json index 36c5f676ac16a..f000124bc82c8 100644 --- a/packages/react-components/react-positioning/stories/package.json +++ b/packages/react-components/react-positioning/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-progress/library/.eslintrc.json b/packages/react-components/react-progress/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-progress/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-progress/library/eslint.config.js b/packages/react-components/react-progress/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-progress/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-progress/library/jest.config.js b/packages/react-components/react-progress/library/jest.config.js index a64b452928202..05208aa1300f8 100644 --- a/packages/react-components/react-progress/library/jest.config.js +++ b/packages/react-components/react-progress/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-progress/library/package.json b/packages/react-components/react-progress/library/package.json index 640a3a04ae4df..08c8b5b8a9111 100644 --- a/packages/react-components/react-progress/library/package.json +++ b/packages/react-components/react-progress/library/package.json @@ -52,5 +52,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-progress/stories/.eslintrc.json b/packages/react-components/react-progress/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-progress/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-progress/stories/eslint.config.js b/packages/react-components/react-progress/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-progress/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-progress/stories/package.json b/packages/react-components/react-progress/stories/package.json index 25bddf6346c04..3e47e5da4f520 100644 --- a/packages/react-components/react-progress/stories/package.json +++ b/packages/react-components/react-progress/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-provider/library/.eslintrc.json b/packages/react-components/react-provider/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-provider/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-provider/library/eslint.config.js b/packages/react-components/react-provider/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-provider/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-provider/library/jest.config.js b/packages/react-components/react-provider/library/jest.config.js index d087946492e97..a490481df0af7 100644 --- a/packages/react-components/react-provider/library/jest.config.js +++ b/packages/react-components/react-provider/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-provider/library/package.json b/packages/react-components/react-provider/library/package.json index b7a9ff362b29f..5f327ef1dde82 100644 --- a/packages/react-components/react-provider/library/package.json +++ b/packages/react-components/react-provider/library/package.json @@ -54,5 +54,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-provider/stories/.eslintrc.json b/packages/react-components/react-provider/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-provider/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-provider/stories/eslint.config.js b/packages/react-components/react-provider/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-provider/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-provider/stories/package.json b/packages/react-components/react-provider/stories/package.json index a0bef7224fdcb..811b72ca44b99 100644 --- a/packages/react-components/react-provider/stories/package.json +++ b/packages/react-components/react-provider/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-radio/library/.eslintrc.json b/packages/react-components/react-radio/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-radio/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-radio/library/eslint.config.js b/packages/react-components/react-radio/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-radio/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-radio/library/jest.config.js b/packages/react-components/react-radio/library/jest.config.js index 83a890baad907..3709dbf420fb9 100644 --- a/packages/react-components/react-radio/library/jest.config.js +++ b/packages/react-components/react-radio/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-radio/library/package.json b/packages/react-components/react-radio/library/package.json index 30ab658a97b5d..bac7cc805c486 100644 --- a/packages/react-components/react-radio/library/package.json +++ b/packages/react-components/react-radio/library/package.json @@ -54,5 +54,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-radio/stories/.eslintrc.json b/packages/react-components/react-radio/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-radio/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-radio/stories/eslint.config.js b/packages/react-components/react-radio/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-radio/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-radio/stories/package.json b/packages/react-components/react-radio/stories/package.json index d3f123b7a2709..350751d57d8e5 100644 --- a/packages/react-components/react-radio/stories/package.json +++ b/packages/react-components/react-radio/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-rating/library/.eslintrc.json b/packages/react-components/react-rating/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-rating/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-rating/library/eslint.config.js b/packages/react-components/react-rating/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-rating/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-rating/library/jest.config.js b/packages/react-components/react-rating/library/jest.config.js index 15bd961b60bd0..f9d788e919e47 100644 --- a/packages/react-components/react-rating/library/jest.config.js +++ b/packages/react-components/react-rating/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-rating/library/package.json b/packages/react-components/react-rating/library/package.json index 74b308a63ecd2..0ff54d89d3ea7 100644 --- a/packages/react-components/react-rating/library/package.json +++ b/packages/react-components/react-rating/library/package.json @@ -53,5 +53,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-rating/stories/.eslintrc.json b/packages/react-components/react-rating/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-rating/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-rating/stories/eslint.config.js b/packages/react-components/react-rating/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-rating/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-rating/stories/package.json b/packages/react-components/react-rating/stories/package.json index 1431204e0c52a..a95764736034f 100644 --- a/packages/react-components/react-rating/stories/package.json +++ b/packages/react-components/react-rating/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-search/library/.eslintrc.json b/packages/react-components/react-search/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-search/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-search/library/eslint.config.js b/packages/react-components/react-search/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-search/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-search/library/jest.config.js b/packages/react-components/react-search/library/jest.config.js index 2a7c6ccd16fbc..c2f1843bbed85 100644 --- a/packages/react-components/react-search/library/jest.config.js +++ b/packages/react-components/react-search/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-search/library/package.json b/packages/react-components/react-search/library/package.json index ae8a6abc4c335..b9319eeeff461 100644 --- a/packages/react-components/react-search/library/package.json +++ b/packages/react-components/react-search/library/package.json @@ -53,5 +53,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-search/stories/.eslintrc.json b/packages/react-components/react-search/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-search/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-search/stories/eslint.config.js b/packages/react-components/react-search/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-search/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-search/stories/package.json b/packages/react-components/react-search/stories/package.json index 27657a67729e3..40c5d5418b59c 100644 --- a/packages/react-components/react-search/stories/package.json +++ b/packages/react-components/react-search/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-select/library/.eslintrc.json b/packages/react-components/react-select/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-select/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-select/library/eslint.config.js b/packages/react-components/react-select/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-select/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-select/library/jest.config.js b/packages/react-components/react-select/library/jest.config.js index 33e62cbe01e3a..47c929848c389 100644 --- a/packages/react-components/react-select/library/jest.config.js +++ b/packages/react-components/react-select/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-select/library/package.json b/packages/react-components/react-select/library/package.json index 71c1a4eeaf5ec..f6a4bf4646c86 100644 --- a/packages/react-components/react-select/library/package.json +++ b/packages/react-components/react-select/library/package.json @@ -53,5 +53,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-select/stories/.eslintrc.json b/packages/react-components/react-select/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-select/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-select/stories/eslint.config.js b/packages/react-components/react-select/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-select/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-select/stories/package.json b/packages/react-components/react-select/stories/package.json index 369dfbb5c71f1..39be9ca6cc939 100644 --- a/packages/react-components/react-select/stories/package.json +++ b/packages/react-components/react-select/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-shared-contexts/library/.eslintrc.json b/packages/react-components/react-shared-contexts/library/.eslintrc.json deleted file mode 100644 index af60bd4617c44..0000000000000 --- a/packages/react-components/react-shared-contexts/library/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "prefer-const": "off" - } -} diff --git a/packages/react-components/react-shared-contexts/library/eslint.config.js b/packages/react-components/react-shared-contexts/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-shared-contexts/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-shared-contexts/library/jest.config.js b/packages/react-components/react-shared-contexts/library/jest.config.js index 62d67b6efdbd6..ba7231e2ff3b3 100644 --- a/packages/react-components/react-shared-contexts/library/jest.config.js +++ b/packages/react-components/react-shared-contexts/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-shared-contexts/library/package.json b/packages/react-components/react-shared-contexts/library/package.json index c0f0ec1d0a3f2..8587d7a1f7244 100644 --- a/packages/react-components/react-shared-contexts/library/package.json +++ b/packages/react-components/react-shared-contexts/library/package.json @@ -43,5 +43,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-shared-contexts/stories/.eslintrc.json b/packages/react-components/react-shared-contexts/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-shared-contexts/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-shared-contexts/stories/eslint.config.js b/packages/react-components/react-shared-contexts/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-shared-contexts/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-shared-contexts/stories/package.json b/packages/react-components/react-shared-contexts/stories/package.json index c120de913d7dc..4638afe84ccb5 100644 --- a/packages/react-components/react-shared-contexts/stories/package.json +++ b/packages/react-components/react-shared-contexts/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-skeleton/library/.eslintrc.json b/packages/react-components/react-skeleton/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-skeleton/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-skeleton/library/eslint.config.js b/packages/react-components/react-skeleton/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-skeleton/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-skeleton/library/jest.config.js b/packages/react-components/react-skeleton/library/jest.config.js index a97165fc65d46..9e2cba4bc3bba 100644 --- a/packages/react-components/react-skeleton/library/jest.config.js +++ b/packages/react-components/react-skeleton/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-skeleton/library/package.json b/packages/react-components/react-skeleton/library/package.json index 44bd3b75c748d..c1129b86b657b 100644 --- a/packages/react-components/react-skeleton/library/package.json +++ b/packages/react-components/react-skeleton/library/package.json @@ -52,5 +52,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-skeleton/stories/.eslintrc.json b/packages/react-components/react-skeleton/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-skeleton/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-skeleton/stories/eslint.config.js b/packages/react-components/react-skeleton/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-skeleton/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-skeleton/stories/package.json b/packages/react-components/react-skeleton/stories/package.json index b7c2a4f9e0b2d..b873d0121eee5 100644 --- a/packages/react-components/react-skeleton/stories/package.json +++ b/packages/react-components/react-skeleton/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-slider/library/.eslintrc.json b/packages/react-components/react-slider/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-slider/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-slider/library/eslint.config.js b/packages/react-components/react-slider/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-slider/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-slider/library/jest.config.js b/packages/react-components/react-slider/library/jest.config.js index c33f57566a1f5..c053bf00b9023 100644 --- a/packages/react-components/react-slider/library/jest.config.js +++ b/packages/react-components/react-slider/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-slider/library/package.json b/packages/react-components/react-slider/library/package.json index cbda6f2af0aa7..8c35edcb2acdb 100644 --- a/packages/react-components/react-slider/library/package.json +++ b/packages/react-components/react-slider/library/package.json @@ -54,5 +54,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-slider/stories/.eslintrc.json b/packages/react-components/react-slider/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-slider/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-slider/stories/eslint.config.js b/packages/react-components/react-slider/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-slider/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-slider/stories/package.json b/packages/react-components/react-slider/stories/package.json index a84293672ae57..10d41ba5cb6a1 100644 --- a/packages/react-components/react-slider/stories/package.json +++ b/packages/react-components/react-slider/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-spinbutton/library/.eslintrc.json b/packages/react-components/react-spinbutton/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-spinbutton/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-spinbutton/library/eslint.config.js b/packages/react-components/react-spinbutton/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-spinbutton/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-spinbutton/library/jest.config.js b/packages/react-components/react-spinbutton/library/jest.config.js index 3e6c92c01b8e6..d32ed23a53497 100644 --- a/packages/react-components/react-spinbutton/library/jest.config.js +++ b/packages/react-components/react-spinbutton/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-spinbutton/library/package.json b/packages/react-components/react-spinbutton/library/package.json index d1644e238d78f..ca135e42273ec 100644 --- a/packages/react-components/react-spinbutton/library/package.json +++ b/packages/react-components/react-spinbutton/library/package.json @@ -55,5 +55,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-spinbutton/library/src/utils/precision.ts b/packages/react-components/react-spinbutton/library/src/utils/precision.ts index 83549a0d48912..d8c4ccacac1d3 100644 --- a/packages/react-components/react-spinbutton/library/src/utils/precision.ts +++ b/packages/react-components/react-spinbutton/library/src/utils/precision.ts @@ -31,6 +31,6 @@ export function calculatePrecision(value: number | string): number { * @param precision - The number of decimal places to round the number to */ export function precisionRound(value: number, precision: number, base: number = 10): number { - const exp = Math.pow(base, precision); + const exp = base ** precision; return Math.round(value * exp) / exp; } diff --git a/packages/react-components/react-spinbutton/stories/.eslintrc.json b/packages/react-components/react-spinbutton/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-spinbutton/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-spinbutton/stories/eslint.config.js b/packages/react-components/react-spinbutton/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-spinbutton/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-spinbutton/stories/package.json b/packages/react-components/react-spinbutton/stories/package.json index 6bb6c2f784c7a..c3d7e600d5e45 100644 --- a/packages/react-components/react-spinbutton/stories/package.json +++ b/packages/react-components/react-spinbutton/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-spinner/library/.eslintrc.json b/packages/react-components/react-spinner/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-spinner/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-spinner/library/eslint.config.js b/packages/react-components/react-spinner/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-spinner/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-spinner/library/jest.config.js b/packages/react-components/react-spinner/library/jest.config.js index 0f871616c785f..e065b5929bcfb 100644 --- a/packages/react-components/react-spinner/library/jest.config.js +++ b/packages/react-components/react-spinner/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-spinner/library/package.json b/packages/react-components/react-spinner/library/package.json index fcb4b96e645f4..e2177f3d911b9 100644 --- a/packages/react-components/react-spinner/library/package.json +++ b/packages/react-components/react-spinner/library/package.json @@ -52,5 +52,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-spinner/stories/.eslintrc.json b/packages/react-components/react-spinner/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-spinner/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-spinner/stories/eslint.config.js b/packages/react-components/react-spinner/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-spinner/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-spinner/stories/package.json b/packages/react-components/react-spinner/stories/package.json index 577f49f0fde3e..19533a318a1af 100644 --- a/packages/react-components/react-spinner/stories/package.json +++ b/packages/react-components/react-spinner/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-storybook-addon-export-to-sandbox/.eslintrc.json b/packages/react-components/react-storybook-addon-export-to-sandbox/.eslintrc.json deleted file mode 100644 index 4a62a51679394..0000000000000 --- a/packages/react-components/react-storybook-addon-export-to-sandbox/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node"], - "root": true, - "rules": { - "@nx/workspace-enforce-use-client": "off" - } -} diff --git a/packages/react-components/react-storybook-addon-export-to-sandbox/eslint.config.js b/packages/react-components/react-storybook-addon-export-to-sandbox/eslint.config.js new file mode 100644 index 0000000000000..106ef65601bec --- /dev/null +++ b/packages/react-components/react-storybook-addon-export-to-sandbox/eslint.config.js @@ -0,0 +1,13 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/node'], + { + rules: { + '@nx/workspace-enforce-use-client': 'off', + }, + }, +]); diff --git a/packages/react-components/react-storybook-addon/.eslintrc.json b/packages/react-components/react-storybook-addon/.eslintrc.json deleted file mode 100644 index fd43d1d3a5301..0000000000000 --- a/packages/react-components/react-storybook-addon/.eslintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "overrides": [ - { - "files": ["*.ts", "*.tsx"], - "rules": { - "@griffel/styles-file": "off", - "@nx/workspace-enforce-use-client": "off" - } - } - ] -} diff --git a/packages/react-components/react-storybook-addon/eslint.config.js b/packages/react-components/react-storybook-addon/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-storybook-addon/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-swatch-picker/library/.eslintrc.json b/packages/react-components/react-swatch-picker/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-swatch-picker/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-swatch-picker/library/eslint.config.js b/packages/react-components/react-swatch-picker/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-swatch-picker/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-swatch-picker/library/jest.config.js b/packages/react-components/react-swatch-picker/library/jest.config.js index 0e90729c7be2e..1b8aacdaa88bf 100644 --- a/packages/react-components/react-swatch-picker/library/jest.config.js +++ b/packages/react-components/react-swatch-picker/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-swatch-picker/library/package.json b/packages/react-components/react-swatch-picker/library/package.json index 3eb80a8530565..142c8c2015400 100644 --- a/packages/react-components/react-swatch-picker/library/package.json +++ b/packages/react-components/react-swatch-picker/library/package.json @@ -57,5 +57,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-swatch-picker/library/tsconfig.cy.json b/packages/react-components/react-swatch-picker/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-swatch-picker/library/tsconfig.cy.json +++ b/packages/react-components/react-swatch-picker/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-swatch-picker/stories/.eslintrc.json b/packages/react-components/react-swatch-picker/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-swatch-picker/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-swatch-picker/stories/eslint.config.js b/packages/react-components/react-swatch-picker/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-swatch-picker/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-swatch-picker/stories/package.json b/packages/react-components/react-swatch-picker/stories/package.json index 7c09755b0a660..fa45f800d8d0c 100644 --- a/packages/react-components/react-swatch-picker/stories/package.json +++ b/packages/react-components/react-swatch-picker/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-switch/library/.eslintrc.json b/packages/react-components/react-switch/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-switch/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-switch/library/eslint.config.js b/packages/react-components/react-switch/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-switch/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-switch/library/jest.config.js b/packages/react-components/react-switch/library/jest.config.js index 22b65fd50ab9a..9f9573d8ffc04 100644 --- a/packages/react-components/react-switch/library/jest.config.js +++ b/packages/react-components/react-switch/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-switch/library/package.json b/packages/react-components/react-switch/library/package.json index c58743d2ec03c..856ed3a8ee6a2 100644 --- a/packages/react-components/react-switch/library/package.json +++ b/packages/react-components/react-switch/library/package.json @@ -55,5 +55,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-switch/stories/.eslintrc.json b/packages/react-components/react-switch/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-switch/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-switch/stories/eslint.config.js b/packages/react-components/react-switch/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-switch/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-switch/stories/package.json b/packages/react-components/react-switch/stories/package.json index 28f74c06cdd92..921af297af758 100644 --- a/packages/react-components/react-switch/stories/package.json +++ b/packages/react-components/react-switch/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-table/library/.eslintrc.json b/packages/react-components/react-table/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-table/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-table/library/eslint.config.js b/packages/react-components/react-table/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-table/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-table/library/jest.config.js b/packages/react-components/react-table/library/jest.config.js index 9af0d4c3f4985..95f9f0ec20b84 100644 --- a/packages/react-components/react-table/library/jest.config.js +++ b/packages/react-components/react-table/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-table/library/package.json b/packages/react-components/react-table/library/package.json index ea811d0897ac0..8d8447cc35db3 100644 --- a/packages/react-components/react-table/library/package.json +++ b/packages/react-components/react-table/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-table/library/tsconfig.cy.json b/packages/react-components/react-table/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-table/library/tsconfig.cy.json +++ b/packages/react-components/react-table/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-table/stories/.eslintrc.json b/packages/react-components/react-table/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-table/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-table/stories/eslint.config.js b/packages/react-components/react-table/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-table/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-table/stories/package.json b/packages/react-components/react-table/stories/package.json index 9a6698e464238..0e0832221ba4a 100644 --- a/packages/react-components/react-table/stories/package.json +++ b/packages/react-components/react-table/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-tabs/library/.eslintrc.json b/packages/react-components/react-tabs/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-tabs/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-tabs/library/eslint.config.js b/packages/react-components/react-tabs/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-tabs/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-tabs/library/jest.config.js b/packages/react-components/react-tabs/library/jest.config.js index 68822c16a55bd..d00404b84637b 100644 --- a/packages/react-components/react-tabs/library/jest.config.js +++ b/packages/react-components/react-tabs/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-tabs/library/package.json b/packages/react-components/react-tabs/library/package.json index 5f85599c48997..61ad6c9b8de1a 100644 --- a/packages/react-components/react-tabs/library/package.json +++ b/packages/react-components/react-tabs/library/package.json @@ -53,5 +53,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-tabs/stories/.eslintrc.json b/packages/react-components/react-tabs/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-tabs/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-tabs/stories/eslint.config.js b/packages/react-components/react-tabs/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-tabs/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-tabs/stories/package.json b/packages/react-components/react-tabs/stories/package.json index e4ad01a0bb0c9..bb9de760f277f 100644 --- a/packages/react-components/react-tabs/stories/package.json +++ b/packages/react-components/react-tabs/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-tabster/.eslintrc.json b/packages/react-components/react-tabster/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-tabster/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-tabster/eslint.config.js b/packages/react-components/react-tabster/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-tabster/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-tag-picker/library/.eslintrc.json b/packages/react-components/react-tag-picker/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-tag-picker/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-tag-picker/library/eslint.config.js b/packages/react-components/react-tag-picker/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-tag-picker/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-tag-picker/library/jest.config.js b/packages/react-components/react-tag-picker/library/jest.config.js index b315ab22e1be2..835f817565ce1 100644 --- a/packages/react-components/react-tag-picker/library/jest.config.js +++ b/packages/react-components/react-tag-picker/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-tag-picker/library/package.json b/packages/react-components/react-tag-picker/library/package.json index faa58365d4c14..e871eb18c33e1 100644 --- a/packages/react-components/react-tag-picker/library/package.json +++ b/packages/react-components/react-tag-picker/library/package.json @@ -65,5 +65,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-tag-picker/library/tsconfig.cy.json b/packages/react-components/react-tag-picker/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-tag-picker/library/tsconfig.cy.json +++ b/packages/react-components/react-tag-picker/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-tag-picker/stories/.eslintrc.json b/packages/react-components/react-tag-picker/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-tag-picker/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-tag-picker/stories/eslint.config.js b/packages/react-components/react-tag-picker/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-tag-picker/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-tag-picker/stories/package.json b/packages/react-components/react-tag-picker/stories/package.json index 65da1b23a6cbd..19dba80effe0e 100644 --- a/packages/react-components/react-tag-picker/stories/package.json +++ b/packages/react-components/react-tag-picker/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-tags/library/.eslintrc.json b/packages/react-components/react-tags/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-tags/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-tags/library/eslint.config.js b/packages/react-components/react-tags/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-tags/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-tags/library/jest.config.js b/packages/react-components/react-tags/library/jest.config.js index 48f5a22a59a58..9612f74c2b94f 100644 --- a/packages/react-components/react-tags/library/jest.config.js +++ b/packages/react-components/react-tags/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-tags/library/package.json b/packages/react-components/react-tags/library/package.json index 06457e15c8d96..91190ee819053 100644 --- a/packages/react-components/react-tags/library/package.json +++ b/packages/react-components/react-tags/library/package.json @@ -58,5 +58,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-tags/library/tsconfig.cy.json b/packages/react-components/react-tags/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-tags/library/tsconfig.cy.json +++ b/packages/react-components/react-tags/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-tags/stories/.eslintrc.json b/packages/react-components/react-tags/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-tags/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-tags/stories/eslint.config.js b/packages/react-components/react-tags/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-tags/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-tags/stories/package.json b/packages/react-components/react-tags/stories/package.json index 1bffdab22029a..af7368d22d0f0 100644 --- a/packages/react-components/react-tags/stories/package.json +++ b/packages/react-components/react-tags/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-teaching-popover/library/.eslintrc.json b/packages/react-components/react-teaching-popover/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-teaching-popover/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-teaching-popover/library/eslint.config.js b/packages/react-components/react-teaching-popover/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-teaching-popover/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-teaching-popover/library/jest.config.js b/packages/react-components/react-teaching-popover/library/jest.config.js index a08aeefa78112..5671478182413 100644 --- a/packages/react-components/react-teaching-popover/library/jest.config.js +++ b/packages/react-components/react-teaching-popover/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-teaching-popover/library/package.json b/packages/react-components/react-teaching-popover/library/package.json index e7fc733904d82..b0697b5d8f679 100644 --- a/packages/react-components/react-teaching-popover/library/package.json +++ b/packages/react-components/react-teaching-popover/library/package.json @@ -58,5 +58,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-teaching-popover/stories/.eslintrc.json b/packages/react-components/react-teaching-popover/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-teaching-popover/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-teaching-popover/stories/eslint.config.js b/packages/react-components/react-teaching-popover/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-teaching-popover/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-teaching-popover/stories/package.json b/packages/react-components/react-teaching-popover/stories/package.json index c128340396400..cc92a4415cf7b 100644 --- a/packages/react-components/react-teaching-popover/stories/package.json +++ b/packages/react-components/react-teaching-popover/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-text/library/.eslintrc.json b/packages/react-components/react-text/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-text/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-text/library/eslint.config.js b/packages/react-components/react-text/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-text/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-text/library/jest.config.js b/packages/react-components/react-text/library/jest.config.js index 695bb6aa25dd9..e73d4265e4992 100644 --- a/packages/react-components/react-text/library/jest.config.js +++ b/packages/react-components/react-text/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-text/library/package.json b/packages/react-components/react-text/library/package.json index 074f265ce9867..b7a3151795926 100644 --- a/packages/react-components/react-text/library/package.json +++ b/packages/react-components/react-text/library/package.json @@ -51,5 +51,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-text/stories/.eslintrc.json b/packages/react-components/react-text/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-text/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-text/stories/eslint.config.js b/packages/react-components/react-text/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-text/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-text/stories/package.json b/packages/react-components/react-text/stories/package.json index 5aa8a4ec38463..4df9e974d3954 100644 --- a/packages/react-components/react-text/stories/package.json +++ b/packages/react-components/react-text/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-textarea/library/.eslintrc.json b/packages/react-components/react-textarea/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-textarea/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-textarea/library/eslint.config.js b/packages/react-components/react-textarea/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-textarea/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-textarea/library/jest.config.js b/packages/react-components/react-textarea/library/jest.config.js index aa8f59406eb48..14df2052b17d0 100644 --- a/packages/react-components/react-textarea/library/jest.config.js +++ b/packages/react-components/react-textarea/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-textarea/library/package.json b/packages/react-components/react-textarea/library/package.json index b33ea3b16fcca..2862e5c21a4c5 100644 --- a/packages/react-components/react-textarea/library/package.json +++ b/packages/react-components/react-textarea/library/package.json @@ -52,5 +52,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-textarea/stories/.eslintrc.json b/packages/react-components/react-textarea/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-textarea/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-textarea/stories/eslint.config.js b/packages/react-components/react-textarea/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-textarea/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-textarea/stories/package.json b/packages/react-components/react-textarea/stories/package.json index 7962fcfe12cd7..00fb8e4c3aac1 100644 --- a/packages/react-components/react-textarea/stories/package.json +++ b/packages/react-components/react-textarea/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-theme-sass/.eslintrc.json b/packages/react-components/react-theme-sass/.eslintrc.json deleted file mode 100644 index 24ece4e08168b..0000000000000 --- a/packages/react-components/react-theme-sass/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/node"], - "root": true -} diff --git a/packages/react-components/react-theme-sass/eslint.config.js b/packages/react-components/react-theme-sass/eslint.config.js new file mode 100644 index 0000000000000..6784113bd60a6 --- /dev/null +++ b/packages/react-components/react-theme-sass/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/node']]; diff --git a/packages/react-components/react-theme/library/.eslintrc.json b/packages/react-components/react-theme/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-theme/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-theme/library/eslint.config.js b/packages/react-components/react-theme/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-theme/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-theme/library/jest.config.js b/packages/react-components/react-theme/library/jest.config.js index 3dfaedadb6825..2bda2afc9b5c7 100644 --- a/packages/react-components/react-theme/library/jest.config.js +++ b/packages/react-components/react-theme/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-theme/library/package.json b/packages/react-components/react-theme/library/package.json index dcfdcd0f8b103..0f449c481daf1 100644 --- a/packages/react-components/react-theme/library/package.json +++ b/packages/react-components/react-theme/library/package.json @@ -39,5 +39,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-theme/stories/.eslintrc.json b/packages/react-components/react-theme/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-theme/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-theme/stories/eslint.config.js b/packages/react-components/react-theme/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-theme/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-theme/stories/package.json b/packages/react-components/react-theme/stories/package.json index 4b6de0eedb556..5e69d0ef66c64 100644 --- a/packages/react-components/react-theme/stories/package.json +++ b/packages/react-components/react-theme/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-timepicker-compat/library/.eslintrc.json b/packages/react-components/react-timepicker-compat/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-timepicker-compat/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-timepicker-compat/library/eslint.config.js b/packages/react-components/react-timepicker-compat/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-timepicker-compat/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-timepicker-compat/library/jest.config.js b/packages/react-components/react-timepicker-compat/library/jest.config.js index f95844785fa1f..076a9590eb6cb 100644 --- a/packages/react-components/react-timepicker-compat/library/jest.config.js +++ b/packages/react-components/react-timepicker-compat/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-timepicker-compat/library/package.json b/packages/react-components/react-timepicker-compat/library/package.json index 785f91e297111..a86cda80b46f7 100644 --- a/packages/react-components/react-timepicker-compat/library/package.json +++ b/packages/react-components/react-timepicker-compat/library/package.json @@ -57,5 +57,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json b/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json index ea5b8b7ac296d..a8b19a9efb91d 100644 --- a/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json +++ b/packages/react-components/react-timepicker-compat/library/tsconfig.cy.json @@ -4,8 +4,7 @@ "isolatedModules": false, "types": ["node", "cypress", "cypress-real-events"], "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], - "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-timepicker-compat/stories/.eslintrc.json b/packages/react-components/react-timepicker-compat/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-timepicker-compat/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-timepicker-compat/stories/eslint.config.js b/packages/react-components/react-timepicker-compat/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-timepicker-compat/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-timepicker-compat/stories/package.json b/packages/react-components/react-timepicker-compat/stories/package.json index 9ce3097bd7306..aac41345f1e2e 100644 --- a/packages/react-components/react-timepicker-compat/stories/package.json +++ b/packages/react-components/react-timepicker-compat/stories/package.json @@ -10,5 +10,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-toast/library/.eslintrc.json b/packages/react-components/react-toast/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-toast/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-toast/library/eslint.config.js b/packages/react-components/react-toast/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-toast/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-toast/library/jest.config.js b/packages/react-components/react-toast/library/jest.config.js index 737d10db08c03..949b4221b82ef 100644 --- a/packages/react-components/react-toast/library/jest.config.js +++ b/packages/react-components/react-toast/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-toast/library/package.json b/packages/react-components/react-toast/library/package.json index 725a5527df7f3..229f3eac41f43 100644 --- a/packages/react-components/react-toast/library/package.json +++ b/packages/react-components/react-toast/library/package.json @@ -60,5 +60,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-toast/library/tsconfig.cy.json b/packages/react-components/react-toast/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-toast/library/tsconfig.cy.json +++ b/packages/react-components/react-toast/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-toast/stories/.eslintrc.json b/packages/react-components/react-toast/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-toast/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-toast/stories/eslint.config.js b/packages/react-components/react-toast/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-toast/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-toast/stories/package.json b/packages/react-components/react-toast/stories/package.json index f93562bfad98e..d4ad343b2c186 100644 --- a/packages/react-components/react-toast/stories/package.json +++ b/packages/react-components/react-toast/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-toolbar/library/.eslintrc.json b/packages/react-components/react-toolbar/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-toolbar/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-toolbar/library/eslint.config.js b/packages/react-components/react-toolbar/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-toolbar/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-toolbar/library/jest.config.js b/packages/react-components/react-toolbar/library/jest.config.js index 6f55a34c260cd..6945312f6b295 100644 --- a/packages/react-components/react-toolbar/library/jest.config.js +++ b/packages/react-components/react-toolbar/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-toolbar/library/package.json b/packages/react-components/react-toolbar/library/package.json index d1c3a746b9ceb..af966d025b408 100644 --- a/packages/react-components/react-toolbar/library/package.json +++ b/packages/react-components/react-toolbar/library/package.json @@ -58,5 +58,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-toolbar/library/tsconfig.cy.json b/packages/react-components/react-toolbar/library/tsconfig.cy.json index 3cfb39a1086ac..a8b19a9efb91d 100644 --- a/packages/react-components/react-toolbar/library/tsconfig.cy.json +++ b/packages/react-components/react-toolbar/library/tsconfig.cy.json @@ -6,5 +6,5 @@ "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"], "lib": ["ES2019", "dom"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-toolbar/stories/.eslintrc.json b/packages/react-components/react-toolbar/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-toolbar/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-toolbar/stories/eslint.config.js b/packages/react-components/react-toolbar/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-toolbar/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-toolbar/stories/package.json b/packages/react-components/react-toolbar/stories/package.json index e7fb24c817637..1d3055e261c63 100644 --- a/packages/react-components/react-toolbar/stories/package.json +++ b/packages/react-components/react-toolbar/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-tooltip/library/.eslintrc.json b/packages/react-components/react-tooltip/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-tooltip/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-tooltip/library/eslint.config.js b/packages/react-components/react-tooltip/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-tooltip/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-tooltip/library/jest.config.js b/packages/react-components/react-tooltip/library/jest.config.js index 2e1fce8af76dd..b3e1cc006957e 100644 --- a/packages/react-components/react-tooltip/library/jest.config.js +++ b/packages/react-components/react-tooltip/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-tooltip/library/package.json b/packages/react-components/react-tooltip/library/package.json index 60ab88749eed5..52226a30bc7ee 100644 --- a/packages/react-components/react-tooltip/library/package.json +++ b/packages/react-components/react-tooltip/library/package.json @@ -55,5 +55,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-tooltip/stories/.eslintrc.json b/packages/react-components/react-tooltip/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-tooltip/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-tooltip/stories/eslint.config.js b/packages/react-components/react-tooltip/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-tooltip/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-tooltip/stories/package.json b/packages/react-components/react-tooltip/stories/package.json index bee5a52f8e701..d5945bd354c66 100644 --- a/packages/react-components/react-tooltip/stories/package.json +++ b/packages/react-components/react-tooltip/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-tree/library/.eslintrc.json b/packages/react-components/react-tree/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-tree/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-tree/library/eslint.config.js b/packages/react-components/react-tree/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-tree/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-tree/library/jest.config.js b/packages/react-components/react-tree/library/jest.config.js index 6bc2ce169094f..c4e3d48f40661 100644 --- a/packages/react-components/react-tree/library/jest.config.js +++ b/packages/react-components/react-tree/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-tree/library/package.json b/packages/react-components/react-tree/library/package.json index 8875a3fdae681..195e63c90a9a0 100644 --- a/packages/react-components/react-tree/library/package.json +++ b/packages/react-components/react-tree/library/package.json @@ -64,5 +64,8 @@ "dist/*.d.ts", "lib", "lib-commonjs" - ] + ], + "scripts": { + "lint": "eslint ." + } } diff --git a/packages/react-components/react-tree/library/tsconfig.cy.json b/packages/react-components/react-tree/library/tsconfig.cy.json index 90e0e0c7bd6ec..79b2cd86f1fef 100644 --- a/packages/react-components/react-tree/library/tsconfig.cy.json +++ b/packages/react-components/react-tree/library/tsconfig.cy.json @@ -5,5 +5,5 @@ "types": ["node", "cypress", "cypress-real-events"], "typeRoots": ["../../../../node_modules", "../../../../node_modules/@types"] }, - "include": ["**/*.cy.ts", "**/*.cy.tsx"] + "include": ["**/*.cy.ts", "**/*.cy.tsx", "cypress.config.ts"] } diff --git a/packages/react-components/react-tree/stories/.eslintrc.json b/packages/react-components/react-tree/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-tree/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-tree/stories/eslint.config.js b/packages/react-components/react-tree/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-tree/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-tree/stories/package.json b/packages/react-components/react-tree/stories/package.json index e8b7305da4beb..f25dbb08bb617 100644 --- a/packages/react-components/react-tree/stories/package.json +++ b/packages/react-components/react-tree/stories/package.json @@ -8,5 +8,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-utilities-compat/library/.eslintrc.json b/packages/react-components/react-utilities-compat/library/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-utilities-compat/library/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-utilities-compat/library/eslint.config.js b/packages/react-components/react-utilities-compat/library/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-utilities-compat/library/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/react-utilities-compat/library/jest.config.js b/packages/react-components/react-utilities-compat/library/jest.config.js index 9158bb9620eb9..51fdd2dff8b5d 100644 --- a/packages/react-components/react-utilities-compat/library/jest.config.js +++ b/packages/react-components/react-utilities-compat/library/jest.config.js @@ -1,6 +1,4 @@ // @ts-check -/* eslint-disable */ - const { readFileSync } = require('node:fs'); const { join } = require('node:path'); diff --git a/packages/react-components/react-utilities-compat/library/package.json b/packages/react-components/react-utilities-compat/library/package.json index d6cf332407921..29a0e8991744d 100644 --- a/packages/react-components/react-utilities-compat/library/package.json +++ b/packages/react-components/react-utilities-compat/library/package.json @@ -52,5 +52,8 @@ "major", "prerelease" ] + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-utilities-compat/stories/.eslintrc.json b/packages/react-components/react-utilities-compat/stories/.eslintrc.json deleted file mode 100644 index a41120835dcc9..0000000000000 --- a/packages/react-components/react-utilities-compat/stories/.eslintrc.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "import/no-extraneous-dependencies": [ - "error", - { - "packageDir": [".", "../../../../"] - } - ] - } -} diff --git a/packages/react-components/react-utilities-compat/stories/eslint.config.js b/packages/react-components/react-utilities-compat/stories/eslint.config.js new file mode 100644 index 0000000000000..0f46bd94e8730 --- /dev/null +++ b/packages/react-components/react-utilities-compat/stories/eslint.config.js @@ -0,0 +1,18 @@ +// @ts-check + +const { defineConfig } = require('eslint/config'); +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = defineConfig([ + ...fluentPlugin.configs['flat/react'], + { + rules: { + 'import/no-extraneous-dependencies': [ + 'error', + { + packageDir: ['.', '../../../../'], + }, + ], + }, + }, +]); diff --git a/packages/react-components/react-utilities-compat/stories/package.json b/packages/react-components/react-utilities-compat/stories/package.json index e5f2ac0df07d8..733d06e9827ad 100644 --- a/packages/react-components/react-utilities-compat/stories/package.json +++ b/packages/react-components/react-utilities-compat/stories/package.json @@ -7,5 +7,8 @@ "@fluentui/react-storybook-addon-export-to-sandbox": "*", "@fluentui/scripts-storybook": "*", "@fluentui/eslint-plugin": "*" + }, + "scripts": { + "lint": "eslint ." } } diff --git a/packages/react-components/react-utilities/.eslintrc.json b/packages/react-components/react-utilities/.eslintrc.json deleted file mode 100644 index ceea884c70dcc..0000000000000 --- a/packages/react-components/react-utilities/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true -} diff --git a/packages/react-components/react-utilities/eslint.config.js b/packages/react-components/react-utilities/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/react-utilities/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/recipes/.eslintrc.json b/packages/react-components/recipes/.eslintrc.json deleted file mode 100644 index bece18e69e216..0000000000000 --- a/packages/react-components/recipes/.eslintrc.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "@nx/workspace-enforce-use-client": "off" - } -} diff --git a/packages/react-components/recipes/eslint.config.js b/packages/react-components/recipes/eslint.config.js new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/recipes/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']]; diff --git a/packages/react-components/theme-designer/.eslintrc.json b/packages/react-components/theme-designer/.eslintrc.json deleted file mode 100644 index 50ad2d2abfe58..0000000000000 --- a/packages/react-components/theme-designer/.eslintrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": ["plugin:@fluentui/eslint-plugin/react"], - "root": true, - "rules": { - "@griffel/styles-file": "off", - "@nx/workspace-no-restricted-globals": "off", - "@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 new file mode 100644 index 0000000000000..ec2e7cb1fc479 --- /dev/null +++ b/packages/react-components/theme-designer/eslint.config.js @@ -0,0 +1,5 @@ +// @ts-check + +const fluentPlugin = require('@fluentui/eslint-plugin'); + +module.exports = [...fluentPlugin.configs['flat/react']];