From c7a126ef42cd83def5c68058fb677e5c71b4d382 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Thu, 1 Oct 2026 08:45:50 -0400 Subject: [PATCH 1/3] build: enforce single-block imports Gutenberg dropped the dependency group comments and blank lines between imports; align with its ESLint configuration. Co-Authored-By: Claude Opus 5.5 --- eslint.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/eslint.config.js b/eslint.config.js index db3d64726..75e734d03 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -43,6 +43,22 @@ export default defineConfig( [ 'react-refresh': reactRefresh, }, rules: { + // Imports form one contiguous block, aligned with the upstream + // Gutenberg ESLint configuration. + '@wordpress/dependency-group': [ 'error', 'never' ], + 'import/order': [ + 'error', + { + groups: [ + 'builtin', + 'external', + 'internal', + [ 'parent', 'sibling', 'index' ], + ], + 'newlines-between': 'never', + warnOnUnassignedImports: true, + }, + ], 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, From 55f3b94f6d579e747eda3a872830b97772155ebc Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Thu, 1 Oct 2026 08:45:59 -0400 Subject: [PATCH 2/3] test: hoist late import in upload middleware test Vitest hoists `vi.mock` calls, so the import need not follow them. Keeping imports contiguous prevents the import/order fixer from collapsing the blank lines around the mocks. Co-Authored-By: Claude Opus 5.5 --- src/utils/api-fetch-upload-middleware.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/api-fetch-upload-middleware.test.js b/src/utils/api-fetch-upload-middleware.test.js index 21a75a14e..a6a84fd13 100644 --- a/src/utils/api-fetch-upload-middleware.test.js +++ b/src/utils/api-fetch-upload-middleware.test.js @@ -7,6 +7,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; * Internal dependencies */ import { nativeMediaUploadMiddleware } from './api-fetch'; +import { getGBKit } from './bridge'; // Mock dependencies vi.mock( './bridge', () => ( { @@ -18,8 +19,6 @@ vi.mock( './logger', () => ( { error: vi.fn(), } ) ); -import { getGBKit } from './bridge'; - function makeNext() { return vi.fn( () => Promise.resolve( { passthrough: true } ) ); } From 8d286eb30567fa43fce064b0796da98e8d29adc5 Mon Sep 17 00:00:00 2001 From: David Calhoun Date: Thu, 1 Oct 2026 08:47:03 -0400 Subject: [PATCH 3/3] style: remove import group comments and separators Generated by `make lint-web-fix` under the new import rules, plus one manual blank-line removal the fixer could not apply. Co-Authored-By: Claude Opus 5.5 --- .github/scripts/android-toolchain-sync.js | 4 ---- bin/check-wordpress-package-duplicates.js | 8 -------- bin/fetch-translations.js | 7 ------- bin/generate-version.js | 8 -------- e2e/audio-upload.spec.js | 7 ------- e2e/block-reorder.spec.js | 7 ------- e2e/buttons-block.spec.js | 7 ------- e2e/color-gradient.spec.js | 7 ------- e2e/cover-block.spec.js | 7 ------- e2e/editor-content-changed.spec.js | 7 ------- e2e/editor-error.spec.js | 7 ------- e2e/editor-load.spec.js | 7 ------- e2e/editor-page.js | 4 ---- e2e/editor-title.spec.js | 7 ------- e2e/embed-content.spec.js | 7 ------- e2e/fetch-json.test.js | 7 ------- e2e/file-upload.spec.js | 7 ------- e2e/gallery-block.spec.js | 7 ------- e2e/get-title-and-content.spec.js | 7 ------- e2e/image-upload.spec.js | 7 ------- e2e/link-formatting.spec.js | 7 ------- e2e/shortcode-block.spec.js | 7 ------- e2e/split-merge.spec.js | 7 ------- e2e/text-alignment.spec.js | 7 ------- e2e/text-formatting.spec.js | 7 ------- e2e/third-party-blocks.spec.js | 7 ------- e2e/video-upload.spec.js | 7 ------- e2e/wp-env-fixtures.js | 7 ------- eslint.config.js | 3 --- playwright.config.js | 3 --- src/components/default-block-appender/index.jsx | 7 ------- src/components/editor-error-boundary/index.jsx | 7 ------- src/components/editor-error-boundary/index.test.jsx | 11 ----------- src/components/editor-load-error/index.jsx | 7 ------- src/components/editor-load-notice/index.jsx | 3 --- src/components/editor-load-notice/index.test.jsx | 7 ------- src/components/editor-toolbar/index.jsx | 7 ------- .../editor-toolbar/test/aria-helper.test.js | 7 ------- src/components/editor-toolbar/use-modalize.js | 7 ------- .../editor-toolbar/use-scroll-indicators.test.js | 7 ------- src/components/editor/index.jsx | 7 ------- src/components/editor/test/use-editor-ready.test.jsx | 11 ----------- src/components/editor/test/use-host-bridge.test.jsx | 9 +-------- src/components/editor/test/use-media-upload.test.jsx | 9 +-------- .../editor/test/use-modal-dialog-state.test.jsx | 7 ------- src/components/editor/use-at-autocompleter.js | 7 ------- src/components/editor/use-dev-mode-notice.js | 7 ------- src/components/editor/use-editor-ready.js | 7 ------- src/components/editor/use-editor-setup.js | 7 ------- src/components/editor/use-host-bridge.js | 7 ------- src/components/editor/use-host-exception-logging.js | 7 ------- src/components/editor/use-media-upload.js | 7 ------- src/components/editor/use-modal-dialog-state.js | 7 ------- src/components/editor/use-plus-autocompleter.js | 7 ------- src/components/editor/use-sync-featured-image.js | 7 ------- src/components/editor/use-sync-history-controls.js | 7 ------- src/components/layout/index.jsx | 7 ------- src/components/native-inserter/index.jsx | 11 ----------- src/components/offline-indicator/index.jsx | 7 ------- src/components/offline-indicator/index.test.jsx | 7 ------- src/components/popover-slots/index.jsx | 7 ------- src/components/text-editor/index.jsx | 7 ------- src/components/visual-editor/index.jsx | 11 ----------- src/components/visual-editor/use-editor-styles.js | 3 --- src/index.js | 3 --- src/lock-unlock.js | 3 --- src/utils/ajax.js | 3 --- src/utils/ajax.test.js | 7 ------- src/utils/api-fetch-root-url.test.js | 11 ----------- src/utils/api-fetch-upload-middleware.test.js | 7 ------- src/utils/api-fetch.js | 7 ------- src/utils/api-fetch.test.js | 11 ----------- src/utils/blocks.js | 3 --- src/utils/blocks.test.js | 7 ------- src/utils/bridge.js | 3 --- src/utils/bridge.test.js | 7 ------- src/utils/editor-environment.js | 3 --- src/utils/editor-environment.test.js | 7 ------- src/utils/editor-loader.js | 3 --- src/utils/editor-settings.js | 7 ------- src/utils/editor-styles.js | 4 ---- src/utils/editor-styles.test.js | 7 ------- src/utils/editor.jsx | 5 +---- src/utils/editor.test.jsx | 7 ------- src/utils/exception-parser.js | 3 --- src/utils/fetch-interceptor.js | 3 --- src/utils/fetch-interceptor.test.js | 7 ------- src/utils/global-error-handler.js | 3 --- src/utils/localization.js | 7 ------- src/utils/localization.test.js | 11 ----------- src/utils/logger.js | 3 --- src/utils/url.test.js | 7 ------- src/utils/videopress-bridge.js | 3 --- src/utils/wordpress-globals.js | 7 ------- src/utils/wordpress-i18n.js | 3 --- vite.config.js | 7 ------- vitest.config.js | 3 --- vitest.setup.js | 3 --- 98 files changed, 3 insertions(+), 630 deletions(-) diff --git a/.github/scripts/android-toolchain-sync.js b/.github/scripts/android-toolchain-sync.js index b58706b1d..393108eab 100644 --- a/.github/scripts/android-toolchain-sync.js +++ b/.github/scripts/android-toolchain-sync.js @@ -3,10 +3,6 @@ * reconciles a single tracking issue. Run by * `.github/workflows/android-toolchain-sync.yml`. */ - -/** - * External dependencies - */ import { readFile } from 'fs/promises'; const UPSTREAM = 'wordpress-mobile/WordPress-Android'; diff --git a/bin/check-wordpress-package-duplicates.js b/bin/check-wordpress-package-duplicates.js index cfacaf742..5cdb29bfb 100644 --- a/bin/check-wordpress-package-duplicates.js +++ b/bin/check-wordpress-package-duplicates.js @@ -17,17 +17,9 @@ * install paths distinguish separate copies of the same version, which are * still separate module instances. */ - -/** - * External dependencies - */ import { readFileSync } from 'fs'; import { dirname, join } from 'path'; import { fileURLToPath } from 'url'; - -/** - * Internal dependencies - */ import { error, info, warn } from '../src/utils/logger.js'; const rootDir = join( dirname( fileURLToPath( import.meta.url ) ), '..' ); diff --git a/bin/fetch-translations.js b/bin/fetch-translations.js index 05c1e7c5d..36caaf710 100644 --- a/bin/fetch-translations.js +++ b/bin/fetch-translations.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import fs from 'fs'; import path from 'path'; - -/** - * Internal dependencies - */ import { info, error, debug } from '../src/utils/logger.js'; // Uses Node's built-in `fetch` (Node 20, per .nvmrc) so this script can diff --git a/bin/generate-version.js b/bin/generate-version.js index c50ef18f7..0a067907d 100755 --- a/bin/generate-version.js +++ b/bin/generate-version.js @@ -4,17 +4,9 @@ * Generate version files for iOS and Android from package.json * This ensures a single source of truth for the version number */ - -/** - * External dependencies - */ import { readFileSync, writeFileSync } from 'fs'; import { fileURLToPath } from 'url'; import { dirname, join } from 'path'; - -/** - * Internal dependencies - */ import { info } from '../src/utils/logger.js'; const __filename = fileURLToPath( import.meta.url ); diff --git a/e2e/audio-upload.spec.js b/e2e/audio-upload.spec.js index 0a2897e6e..0d2f9a912 100644 --- a/e2e/audio-upload.spec.js +++ b/e2e/audio-upload.spec.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import path from 'node:path'; import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; import { uploadsPathPattern } from './wp-env-fixtures'; diff --git a/e2e/block-reorder.spec.js b/e2e/block-reorder.spec.js index 502f7093f..988c7197b 100644 --- a/e2e/block-reorder.spec.js +++ b/e2e/block-reorder.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Block Reorder', () => { diff --git a/e2e/buttons-block.spec.js b/e2e/buttons-block.spec.js index 99075ec10..f4cda30b2 100644 --- a/e2e/buttons-block.spec.js +++ b/e2e/buttons-block.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Buttons Block', () => { diff --git a/e2e/color-gradient.spec.js b/e2e/color-gradient.spec.js index b882ee98c..ceea27c80 100644 --- a/e2e/color-gradient.spec.js +++ b/e2e/color-gradient.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Color and Gradient', () => { diff --git a/e2e/cover-block.spec.js b/e2e/cover-block.spec.js index a5967c1c8..4c4011fb6 100644 --- a/e2e/cover-block.spec.js +++ b/e2e/cover-block.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Cover Block', () => { diff --git a/e2e/editor-content-changed.spec.js b/e2e/editor-content-changed.spec.js index cfd8b8211..82210086f 100644 --- a/e2e/editor-content-changed.spec.js +++ b/e2e/editor-content-changed.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'onEditorContentChanged', () => { diff --git a/e2e/editor-error.spec.js b/e2e/editor-error.spec.js index 8b947b6db..727c9e28f 100644 --- a/e2e/editor-error.spec.js +++ b/e2e/editor-error.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Editor Error Handling', () => { diff --git a/e2e/editor-load.spec.js b/e2e/editor-load.spec.js index e4227b066..0978fe65a 100644 --- a/e2e/editor-load.spec.js +++ b/e2e/editor-load.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Editor Load', () => { diff --git a/e2e/editor-page.js b/e2e/editor-page.js index 1b666e8ca..d19027f8b 100644 --- a/e2e/editor-page.js +++ b/e2e/editor-page.js @@ -4,10 +4,6 @@ * Encapsulates common editor interactions — setup, block appending, * caret movement, and data-store queries — behind a single class. */ - -/** - * Internal dependencies - */ import { credentials, getEditorSettings, diff --git a/e2e/editor-title.spec.js b/e2e/editor-title.spec.js index 37db81e1a..cbd089b0f 100644 --- a/e2e/editor-title.spec.js +++ b/e2e/editor-title.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Editor Title', () => { diff --git a/e2e/embed-content.spec.js b/e2e/embed-content.spec.js index 50be323e7..adb56fe09 100644 --- a/e2e/embed-content.spec.js +++ b/e2e/embed-content.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; import { credentials } from './wp-env-fixtures'; diff --git a/e2e/fetch-json.test.js b/e2e/fetch-json.test.js index 12b683c81..d990a545a 100644 --- a/e2e/fetch-json.test.js +++ b/e2e/fetch-json.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; - -/** - * Internal dependencies - */ import { fetchJson } from './fetch-json'; const CREDS = { authHeader: 'Basic dGVzdDp0ZXN0' }; diff --git a/e2e/file-upload.spec.js b/e2e/file-upload.spec.js index bc5af00c6..7ebf7d9e4 100644 --- a/e2e/file-upload.spec.js +++ b/e2e/file-upload.spec.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import path from 'node:path'; import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; import { uploadsPathPattern } from './wp-env-fixtures'; diff --git a/e2e/gallery-block.spec.js b/e2e/gallery-block.spec.js index 78b7bf587..1531b48a8 100644 --- a/e2e/gallery-block.spec.js +++ b/e2e/gallery-block.spec.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import path from 'node:path'; import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; const TEST_IMAGE_1 = path.resolve( diff --git a/e2e/get-title-and-content.spec.js b/e2e/get-title-and-content.spec.js index 8ca9b47bf..0899d990e 100644 --- a/e2e/get-title-and-content.spec.js +++ b/e2e/get-title-and-content.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'getTitleAndContent', () => { diff --git a/e2e/image-upload.spec.js b/e2e/image-upload.spec.js index cee423449..3b64fd263 100644 --- a/e2e/image-upload.spec.js +++ b/e2e/image-upload.spec.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import path from 'node:path'; import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; import { uploadsPathPattern } from './wp-env-fixtures'; diff --git a/e2e/link-formatting.spec.js b/e2e/link-formatting.spec.js index d7d4d621e..fb163faae 100644 --- a/e2e/link-formatting.spec.js +++ b/e2e/link-formatting.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Link Formatting', () => { diff --git a/e2e/shortcode-block.spec.js b/e2e/shortcode-block.spec.js index d3127bd2f..31a720057 100644 --- a/e2e/shortcode-block.spec.js +++ b/e2e/shortcode-block.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Shortcode Block', () => { diff --git a/e2e/split-merge.spec.js b/e2e/split-merge.spec.js index 7b8e145b6..bb3443ff8 100644 --- a/e2e/split-merge.spec.js +++ b/e2e/split-merge.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; /** diff --git a/e2e/text-alignment.spec.js b/e2e/text-alignment.spec.js index e2cfb3645..8425237c0 100644 --- a/e2e/text-alignment.spec.js +++ b/e2e/text-alignment.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Text Alignment', () => { diff --git a/e2e/text-formatting.spec.js b/e2e/text-formatting.spec.js index 064a601cd..512ead6ba 100644 --- a/e2e/text-formatting.spec.js +++ b/e2e/text-formatting.spec.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; test.describe( 'Text Formatting', () => { diff --git a/e2e/third-party-blocks.spec.js b/e2e/third-party-blocks.spec.js index 11523dbda..0b6b73d90 100644 --- a/e2e/third-party-blocks.spec.js +++ b/e2e/third-party-blocks.spec.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import path from 'node:path'; import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; const TEST_IMAGE_1 = path.resolve( diff --git a/e2e/video-upload.spec.js b/e2e/video-upload.spec.js index 9d5f84d4f..effafb944 100644 --- a/e2e/video-upload.spec.js +++ b/e2e/video-upload.spec.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import path from 'node:path'; import { test, expect } from '@playwright/test'; - -/** - * Internal dependencies - */ import EditorPage from './editor-page'; import { uploadsPathPattern } from './wp-env-fixtures'; diff --git a/e2e/wp-env-fixtures.js b/e2e/wp-env-fixtures.js index e696b33e3..14d128f20 100644 --- a/e2e/wp-env-fixtures.js +++ b/e2e/wp-env-fixtures.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import fs from 'node:fs'; import path from 'node:path'; - -/** - * Internal dependencies - */ import { fetchJson } from './fetch-json'; const CREDENTIALS_PATH = path.resolve( diff --git a/eslint.config.js b/eslint.config.js index 75e734d03..1cc10a323 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,3 @@ -/** - * External dependencies - */ import { defineConfig, globalIgnores } from 'eslint/config'; import wordpress from '@wordpress/eslint-plugin'; import reactRefresh from 'eslint-plugin-react-refresh'; diff --git a/playwright.config.js b/playwright.config.js index 2bbd73886..3861ff995 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -1,6 +1,3 @@ -/** - * External dependencies - */ import { defineConfig, devices } from '@playwright/test'; const isCI = process.env.CI === 'true'; diff --git a/src/components/default-block-appender/index.jsx b/src/components/default-block-appender/index.jsx index d730fabba..4c2a359e6 100644 --- a/src/components/default-block-appender/index.jsx +++ b/src/components/default-block-appender/index.jsx @@ -1,14 +1,7 @@ -/** - * WordPress dependencies - */ import { createBlock } from '@wordpress/blocks'; import { useDispatch, useSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; import { store as blockEditorStore } from '@wordpress/block-editor'; - -/** - * Internal dependencies - */ import './style.scss'; /** diff --git a/src/components/editor-error-boundary/index.jsx b/src/components/editor-error-boundary/index.jsx index 599acd39c..c138f5860 100644 --- a/src/components/editor-error-boundary/index.jsx +++ b/src/components/editor-error-boundary/index.jsx @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { Component } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ import { editorUnavailable, logException } from '../../utils/bridge'; import { error } from '../../utils/logger'; diff --git a/src/components/editor-error-boundary/index.test.jsx b/src/components/editor-error-boundary/index.test.jsx index ca4ff720b..bf5ed452f 100644 --- a/src/components/editor-error-boundary/index.test.jsx +++ b/src/components/editor-error-boundary/index.test.jsx @@ -1,17 +1,6 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { render, screen } from '@testing-library/react'; - -/** - * WordPress dependencies - */ import { Component } from '@wordpress/element'; - -/** - * Internal dependencies - */ import EditorErrorBoundary from '.'; import { editorUnavailable, logException } from '../../utils/bridge'; diff --git a/src/components/editor-load-error/index.jsx b/src/components/editor-load-error/index.jsx index cd6b1a416..627977282 100644 --- a/src/components/editor-load-error/index.jsx +++ b/src/components/editor-load-error/index.jsx @@ -1,11 +1,4 @@ -/** - * WordPress dependencies - */ import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ import './style.scss'; /** diff --git a/src/components/editor-load-notice/index.jsx b/src/components/editor-load-notice/index.jsx index 91b0ef6bf..eaa7666bc 100644 --- a/src/components/editor-load-notice/index.jsx +++ b/src/components/editor-load-notice/index.jsx @@ -1,6 +1,3 @@ -/** - * WordPress dependencies - */ import { Notice } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { useState, useEffect } from '@wordpress/element'; diff --git a/src/components/editor-load-notice/index.test.jsx b/src/components/editor-load-notice/index.test.jsx index 35e9bb7d4..0e2aad375 100644 --- a/src/components/editor-load-notice/index.test.jsx +++ b/src/components/editor-load-notice/index.test.jsx @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { render, screen, fireEvent, act } from '@testing-library/react'; - -/** - * Internal dependencies - */ import EditorLoadNotice from '.'; vi.mock( '@wordpress/components' ); diff --git a/src/components/editor-toolbar/index.jsx b/src/components/editor-toolbar/index.jsx index d21e2d07e..5301ee721 100644 --- a/src/components/editor-toolbar/index.jsx +++ b/src/components/editor-toolbar/index.jsx @@ -1,6 +1,3 @@ -/** - * WordPress dependencies - */ import { useState, useRef } from '@wordpress/element'; import { BlockInspector, @@ -20,10 +17,6 @@ import { __ } from '@wordpress/i18n'; import { close, cog } from '@wordpress/icons'; import clsx from 'clsx'; import { store as editorStore } from '@wordpress/editor'; - -/** - * Internal dependencies - */ import './style.scss'; import { useModalize } from './use-modalize'; import { useModalDialogState } from '../editor/use-modal-dialog-state'; diff --git a/src/components/editor-toolbar/test/aria-helper.test.js b/src/components/editor-toolbar/test/aria-helper.test.js index 9f6124989..195e4ab2a 100644 --- a/src/components/editor-toolbar/test/aria-helper.test.js +++ b/src/components/editor-toolbar/test/aria-helper.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, afterEach } from 'vitest'; - -/** - * Internal dependencies - */ import { modalize, unmodalize } from '../aria-helper'; const ariaHidden = ( id ) => diff --git a/src/components/editor-toolbar/use-modalize.js b/src/components/editor-toolbar/use-modalize.js index 1f83c5863..0c86f9d11 100644 --- a/src/components/editor-toolbar/use-modalize.js +++ b/src/components/editor-toolbar/use-modalize.js @@ -1,11 +1,4 @@ -/** - * WordPress dependencies - */ import { useEffect } from '@wordpress/element'; - -/** - * Internal dependencies - */ import * as ariaHelper from './aria-helper'; import { getClipContainer, diff --git a/src/components/editor-toolbar/use-scroll-indicators.test.js b/src/components/editor-toolbar/use-scroll-indicators.test.js index 8c48432c9..6c99c6116 100644 --- a/src/components/editor-toolbar/use-scroll-indicators.test.js +++ b/src/components/editor-toolbar/use-scroll-indicators.test.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import { describe, it, expect, afterEach } from 'vitest'; import { renderHook } from '@testing-library/react'; - -/** - * Internal dependencies - */ import { useScrollIndicators } from './use-scroll-indicators'; /** diff --git a/src/components/editor/index.jsx b/src/components/editor/index.jsx index fdcf4d86c..f4c3d98ac 100644 --- a/src/components/editor/index.jsx +++ b/src/components/editor/index.jsx @@ -1,13 +1,6 @@ -/** - * WordPress dependencies - */ import { store as coreStore } from '@wordpress/core-data'; import { useSelect } from '@wordpress/data'; import { store as editorStore, EditorProvider } from '@wordpress/editor'; - -/** - * Internal dependencies - */ import VisualEditor from '../visual-editor'; import './style.scss'; import { useSyncHistoryControls } from './use-sync-history-controls'; diff --git a/src/components/editor/test/use-editor-ready.test.jsx b/src/components/editor/test/use-editor-ready.test.jsx index 82a3e7a04..a3ada2435 100644 --- a/src/components/editor/test/use-editor-ready.test.jsx +++ b/src/components/editor/test/use-editor-ready.test.jsx @@ -1,17 +1,6 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { render, renderHook } from '@testing-library/react'; - -/** - * WordPress dependencies - */ import { Component, useEffect } from '@wordpress/element'; - -/** - * Internal dependencies - */ import { useEditorReady } from '../use-editor-ready'; import { editorLoaded } from '../../../utils/bridge'; diff --git a/src/components/editor/test/use-host-bridge.test.jsx b/src/components/editor/test/use-host-bridge.test.jsx index 33d29a798..2511278f7 100644 --- a/src/components/editor/test/use-host-bridge.test.jsx +++ b/src/components/editor/test/use-host-bridge.test.jsx @@ -1,14 +1,7 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { renderHook } from '@testing-library/react'; - -/** - * Internal dependencies - */ -import { useHostBridge } from '../use-host-bridge'; import { getBlockType } from '@wordpress/blocks'; +import { useHostBridge } from '../use-host-bridge'; const mockGetEditedPostAttribute = vi.fn(); const mockGetEditedPostContent = vi.fn(); diff --git a/src/components/editor/test/use-media-upload.test.jsx b/src/components/editor/test/use-media-upload.test.jsx index 8bed64520..1bd3e7f8c 100644 --- a/src/components/editor/test/use-media-upload.test.jsx +++ b/src/components/editor/test/use-media-upload.test.jsx @@ -1,14 +1,7 @@ -/** - * WordPress dependencies - */ import { addFilter, removeFilter } from '@wordpress/hooks'; import { render, renderHook, waitFor } from '@testing-library/react'; - -/** - * Internal dependencies - */ -import { useMediaUpload } from '../use-media-upload'; import { describe, it, expect, vi, afterAll, afterEach } from 'vitest'; +import { useMediaUpload } from '../use-media-upload'; import { openMediaLibrary } from '../../../utils/bridge'; import { warn } from '../../../utils/logger'; diff --git a/src/components/editor/test/use-modal-dialog-state.test.jsx b/src/components/editor/test/use-modal-dialog-state.test.jsx index 35a3bb14e..106d77258 100644 --- a/src/components/editor/test/use-modal-dialog-state.test.jsx +++ b/src/components/editor/test/use-modal-dialog-state.test.jsx @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { renderHook } from '@testing-library/react'; - -/** - * Internal dependencies - */ import { useModalDialogState } from '../use-modal-dialog-state'; import { onModalDialogOpened, diff --git a/src/components/editor/use-at-autocompleter.js b/src/components/editor/use-at-autocompleter.js index 0df5402fa..66da9da92 100644 --- a/src/components/editor/use-at-autocompleter.js +++ b/src/components/editor/use-at-autocompleter.js @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { addFilter, removeFilter } from '@wordpress/hooks'; import { useEffect } from '@wordpress/element'; - -/** - * Internal dependencies - */ import { onAutocompleterTriggered } from '../../utils/bridge'; /** diff --git a/src/components/editor/use-dev-mode-notice.js b/src/components/editor/use-dev-mode-notice.js index 58191475f..40b76e47c 100644 --- a/src/components/editor/use-dev-mode-notice.js +++ b/src/components/editor/use-dev-mode-notice.js @@ -1,14 +1,7 @@ -/** - * WordPress dependencies - */ import { useEffect, useRef } from '@wordpress/element'; import { useDispatch } from '@wordpress/data'; import { store as noticesStore } from '@wordpress/notices'; import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ import { isDevMode } from '../../utils/dev-mode'; import { getGBKit } from '../../utils/bridge'; diff --git a/src/components/editor/use-editor-ready.js b/src/components/editor/use-editor-ready.js index 798c3a43a..975b9db91 100644 --- a/src/components/editor/use-editor-ready.js +++ b/src/components/editor/use-editor-ready.js @@ -1,11 +1,4 @@ -/** - * WordPress dependencies - */ import { useRef, useCallback, useLayoutEffect } from '@wordpress/element'; - -/** - * Internal dependencies - */ import { editorLoaded } from '../../utils/bridge'; /** diff --git a/src/components/editor/use-editor-setup.js b/src/components/editor/use-editor-setup.js index 9acf3e761..af0fa1819 100644 --- a/src/components/editor/use-editor-setup.js +++ b/src/components/editor/use-editor-setup.js @@ -1,14 +1,7 @@ -/** - * WordPress dependencies - */ import { useEffect } from '@wordpress/element'; import { useDispatch } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; import { store as editorStore } from '@wordpress/editor'; - -/** - * Internal dependencies - */ import { postTypeEntities } from '../../utils/post-type-entities'; export function useEditorSetup( post ) { diff --git a/src/components/editor/use-host-bridge.js b/src/components/editor/use-host-bridge.js index f91392f2c..a72f15ab6 100644 --- a/src/components/editor/use-host-bridge.js +++ b/src/components/editor/use-host-bridge.js @@ -1,6 +1,3 @@ -/** - * WordPress dependencies - */ import { useEffect, useCallback, useRef } from '@wordpress/element'; import { useDispatch, useSelect } from '@wordpress/data'; import { store as coreStore } from '@wordpress/core-data'; @@ -8,10 +5,6 @@ import { store as editorStore } from '@wordpress/editor'; import { parse, serialize, getBlockType } from '@wordpress/blocks'; import { store as blockEditorStore } from '@wordpress/block-editor'; import { insert, create, toHTMLString } from '@wordpress/rich-text'; - -/** - * Internal dependencies - */ import { warn } from '../../utils/logger'; window.editor = window.editor || {}; diff --git a/src/components/editor/use-host-exception-logging.js b/src/components/editor/use-host-exception-logging.js index 3ef1a99a6..80874d448 100644 --- a/src/components/editor/use-host-exception-logging.js +++ b/src/components/editor/use-host-exception-logging.js @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { useEffect } from '@wordpress/element'; import { addAction, removeAction } from '@wordpress/hooks'; - -/** - * Internal dependencies - */ import { logException } from '../../utils/bridge'; /** diff --git a/src/components/editor/use-media-upload.js b/src/components/editor/use-media-upload.js index 12c36e2e1..49c7d9723 100644 --- a/src/components/editor/use-media-upload.js +++ b/src/components/editor/use-media-upload.js @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { addFilter, removeFilter } from '@wordpress/hooks'; import { useCallback, useEffect, useRef } from '@wordpress/element'; - -/** - * Internal dependencies - */ import { openMediaLibrary } from '../../utils/bridge'; import { warn } from '../../utils/logger'; diff --git a/src/components/editor/use-modal-dialog-state.js b/src/components/editor/use-modal-dialog-state.js index 8083d8c45..ab7951286 100644 --- a/src/components/editor/use-modal-dialog-state.js +++ b/src/components/editor/use-modal-dialog-state.js @@ -1,11 +1,4 @@ -/** - * WordPress dependencies - */ import { useEffect, useRef } from '@wordpress/element'; - -/** - * Internal dependencies - */ import { onModalDialogOpened, onModalDialogClosed } from '../../utils/bridge'; /** diff --git a/src/components/editor/use-plus-autocompleter.js b/src/components/editor/use-plus-autocompleter.js index f8aa0ebd1..6f638fd39 100644 --- a/src/components/editor/use-plus-autocompleter.js +++ b/src/components/editor/use-plus-autocompleter.js @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { addFilter, removeFilter } from '@wordpress/hooks'; import { useEffect } from '@wordpress/element'; - -/** - * Internal dependencies - */ import { onAutocompleterTriggered } from '../../utils/bridge'; /** diff --git a/src/components/editor/use-sync-featured-image.js b/src/components/editor/use-sync-featured-image.js index 5c7e06aed..fbfdb7c29 100644 --- a/src/components/editor/use-sync-featured-image.js +++ b/src/components/editor/use-sync-featured-image.js @@ -1,13 +1,6 @@ -/** - * WordPress dependencies - */ import { useEffect } from '@wordpress/element'; import { useSelect } from '@wordpress/data'; import { store as editorStore } from '@wordpress/editor'; - -/** - * Internal dependencies - */ import { onEditorFeaturedImageChanged } from '../../utils/bridge'; /** diff --git a/src/components/editor/use-sync-history-controls.js b/src/components/editor/use-sync-history-controls.js index 3c18e1b09..16b78e789 100644 --- a/src/components/editor/use-sync-history-controls.js +++ b/src/components/editor/use-sync-history-controls.js @@ -1,13 +1,6 @@ -/** - * WordPress dependencies - */ import { useEffect } from '@wordpress/element'; import { useSelect } from '@wordpress/data'; import { store as editorStore } from '@wordpress/editor'; - -/** - * Internal dependencies - */ import { onEditorHistoryChanged } from '../../utils/bridge'; /** diff --git a/src/components/layout/index.jsx b/src/components/layout/index.jsx index 88105e096..42cff3a12 100644 --- a/src/components/layout/index.jsx +++ b/src/components/layout/index.jsx @@ -1,13 +1,6 @@ -/** - * WordPress dependencies - */ import { AutosaveMonitor } from '@wordpress/editor'; import { SnackbarNotices } from '@wordpress/notices'; import { SlotFillProvider } from '@wordpress/components'; - -/** - * Internal dependencies - */ import Editor from '../editor'; import EditorErrorBoundary from '../editor-error-boundary'; import { onEditorContentChanged } from '../../utils/bridge'; diff --git a/src/components/native-inserter/index.jsx b/src/components/native-inserter/index.jsx index 3025a2d6a..6d46d6787 100644 --- a/src/components/native-inserter/index.jsx +++ b/src/components/native-inserter/index.jsx @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import clsx from 'clsx'; - -/** - * WordPress dependencies - */ import { Button } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { plus } from '@wordpress/icons'; @@ -40,10 +33,6 @@ import { store as coreDataStore } from '@wordpress/core-data'; // - We're building a WordPress editor integration, not a general library import useInsertionPoint from '@wordpress/block-editor/build-module/components/inserter/hooks/use-insertion-point'; import useBlockTypesState from '@wordpress/block-editor/build-module/components/inserter/hooks/use-block-types-state'; - -/** - * Internal dependencies - */ import './style.scss'; import { debug } from '../../utils/logger'; import { diff --git a/src/components/offline-indicator/index.jsx b/src/components/offline-indicator/index.jsx index 7edb5c547..4b0957589 100644 --- a/src/components/offline-indicator/index.jsx +++ b/src/components/offline-indicator/index.jsx @@ -1,15 +1,8 @@ -/** - * WordPress dependencies - */ import { speak } from '@wordpress/a11y'; import { Icon } from '@wordpress/components'; import { useState, useEffect } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { offline } from '@wordpress/icons'; - -/** - * Internal dependencies - */ import { getGBKit } from '../../utils/bridge'; import './style.scss'; diff --git a/src/components/offline-indicator/index.test.jsx b/src/components/offline-indicator/index.test.jsx index 3752c753d..acde0aa1b 100644 --- a/src/components/offline-indicator/index.test.jsx +++ b/src/components/offline-indicator/index.test.jsx @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { render, screen, act } from '@testing-library/react'; - -/** - * Internal dependencies - */ import OfflineIndicator from '.'; vi.mock( '../../utils/bridge', () => ( { diff --git a/src/components/popover-slots/index.jsx b/src/components/popover-slots/index.jsx index 1bf187de6..60ab3a43f 100644 --- a/src/components/popover-slots/index.jsx +++ b/src/components/popover-slots/index.jsx @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { createPortal } from '@wordpress/element'; import { Popover } from '@wordpress/components'; - -/** - * Internal dependencies - */ import './style.scss'; import { OVERLAY_SLOT_NAME, diff --git a/src/components/text-editor/index.jsx b/src/components/text-editor/index.jsx index 50cd53634..ea9a73b4b 100644 --- a/src/components/text-editor/index.jsx +++ b/src/components/text-editor/index.jsx @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { forwardRef } from '@wordpress/element'; import { PostTitleRaw, PostTextEditor } from '@wordpress/editor'; - -/** - * Internal dependencies - */ import './style.scss'; /** diff --git a/src/components/visual-editor/index.jsx b/src/components/visual-editor/index.jsx index 48dd527bb..a4cb0642e 100644 --- a/src/components/visual-editor/index.jsx +++ b/src/components/visual-editor/index.jsx @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import clsx from 'clsx'; - -/** - * WordPress dependencies - */ import { forwardRef, useRef } from '@wordpress/element'; import { BlockList, @@ -26,10 +19,6 @@ import componentStylesRTL from '@wordpress/components/build-style/style-rtl.css? import blockEditorContentStylesRTL from '@wordpress/block-editor/build-style/content-rtl.css?inline'; import blocksStylesRTL from '@wordpress/block-library/build-style/style-rtl.css?inline'; import blocksEditorStylesRTL from '@wordpress/block-library/build-style/editor-rtl.css?inline'; - -/** - * Internal dependencies - */ import './style.scss'; import EditorToolbar from '../editor-toolbar'; import { useEditorStyles } from './use-editor-styles'; diff --git a/src/components/visual-editor/use-editor-styles.js b/src/components/visual-editor/use-editor-styles.js index a1604a6e1..ab4dc98f9 100644 --- a/src/components/visual-editor/use-editor-styles.js +++ b/src/components/visual-editor/use-editor-styles.js @@ -1,6 +1,3 @@ -/** - * WordPress dependencies - */ import { store as editorStore } from '@wordpress/editor'; import { useSelect } from '@wordpress/data'; import { store as editPostStore } from '@wordpress/edit-post'; diff --git a/src/index.js b/src/index.js index 5bbbc421d..4237c812d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { setUpEditorEnvironment } from './utils/editor-environment'; import './index.scss'; diff --git a/src/lock-unlock.js b/src/lock-unlock.js index 600546cdc..8f02531cb 100644 --- a/src/lock-unlock.js +++ b/src/lock-unlock.js @@ -1,6 +1,3 @@ -/** - * WordPress dependencies - */ import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis'; export const { lock, unlock } = diff --git a/src/utils/ajax.js b/src/utils/ajax.js index 1084a669b..1c923440e 100644 --- a/src/utils/ajax.js +++ b/src/utils/ajax.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { getGBKit } from './bridge'; import { warn, debug } from './logger'; import { stripTrailingSlash } from './url'; diff --git a/src/utils/ajax.test.js b/src/utils/ajax.test.js index 73d6abc04..3e272dd68 100644 --- a/src/utils/ajax.test.js +++ b/src/utils/ajax.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; - -/** - * Internal dependencies - */ import { configureAjax } from './ajax'; import * as bridge from './bridge'; import * as logger from './logger'; diff --git a/src/utils/api-fetch-root-url.test.js b/src/utils/api-fetch-root-url.test.js index bfc8dc0af..be94a7c59 100644 --- a/src/utils/api-fetch-root-url.test.js +++ b/src/utils/api-fetch-root-url.test.js @@ -1,16 +1,5 @@ -/** - * External dependencies - */ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; - -/** - * WordPress dependencies - */ import apiFetch from '@wordpress/api-fetch'; - -/** - * Internal dependencies - */ import { configureApiFetch } from './api-fetch'; import * as bridge from './bridge'; diff --git a/src/utils/api-fetch-upload-middleware.test.js b/src/utils/api-fetch-upload-middleware.test.js index a6a84fd13..3ec9ead7b 100644 --- a/src/utils/api-fetch-upload-middleware.test.js +++ b/src/utils/api-fetch-upload-middleware.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach } from 'vitest'; - -/** - * Internal dependencies - */ import { nativeMediaUploadMiddleware } from './api-fetch'; import { getGBKit } from './bridge'; diff --git a/src/utils/api-fetch.js b/src/utils/api-fetch.js index 89727e630..ce6470856 100644 --- a/src/utils/api-fetch.js +++ b/src/utils/api-fetch.js @@ -1,13 +1,6 @@ -/** - * WordPress dependencies - */ import apiFetch from '@wordpress/api-fetch'; import { getQueryArg } from '@wordpress/url'; import { __ } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ import { getGBKit, POST_FALLBACKS } from './bridge'; import { info, error as logError } from './logger'; import { ensureTrailingSlash, stripTrailingSlash } from './url'; diff --git a/src/utils/api-fetch.test.js b/src/utils/api-fetch.test.js index 2c0ead6dc..5de83e53c 100644 --- a/src/utils/api-fetch.test.js +++ b/src/utils/api-fetch.test.js @@ -1,6 +1,3 @@ -/** - * External dependencies - */ import { describe, it, @@ -10,15 +7,7 @@ import { afterEach, vi, } from 'vitest'; - -/** - * WordPress dependencies - */ import apiFetch from '@wordpress/api-fetch'; - -/** - * Internal dependencies - */ import { configureApiFetch } from './api-fetch'; import * as bridge from './bridge'; diff --git a/src/utils/blocks.js b/src/utils/blocks.js index 8a17f3087..1c4e62a9d 100644 --- a/src/utils/blocks.js +++ b/src/utils/blocks.js @@ -1,6 +1,3 @@ -/** - * WordPress dependencies - */ import { unregisterBlockType, getBlockTypes } from '@wordpress/blocks'; import { renderToString } from '@wordpress/element'; import { debug } from './logger'; diff --git a/src/utils/blocks.test.js b/src/utils/blocks.test.js index 55328387b..6a5e35b6c 100644 --- a/src/utils/blocks.test.js +++ b/src/utils/blocks.test.js @@ -1,12 +1,5 @@ -/** - * External dependencies - */ import { describe, it, expect, vi } from 'vitest'; import Ajv from 'ajv'; - -/** - * Internal dependencies - */ import { preprocessBlockTypesForNativeInserter, formatPatternsForNativeInserter, diff --git a/src/utils/bridge.js b/src/utils/bridge.js index ae2f3ac16..6b2462c8d 100644 --- a/src/utils/bridge.js +++ b/src/utils/bridge.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import parseException from './exception-parser'; import { debug, error } from './logger'; import { isDevMode } from './dev-mode'; diff --git a/src/utils/bridge.test.js b/src/utils/bridge.test.js index 4ec5ab0c0..a37fe5daf 100644 --- a/src/utils/bridge.test.js +++ b/src/utils/bridge.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; - -/** - * Internal dependencies - */ import { requestLatestContent, getGBKit, diff --git a/src/utils/editor-environment.js b/src/utils/editor-environment.js index 92737ffde..0d3ef89a9 100644 --- a/src/utils/editor-environment.js +++ b/src/utils/editor-environment.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { awaitGBKitGlobal, editorLoaded, diff --git a/src/utils/editor-environment.test.js b/src/utils/editor-environment.test.js index fc37543ef..ab4ef36b1 100644 --- a/src/utils/editor-environment.test.js +++ b/src/utils/editor-environment.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach } from 'vitest'; - -/** - * Internal dependencies - */ import { setUpEditorEnvironment } from './editor-environment'; import { awaitGBKitGlobal, diff --git a/src/utils/editor-loader.js b/src/utils/editor-loader.js index 18d4a6daf..e22e9ba99 100644 --- a/src/utils/editor-loader.js +++ b/src/utils/editor-loader.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { getGBKit } from './bridge'; import { error } from './logger'; diff --git a/src/utils/editor-settings.js b/src/utils/editor-settings.js index 03462bc02..58a48f797 100644 --- a/src/utils/editor-settings.js +++ b/src/utils/editor-settings.js @@ -1,12 +1,5 @@ -/** - * WordPress dependencies - */ import { store as editorStore } from '@wordpress/editor'; import { select } from '@wordpress/data'; - -/** - * Internal dependencies - */ import defaultEditorStyles from './default-editor-styles.scss?inline'; /** diff --git a/src/utils/editor-styles.js b/src/utils/editor-styles.js index 44f2258cd..ad7e6939e 100644 --- a/src/utils/editor-styles.js +++ b/src/utils/editor-styles.js @@ -1,13 +1,9 @@ -/** - * WordPress dependencies - */ // Default styles that are needed for the editor. import componentsStyles from '@wordpress/components/build-style/style.css?inline'; import blockEditorStyles from '@wordpress/block-editor/build-style/style.css?inline'; import blockLibraryEditorStyles from '@wordpress/block-library/build-style/editor.css?inline'; import formatLibraryStyles from '@wordpress/format-library/build-style/style.css?inline'; import editorStyles from '@wordpress/editor/build-style/style.css?inline'; - // Right-to-left counterparts, generated upstream by `rtlcss`. import componentsStylesRTL from '@wordpress/components/build-style/style-rtl.css?inline'; import blockEditorStylesRTL from '@wordpress/block-editor/build-style/style-rtl.css?inline'; diff --git a/src/utils/editor-styles.test.js b/src/utils/editor-styles.test.js index 0759f867f..f8823836f 100644 --- a/src/utils/editor-styles.test.js +++ b/src/utils/editor-styles.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, beforeEach, vi } from 'vitest'; - -/** - * Internal dependencies - */ import { injectEditorStyles } from './editor-styles'; // Vitest runs with `css: false`, so `?inline` imports resolve to empty strings diff --git a/src/utils/editor.jsx b/src/utils/editor.jsx index b6074a3b6..eaa3e10b7 100644 --- a/src/utils/editor.jsx +++ b/src/utils/editor.jsx @@ -1,12 +1,9 @@ -/** - * Internal dependencies - */ -import Layout from '../components/layout'; import { createRoot, StrictMode } from '@wordpress/element'; import { dispatch } from '@wordpress/data'; import { store as editorStore } from '@wordpress/editor'; import { store as preferencesStore } from '@wordpress/preferences'; import { registerCoreBlocks } from '@wordpress/block-library'; +import Layout from '../components/layout'; import { unregisterDisallowedBlocks } from './blocks'; import { getGBKit, getPost } from './bridge'; import { getDefaultEditorSettings } from './editor-settings'; diff --git a/src/utils/editor.test.jsx b/src/utils/editor.test.jsx index 7e7470567..0c76f35e3 100644 --- a/src/utils/editor.test.jsx +++ b/src/utils/editor.test.jsx @@ -1,13 +1,6 @@ -/** - * External dependencies - */ import { describe, it, expect, beforeEach, vi } from 'vitest'; import { dispatch } from '@wordpress/data'; import { registerCoreBlocks } from '@wordpress/block-library'; - -/** - * Internal dependencies - */ import { initializeEditor } from './editor'; import { getGBKit, getPost } from './bridge'; import { getDefaultEditorSettings } from './editor-settings'; diff --git a/src/utils/exception-parser.js b/src/utils/exception-parser.js index b5b96389d..b4d0cb204 100644 --- a/src/utils/exception-parser.js +++ b/src/utils/exception-parser.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { version as gbkVersion } from '../../package.json'; import { chromeStackParser, geckoStackParser } from './stack-parsers'; diff --git a/src/utils/fetch-interceptor.js b/src/utils/fetch-interceptor.js index 9287c8d9f..ba7021a83 100644 --- a/src/utils/fetch-interceptor.js +++ b/src/utils/fetch-interceptor.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { onNetworkRequest, getGBKit } from './bridge'; import { debug } from './logger'; diff --git a/src/utils/fetch-interceptor.test.js b/src/utils/fetch-interceptor.test.js index b431e09e6..06af02e4b 100644 --- a/src/utils/fetch-interceptor.test.js +++ b/src/utils/fetch-interceptor.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'; - -/** - * Internal dependencies - */ import { initializeFetchInterceptor } from './fetch-interceptor'; import * as bridge from './bridge'; diff --git a/src/utils/global-error-handler.js b/src/utils/global-error-handler.js index 9b38cb529..aac8e98bf 100644 --- a/src/utils/global-error-handler.js +++ b/src/utils/global-error-handler.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { logException } from './bridge'; /** diff --git a/src/utils/localization.js b/src/utils/localization.js index efae94ff5..722995c5c 100644 --- a/src/utils/localization.js +++ b/src/utils/localization.js @@ -1,11 +1,4 @@ -/** - * WordPress dependencies - */ import { setLocaleData } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ import { getGBKit } from './bridge'; import { warn, debug } from './logger'; diff --git a/src/utils/localization.test.js b/src/utils/localization.test.js index 279108e39..ceb111d8f 100644 --- a/src/utils/localization.test.js +++ b/src/utils/localization.test.js @@ -1,16 +1,5 @@ -/** - * External dependencies - */ import { describe, it, expect, vi, beforeEach } from 'vitest'; - -/** - * WordPress dependencies - */ import { setLocaleData } from '@wordpress/i18n'; - -/** - * Internal dependencies - */ import { configureLocale, isRTLLocale } from './localization'; import { getGBKit } from './bridge'; diff --git a/src/utils/logger.js b/src/utils/logger.js index 7ba89633c..0ac9920e5 100644 --- a/src/utils/logger.js +++ b/src/utils/logger.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { Platform } from './platform.js'; // Log levels in order of verbosity diff --git a/src/utils/url.test.js b/src/utils/url.test.js index 866fb95db..8341e7cf9 100644 --- a/src/utils/url.test.js +++ b/src/utils/url.test.js @@ -1,11 +1,4 @@ -/** - * External dependencies - */ import { describe, it, expect } from 'vitest'; - -/** - * Internal dependencies - */ import { ensureTrailingSlash, stripTrailingSlash } from './url'; describe( 'stripTrailingSlash', () => { diff --git a/src/utils/videopress-bridge.js b/src/utils/videopress-bridge.js index 23418c8ad..893962a1f 100644 --- a/src/utils/videopress-bridge.js +++ b/src/utils/videopress-bridge.js @@ -1,6 +1,3 @@ -/** - * Internal dependencies - */ import { warn, debug, error } from './logger'; /** diff --git a/src/utils/wordpress-globals.js b/src/utils/wordpress-globals.js index 7a3919b1f..3ac62e1bd 100644 --- a/src/utils/wordpress-globals.js +++ b/src/utils/wordpress-globals.js @@ -1,16 +1,9 @@ -/** - * External dependencies - */ import React from 'react'; import ReactDOM from 'react-dom'; import moment from 'moment'; import lodash from 'lodash'; import * as ReactJSXRuntime from 'react/jsx-runtime'; import jquery from 'jquery'; - -/** - * WordPress dependencies - */ import * as a11y from '@wordpress/a11y'; import * as apiFetch from '@wordpress/api-fetch'; import * as autop from '@wordpress/autop'; diff --git a/src/utils/wordpress-i18n.js b/src/utils/wordpress-i18n.js index 61019671d..77f20cdab 100644 --- a/src/utils/wordpress-i18n.js +++ b/src/utils/wordpress-i18n.js @@ -1,6 +1,3 @@ -/** - * WordPress dependencies - */ import * as hooks from '@wordpress/hooks'; import * as i18n from '@wordpress/i18n'; diff --git a/vite.config.js b/vite.config.js index c855406fc..f9865c6ef 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,16 +1,9 @@ -/** - * External dependencies - */ import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import MagicString from 'magic-string'; - -/** - * WordPress dependencies - */ import { defaultRequestToExternal } from '@wordpress/dependency-extraction-webpack-plugin/lib/util'; // Stub for Node.js modules imported by PostCSS via @wordpress/block-editor. diff --git a/vitest.config.js b/vitest.config.js index 1fd1b7e82..9e9a0ffdc 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -1,6 +1,3 @@ -/** - * External dependencies - */ import { defineConfig } from 'vite'; import { defaultExclude } from 'vitest/config'; import react from '@vitejs/plugin-react'; diff --git a/vitest.setup.js b/vitest.setup.js index a7664a0bf..a65e53606 100644 --- a/vitest.setup.js +++ b/vitest.setup.js @@ -1,6 +1,3 @@ -/** - * External dependencies - */ import '@testing-library/jest-dom/vitest'; import { afterEach } from 'vitest'; import { cleanup } from '@testing-library/react';