diff --git a/.eslintrc.js b/.eslintrc.js index eb5b2c6dccf20..73979dd6d637f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -132,6 +132,13 @@ module.exports = { ], }, ], + '@typescript-eslint/consistent-type-imports': [ + 'error', + { + prefer: 'type-imports', + disallowTypeAnnotations: false, + }, + ], 'no-restricted-syntax': [ 'error', // NOTE: We can't include the forward slash in our regex or diff --git a/package-lock.json b/package-lock.json index 630c7fe9a3826..90793ac27fdb4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2357,6 +2357,29 @@ } } }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true + } + } + }, + "@eslint-community/regexpp": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", + "dev": true + }, "@eslint/eslintrc": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.4.tgz", @@ -16442,58 +16465,60 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.3.0.tgz", - "integrity": "sha512-ARUEJHJrq85aaiCqez7SANeahDsJTD3AEua34EoQN9pHS6S5Bq9emcIaGGySt/4X2zSi+vF5hAH52sEen7IO7g==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.3.0", - "@typescript-eslint/scope-manager": "5.3.0", - "debug": "^4.3.2", - "functional-red-black-tree": "^1.0.1", - "ignore": "^5.1.8", - "regexpp": "^3.2.0", - "semver": "^7.3.5", + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "dependencies": { + "@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true + }, + "@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true + }, + "@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + } + }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "@typescript-eslint/experimental-utils": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.3.0.tgz", - "integrity": "sha512-NFVxYTjKj69qB0FM+piah1x3G/63WB8vCBMnlnEHUsiLzXSTWb9FmFn36FD9Zb4APKBLY3xRArOGSMQkuzTF1w==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.3.0", - "@typescript-eslint/types": "5.3.0", - "@typescript-eslint/typescript-estree": "5.3.0", - "eslint-scope": "^5.1.1", - "eslint-utils": "^3.0.0" - }, - "dependencies": { - "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true - }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -16504,39 +16529,60 @@ "estraverse": "^4.1.1" } }, - "eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, "requires": { - "eslint-visitor-keys": "^2.0.0" + "yallist": "^4.0.0" } }, - "eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } }, "@typescript-eslint/parser": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.3.0.tgz", - "integrity": "sha512-rKu/yAReip7ovx8UwOAszJVO5MgBquo8WjIQcp1gx4pYQCwYzag+I5nVNHO4MqyMkAo0gWt2gWUi+36gWAVKcw==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.3.0", - "@typescript-eslint/types": "5.3.0", - "@typescript-eslint/typescript-estree": "5.3.0", - "debug": "^4.3.2" + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" }, "dependencies": { "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" @@ -16551,36 +16597,249 @@ } }, "@typescript-eslint/scope-manager": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.3.0.tgz", - "integrity": "sha512-22Uic9oRlTsPppy5Tcwfj+QET5RWEnZ5414Prby465XxQrQFZ6nnm5KnXgnsAJefG4hEgMnaxTB3kNEyjdjj6A==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.0", - "@typescript-eslint/visitor-keys": "5.3.0" + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "dependencies": { + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", + "dev": true + }, + "@types/semver": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", + "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "dev": true + }, + "@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + } + }, + "@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", + "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "dev": true + }, + "fast-glob": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", + "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, + "is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "@typescript-eslint/types": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.3.0.tgz", - "integrity": "sha512-fce5pG41/w8O6ahQEhXmMV+xuh4+GayzqEogN24EK+vECA3I6pUwKuLi5QbXO721EMitpQne5VKXofPonYlAQg==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.3.0.tgz", - "integrity": "sha512-FJ0nqcaUOpn/6Z4Jwbtf+o0valjBLkqc3MWkMvrhA2TvzFXtcclIM8F4MBEmYa2kgcI8EZeSAzwoSrIC8JYkug==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.0", - "@typescript-eslint/visitor-keys": "5.3.0", - "debug": "^4.3.2", - "globby": "^11.0.4", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.5", + "semver": "^7.3.7", "tsutils": "^3.21.0" }, "dependencies": { + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -16588,28 +16847,56 @@ "dev": true }, "debug": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", - "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { "ms": "2.1.2" } }, + "fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globby": { - "version": "11.0.4", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", - "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", - "fast-glob": "^3.1.1", - "ignore": "^5.1.4", - "merge2": "^1.3.0", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", "slash": "^3.0.0" } }, + "ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true + }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -16619,6 +16906,15 @@ "is-extglob": "^2.1.1" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -16630,6 +16926,21 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true + }, + "semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, @@ -16871,19 +17182,19 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.0.tgz", - "integrity": "sha512-oVIAfIQuq0x2TFDNLVavUn548WL+7hdhxYn+9j3YdJJXB7mH9dAmZNJsPDa7Jc+B9WGqoiex7GUDbyMxV0a/aw==", + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.0", - "eslint-visitor-keys": "^3.0.0" + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" }, "dependencies": { "eslint-visitor-keys": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.0.0.tgz", - "integrity": "sha512-mJOZa35trBTb3IyRmo8xmKBZlxf+N7OnUl4+ZhJHs/r+0770Wh/LEACE2pqMGMe27G/4y8P2bYGk4J70IC5k1Q==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", + "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", "dev": true } } @@ -18055,8 +18366,8 @@ "dev": true, "requires": { "@babel/eslint-parser": "^7.16.0", - "@typescript-eslint/eslint-plugin": "^5.3.0", - "@typescript-eslint/parser": "^5.3.0", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", "@wordpress/babel-preset-default": "file:packages/babel-preset-default", "@wordpress/prettier-config": "file:packages/prettier-config", "cosmiconfig": "^7.0.0", @@ -36319,6 +36630,12 @@ "resolved": "https://registry.npmjs.org/gradient-parser/-/gradient-parser-0.1.5.tgz", "integrity": "sha512-+uPlcVbjrKOnTzvz0MjTj7BfACj8OmxIa1moIjJV7btvhUMSJk0D47RfDCgDrZE3dYMz9Cf5xKJwnrKLjUq0KQ==" }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -40292,6 +40609,14 @@ "npmlog": "^6.0.2", "nx": ">=14.6.1 < 16", "typescript": "^3 || ^4" + }, + "dependencies": { + "typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true + } } }, "leven": { @@ -45738,6 +46063,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", @@ -47922,7 +48253,7 @@ "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", "requires": { "ee-first": "1.1.1" } @@ -57606,9 +57937,9 @@ } }, "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", "dev": true }, "uc.micro": { diff --git a/package.json b/package.json index 1750f47196128..64fa4cf7a5b80 100644 --- a/package.json +++ b/package.json @@ -244,7 +244,7 @@ "strip-json-comments": "5.0.0", "style-loader": "3.2.1", "terser-webpack-plugin": "5.3.9", - "typescript": "4.9.5", + "typescript": "5.1.6", "uglify-js": "3.13.7", "uuid": "8.3.0", "wd": "1.12.1", diff --git a/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx b/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx index d5fe6a9eb1f76..f782fb8934020 100644 --- a/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx +++ b/packages/components/src/border-box-control/border-box-control-linked-button/component.tsx @@ -10,7 +10,8 @@ import { __ } from '@wordpress/i18n'; import Button from '../../button'; import Tooltip from '../../tooltip'; import { View } from '../../view'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControlLinkedButton } from './hook'; import type { LinkedButtonProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts b/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts index 27ed54351aaf8..cd65758416ca1 100644 --- a/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts +++ b/packages/components/src/border-box-control/border-box-control-linked-button/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { LinkedButtonProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx b/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx index d8da0112bb7ce..922f0b39c09c9 100644 --- a/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx +++ b/packages/components/src/border-box-control/border-box-control-split-controls/component.tsx @@ -11,7 +11,8 @@ import { useMergeRefs } from '@wordpress/compose'; import BorderBoxControlVisualizer from '../border-box-control-visualizer'; import { BorderControl } from '../../border-control'; import { Grid } from '../../grid'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControlSplitControls } from './hook'; import type { BorderControlProps } from '../../border-control/types'; diff --git a/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts b/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts index a32b116843dcd..ff152c9bc674a 100644 --- a/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts +++ b/packages/components/src/border-box-control/border-box-control-split-controls/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/'; import type { SplitControlsProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx b/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx index c0abb92f3803b..d815b0b8c088e 100644 --- a/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx +++ b/packages/components/src/border-box-control/border-box-control-visualizer/component.tsx @@ -7,7 +7,8 @@ import { __ } from '@wordpress/i18n'; * Internal dependencies */ import { View } from '../../view'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControlVisualizer } from './hook'; import type { VisualizerProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts b/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts index 4e6e69e9d8452..d7ae390dcd146 100644 --- a/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts +++ b/packages/components/src/border-box-control/border-box-control-visualizer/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils'; import type { VisualizerProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control/component.tsx b/packages/components/src/border-box-control/border-box-control/component.tsx index c66855aa2f5e1..ad3162851c267 100644 --- a/packages/components/src/border-box-control/border-box-control/component.tsx +++ b/packages/components/src/border-box-control/border-box-control/component.tsx @@ -14,7 +14,8 @@ import { BorderControl } from '../../border-control'; import { StyledLabel } from '../../base-control/styles/base-control-styles'; import { View } from '../../view'; import { VisuallyHidden } from '../../visually-hidden'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderBoxControl } from './hook'; import type { BorderBoxControlProps } from '../types'; diff --git a/packages/components/src/border-box-control/border-box-control/hook.ts b/packages/components/src/border-box-control/border-box-control/hook.ts index 1c2f8291de50d..cf5aae4e09f72 100644 --- a/packages/components/src/border-box-control/border-box-control/hook.ts +++ b/packages/components/src/border-box-control/border-box-control/hook.ts @@ -16,7 +16,8 @@ import { isCompleteBorder, isEmptyBorder, } from '../utils'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { Border } from '../../border-control/types'; diff --git a/packages/components/src/border-control/border-control-dropdown/component.tsx b/packages/components/src/border-control/border-control-dropdown/component.tsx index 8eb220a0209c1..64e92ca79e32f 100644 --- a/packages/components/src/border-control/border-control-dropdown/component.tsx +++ b/packages/components/src/border-control/border-control-dropdown/component.tsx @@ -19,7 +19,8 @@ import ColorPalette from '../../color-palette'; import Dropdown from '../../dropdown'; import { HStack } from '../../h-stack'; import { VStack } from '../../v-stack'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderControlDropdown } from './hook'; import { StyledLabel } from '../../base-control/styles/base-control-styles'; import DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper'; diff --git a/packages/components/src/border-control/border-control-dropdown/hook.ts b/packages/components/src/border-control/border-control-dropdown/hook.ts index a3a789b5d55ee..99309bb3374c5 100644 --- a/packages/components/src/border-control/border-control-dropdown/hook.ts +++ b/packages/components/src/border-control/border-control-dropdown/hook.ts @@ -8,7 +8,8 @@ import { useMemo } from '@wordpress/element'; */ import * as styles from '../styles'; import { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { DropdownProps } from '../types'; diff --git a/packages/components/src/border-control/border-control-style-picker/component.tsx b/packages/components/src/border-control/border-control-style-picker/component.tsx index c61cec058be1a..66858531f62ca 100644 --- a/packages/components/src/border-control/border-control-style-picker/component.tsx +++ b/packages/components/src/border-control/border-control-style-picker/component.tsx @@ -12,7 +12,8 @@ import { StyledLabel } from '../../base-control/styles/base-control-styles'; import { View } from '../../view'; import { Flex } from '../../flex'; import { VisuallyHidden } from '../../visually-hidden'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderControlStylePicker } from './hook'; import type { LabelProps, StylePickerProps } from '../types'; diff --git a/packages/components/src/border-control/border-control-style-picker/hook.ts b/packages/components/src/border-control/border-control-style-picker/hook.ts index b8d1c27b9a727..7a77c735b9c2c 100644 --- a/packages/components/src/border-control/border-control-style-picker/hook.ts +++ b/packages/components/src/border-control/border-control-style-picker/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { StylePickerProps } from '../types'; diff --git a/packages/components/src/border-control/border-control/component.tsx b/packages/components/src/border-control/border-control/component.tsx index 4f291bda44d24..617ff5dd5997c 100644 --- a/packages/components/src/border-control/border-control/component.tsx +++ b/packages/components/src/border-control/border-control/component.tsx @@ -13,7 +13,8 @@ import { HStack } from '../../h-stack'; import { StyledLabel } from '../../base-control/styles/base-control-styles'; import { View } from '../../view'; import { VisuallyHidden } from '../../visually-hidden'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useBorderControl } from './hook'; import type { BorderControlProps, LabelProps } from '../types'; diff --git a/packages/components/src/border-control/border-control/hook.ts b/packages/components/src/border-control/border-control/hook.ts index 77e2ede942406..39917793de72d 100644 --- a/packages/components/src/border-control/border-control/hook.ts +++ b/packages/components/src/border-control/border-control/hook.ts @@ -8,7 +8,8 @@ import { useCallback, useMemo, useState } from '@wordpress/element'; */ import * as styles from '../styles'; import { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { Border, BorderControlProps } from '../types'; diff --git a/packages/components/src/card/card-body/component.tsx b/packages/components/src/card/card-body/component.tsx index cab52cf02ad25..f515162bbc1b7 100644 --- a/packages/components/src/card/card-body/component.tsx +++ b/packages/components/src/card/card-body/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { Scrollable } from '../../scrollable'; import { View } from '../../view'; import { useCardBody } from './hook'; diff --git a/packages/components/src/card/card-body/hook.ts b/packages/components/src/card/card-body/hook.ts index a02a6981b54e3..1418571fb71f5 100644 --- a/packages/components/src/card/card-body/hook.ts +++ b/packages/components/src/card/card-body/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { BodyProps } from '../types'; diff --git a/packages/components/src/card/card-divider/component.tsx b/packages/components/src/card/card-divider/component.tsx index cdd52bffd5c99..494d3451bb5ca 100644 --- a/packages/components/src/card/card-divider/component.tsx +++ b/packages/components/src/card/card-divider/component.tsx @@ -6,8 +6,10 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; -import { Divider, DividerProps } from '../../divider'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; +import type { DividerProps } from '../../divider'; +import { Divider } from '../../divider'; import { useCardDivider } from './hook'; function UnconnectedCardDivider( diff --git a/packages/components/src/card/card-divider/hook.ts b/packages/components/src/card/card-divider/hook.ts index aa5fdbe08eecb..969bdf0a43b71 100644 --- a/packages/components/src/card/card-divider/hook.ts +++ b/packages/components/src/card/card-divider/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { DividerProps } from '../../divider'; diff --git a/packages/components/src/card/card-footer/component.tsx b/packages/components/src/card/card-footer/component.tsx index 576807444c306..1507c7139cda2 100644 --- a/packages/components/src/card/card-footer/component.tsx +++ b/packages/components/src/card/card-footer/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { Flex } from '../../flex'; import { useCardFooter } from './hook'; import type { FooterProps } from '../types'; diff --git a/packages/components/src/card/card-footer/hook.ts b/packages/components/src/card/card-footer/hook.ts index 831a9c7773f77..1530faccaf15c 100644 --- a/packages/components/src/card/card-footer/hook.ts +++ b/packages/components/src/card/card-footer/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { FooterProps } from '../types'; diff --git a/packages/components/src/card/card-header/component.tsx b/packages/components/src/card/card-header/component.tsx index a055cf0966f52..01c7942e438f2 100644 --- a/packages/components/src/card/card-header/component.tsx +++ b/packages/components/src/card/card-header/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { Flex } from '../../flex'; import { useCardHeader } from './hook'; import type { HeaderProps } from '../types'; diff --git a/packages/components/src/card/card-header/hook.ts b/packages/components/src/card/card-header/hook.ts index 9cf9387b62a26..4804e76262d1d 100644 --- a/packages/components/src/card/card-header/hook.ts +++ b/packages/components/src/card/card-header/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { HeaderProps } from '../types'; diff --git a/packages/components/src/card/card-media/component.tsx b/packages/components/src/card/card-media/component.tsx index a940c2d2c8ec4..13e453c2aedcd 100644 --- a/packages/components/src/card/card-media/component.tsx +++ b/packages/components/src/card/card-media/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useCardMedia } from './hook'; import type { MediaProps } from '../types'; diff --git a/packages/components/src/card/card-media/hook.ts b/packages/components/src/card/card-media/hook.ts index edbedb986a490..dfe67b8ed1973 100644 --- a/packages/components/src/card/card-media/hook.ts +++ b/packages/components/src/card/card-media/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; import type { MediaProps } from '../types'; diff --git a/packages/components/src/card/card/component.tsx b/packages/components/src/card/card/component.tsx index 57f9c6430c0c0..e0735d2978932 100644 --- a/packages/components/src/card/card/component.tsx +++ b/packages/components/src/card/card/component.tsx @@ -12,11 +12,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { - contextConnect, - ContextSystemProvider, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, ContextSystemProvider } from '../../ui/context'; import { Elevation } from '../../elevation'; import { View } from '../../view'; import * as styles from '../styles'; diff --git a/packages/components/src/card/card/hook.ts b/packages/components/src/card/card/hook.ts index 57e928cb7f859..eb4580941d01c 100644 --- a/packages/components/src/card/card/hook.ts +++ b/packages/components/src/card/card/hook.ts @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useSurface } from '../../surface'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; diff --git a/packages/components/src/color-picker/component.tsx b/packages/components/src/color-picker/component.tsx index 852e0756b3cf1..b4183dd071bfd 100644 --- a/packages/components/src/color-picker/component.tsx +++ b/packages/components/src/color-picker/component.tsx @@ -2,7 +2,8 @@ * External dependencies */ import type { ForwardedRef } from 'react'; -import { colord, extend, Colord } from 'colord'; +import type { Colord } from 'colord'; +import { colord, extend } from 'colord'; import namesPlugin from 'colord/plugins/names'; /** diff --git a/packages/components/src/confirm-dialog/component.tsx b/packages/components/src/confirm-dialog/component.tsx index b5c6cdf45f99a..1de1c08ffbcf4 100644 --- a/packages/components/src/confirm-dialog/component.tsx +++ b/packages/components/src/confirm-dialog/component.tsx @@ -14,11 +14,8 @@ import { useCallback, useEffect, useRef, useState } from '@wordpress/element'; */ import Modal from '../modal'; import type { OwnProps, DialogInputEvent } from './types'; -import { - useContextSystem, - contextConnect, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem, contextConnect } from '../ui/context'; import { Flex } from '../flex'; import Button from '../button'; import { Text } from '../text'; diff --git a/packages/components/src/date-time/time/index.tsx b/packages/components/src/date-time/time/index.tsx index 3af6eec9cc12c..e5772bf7ab34c 100644 --- a/packages/components/src/date-time/time/index.tsx +++ b/packages/components/src/date-time/time/index.tsx @@ -33,9 +33,9 @@ import { HStack } from '../../h-stack'; import { Spacer } from '../../spacer'; import type { InputChangeCallback } from '../../input-control/types'; import type { InputState } from '../../input-control/reducer/state'; +import type { InputAction } from '../../input-control/reducer/actions'; import { COMMIT, - InputAction, PRESS_DOWN, PRESS_UP, } from '../../input-control/reducer/actions'; diff --git a/packages/components/src/divider/component.tsx b/packages/components/src/divider/component.tsx index ee03d9bd4dbb3..98b4edd61d493 100644 --- a/packages/components/src/divider/component.tsx +++ b/packages/components/src/divider/component.tsx @@ -8,11 +8,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import { DividerView } from './styles'; import type { DividerProps } from './types'; diff --git a/packages/components/src/dropdown/dropdown-content-wrapper.tsx b/packages/components/src/dropdown/dropdown-content-wrapper.tsx index 48c04a3365721..ba9a15218f6f3 100644 --- a/packages/components/src/dropdown/dropdown-content-wrapper.tsx +++ b/packages/components/src/dropdown/dropdown-content-wrapper.tsx @@ -6,11 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - WordPressComponentProps, - contextConnect, - useContextSystem, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import { DropdownContentWrapperDiv } from './styles'; import type { DropdownContentWrapperProps } from './types'; diff --git a/packages/components/src/elevation/component.tsx b/packages/components/src/elevation/component.tsx index bdcdd90e718b5..269929820824f 100644 --- a/packages/components/src/elevation/component.tsx +++ b/packages/components/src/elevation/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useElevation } from './hook'; import type { ElevationProps } from './types'; diff --git a/packages/components/src/elevation/hook.ts b/packages/components/src/elevation/hook.ts index 797fe784c2e40..1aa97c9167bc9 100644 --- a/packages/components/src/elevation/hook.ts +++ b/packages/components/src/elevation/hook.ts @@ -1,7 +1,8 @@ /** * External dependencies */ -import { css, SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; /** * WordPress dependencies @@ -11,7 +12,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import * as styles from './styles'; import { CONFIG, reduceMotion } from '../utils'; import { useCx } from '../utils/hooks/use-cx'; diff --git a/packages/components/src/flex/flex-block/component.tsx b/packages/components/src/flex/flex-block/component.tsx index f732bbe64896c..4d01f16e3abd9 100644 --- a/packages/components/src/flex/flex-block/component.tsx +++ b/packages/components/src/flex/flex-block/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import type { FlexBlockProps } from '../types'; import { useFlexBlock } from './hook'; diff --git a/packages/components/src/flex/flex-block/hook.ts b/packages/components/src/flex/flex-block/hook.ts index b9026e64f7c46..1c0497ac56d0f 100644 --- a/packages/components/src/flex/flex-block/hook.ts +++ b/packages/components/src/flex/flex-block/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useFlexItem } from '../flex-item'; import type { FlexBlockProps } from '../types'; diff --git a/packages/components/src/flex/flex-item/component.tsx b/packages/components/src/flex/flex-item/component.tsx index e4073a4b400f4..446e2b9483970 100644 --- a/packages/components/src/flex/flex-item/component.tsx +++ b/packages/components/src/flex/flex-item/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useFlexItem } from './hook'; import type { FlexItemProps } from '../types'; diff --git a/packages/components/src/flex/flex-item/hook.ts b/packages/components/src/flex/flex-item/hook.ts index 6a7b259560d1f..db130f0b62aa0 100644 --- a/packages/components/src/flex/flex-item/hook.ts +++ b/packages/components/src/flex/flex-item/hook.ts @@ -1,12 +1,14 @@ /** * External dependencies */ -import { css, SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useFlexContext } from '../context'; import * as styles from '../styles'; import { useCx } from '../../utils/hooks/use-cx'; diff --git a/packages/components/src/flex/flex/component.tsx b/packages/components/src/flex/flex/component.tsx index 4302e9b16c7ad..8fce9ea144c70 100644 --- a/packages/components/src/flex/flex/component.tsx +++ b/packages/components/src/flex/flex/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useFlex } from './hook'; import { FlexContext } from './../context'; import { View } from '../../view'; diff --git a/packages/components/src/flex/flex/hook.ts b/packages/components/src/flex/flex/hook.ts index 552a4d99d295a..6ac032f75dc4c 100644 --- a/packages/components/src/flex/flex/hook.ts +++ b/packages/components/src/flex/flex/hook.ts @@ -12,7 +12,8 @@ import deprecated from '@wordpress/deprecated'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useResponsiveValue } from '../../ui/utils/use-responsive-value'; import { space } from '../../ui/utils/space'; import * as styles from '../styles'; diff --git a/packages/components/src/grid/component.tsx b/packages/components/src/grid/component.tsx index 689e641774f72..3ea6db0ba8544 100644 --- a/packages/components/src/grid/component.tsx +++ b/packages/components/src/grid/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import useGrid from './hook'; import type { GridProps } from './types'; diff --git a/packages/components/src/grid/hook.ts b/packages/components/src/grid/hook.ts index be615a884fd1c..7fd54d6c4f19e 100644 --- a/packages/components/src/grid/hook.ts +++ b/packages/components/src/grid/hook.ts @@ -11,7 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { getAlignmentProps } from './utils'; import { useResponsiveValue } from '../ui/utils/use-responsive-value'; import CONFIG from '../utils/config-values'; diff --git a/packages/components/src/h-stack/component.tsx b/packages/components/src/h-stack/component.tsx index a6989905825b7..51b25486f0b38 100644 --- a/packages/components/src/h-stack/component.tsx +++ b/packages/components/src/h-stack/component.tsx @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useHStack } from './hook'; import type { Props } from './types'; diff --git a/packages/components/src/h-stack/hook.tsx b/packages/components/src/h-stack/hook.tsx index 2c281757c0fec..cab7df1cad79c 100644 --- a/packages/components/src/h-stack/hook.tsx +++ b/packages/components/src/h-stack/hook.tsx @@ -6,11 +6,8 @@ import type { ReactElement } from 'react'; /** * Internal dependencies */ -import { - hasConnectNamespace, - useContextSystem, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { hasConnectNamespace, useContextSystem } from '../ui/context'; import { FlexItem, useFlex } from '../flex'; import { getAlignmentProps } from './utils'; import { getValidChildren } from '../ui/utils/get-valid-children'; diff --git a/packages/components/src/heading/component.tsx b/packages/components/src/heading/component.tsx index 7eb48be16b8a7..b15739f9c17b8 100644 --- a/packages/components/src/heading/component.tsx +++ b/packages/components/src/heading/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useHeading } from './hook'; import type { HeadingProps } from './types'; diff --git a/packages/components/src/heading/hook.ts b/packages/components/src/heading/hook.ts index 3a92fffca7500..13153bc853038 100644 --- a/packages/components/src/heading/hook.ts +++ b/packages/components/src/heading/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { useText } from '../text'; import { getHeadingFontSize } from '../ui/utils/font-size'; import { CONFIG, COLORS } from '../utils'; diff --git a/packages/components/src/input-control/input-base.tsx b/packages/components/src/input-control/input-base.tsx index bd88f72be23d7..f0a89b92772a5 100644 --- a/packages/components/src/input-control/input-base.tsx +++ b/packages/components/src/input-control/input-base.tsx @@ -22,7 +22,8 @@ import { getSizeConfig, } from './styles/input-control-styles'; import type { InputBaseProps, LabelPosition } from './types'; -import { ContextSystemProvider, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { ContextSystemProvider } from '../ui/context'; function useUniqueId( idProp?: string ) { const instanceId = useInstanceId( InputBase ); diff --git a/packages/components/src/input-control/input-prefix-wrapper.tsx b/packages/components/src/input-control/input-prefix-wrapper.tsx index 310d51886e93d..7f888bd9b7444 100644 --- a/packages/components/src/input-control/input-prefix-wrapper.tsx +++ b/packages/components/src/input-control/input-prefix-wrapper.tsx @@ -7,11 +7,8 @@ import type { ForwardedRef } from 'react'; * Internal dependencies */ import { Spacer } from '../spacer'; -import { - WordPressComponentProps, - contextConnect, - useContextSystem, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import type { InputControlPrefixWrapperProps } from './types'; function UnconnectedInputControlPrefixWrapper( diff --git a/packages/components/src/input-control/input-suffix-wrapper.tsx b/packages/components/src/input-control/input-suffix-wrapper.tsx index 16e7848f9c12a..000457aefc314 100644 --- a/packages/components/src/input-control/input-suffix-wrapper.tsx +++ b/packages/components/src/input-control/input-suffix-wrapper.tsx @@ -7,11 +7,8 @@ import type { ForwardedRef } from 'react'; * Internal dependencies */ import { Spacer } from '../spacer'; -import { - WordPressComponentProps, - contextConnect, - useContextSystem, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect, useContextSystem } from '../ui/context'; import type { InputControlSuffixWrapperProps } from './types'; function UnconnectedInputControlSuffixWrapper( diff --git a/packages/components/src/input-control/reducer/reducer.ts b/packages/components/src/input-control/reducer/reducer.ts index ec23db6cc281f..8e3584d3910d7 100644 --- a/packages/components/src/input-control/reducer/reducer.ts +++ b/packages/components/src/input-control/reducer/reducer.ts @@ -11,12 +11,8 @@ import { useReducer, useLayoutEffect, useRef } from '@wordpress/element'; /** * Internal dependencies */ -import { - InputState, - StateReducer, - initialInputControlState, - initialStateReducer, -} from './state'; +import type { InputState, StateReducer } from './state'; +import { initialInputControlState, initialStateReducer } from './state'; import * as actions from './actions'; import type { InputChangeCallback } from '../types'; diff --git a/packages/components/src/input-control/styles/input-control-styles.tsx b/packages/components/src/input-control/styles/input-control-styles.tsx index 3548be6f7260c..65359be033a19 100644 --- a/packages/components/src/input-control/styles/input-control-styles.tsx +++ b/packages/components/src/input-control/styles/input-control-styles.tsx @@ -1,7 +1,8 @@ /** * External dependencies */ -import { css, SerializedStyles } from '@emotion/react'; +import type { SerializedStyles } from '@emotion/react'; +import { css } from '@emotion/react'; import styled from '@emotion/styled'; import type { CSSProperties, ReactNode } from 'react'; diff --git a/packages/components/src/item-group/item-group/component.tsx b/packages/components/src/item-group/item-group/component.tsx index ec6847161f7e2..127359febd90d 100644 --- a/packages/components/src/item-group/item-group/component.tsx +++ b/packages/components/src/item-group/item-group/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { useItemGroup } from './hook'; import { ItemGroupContext, useItemGroupContext } from '../context'; import { View } from '../../view'; diff --git a/packages/components/src/item-group/item-group/hook.ts b/packages/components/src/item-group/item-group/hook.ts index f8ec3740e721c..77327b91df5a6 100644 --- a/packages/components/src/item-group/item-group/hook.ts +++ b/packages/components/src/item-group/item-group/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; /** * Internal dependencies diff --git a/packages/components/src/item-group/item/component.tsx b/packages/components/src/item-group/item/component.tsx index 18472782989cf..ed30c9b56e0f2 100644 --- a/packages/components/src/item-group/item/component.tsx +++ b/packages/components/src/item-group/item/component.tsx @@ -8,7 +8,8 @@ import type { ForwardedRef } from 'react'; */ import type { ItemProps } from '../types'; import { useItem } from './hook'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; function UnconnectedItem( diff --git a/packages/components/src/item-group/item/hook.ts b/packages/components/src/item-group/item/hook.ts index ff97e3adae160..d1bc632ddb7f3 100644 --- a/packages/components/src/item-group/item/hook.ts +++ b/packages/components/src/item-group/item/hook.ts @@ -11,7 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import * as styles from '../styles'; import { useItemGroupContext } from '../context'; import { useCx } from '../../utils/hooks/use-cx'; diff --git a/packages/components/src/navigator/navigator-back-button/component.tsx b/packages/components/src/navigator/navigator-back-button/component.tsx index 498096edd7d46..bf005413fdf71 100644 --- a/packages/components/src/navigator/navigator-back-button/component.tsx +++ b/packages/components/src/navigator/navigator-back-button/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useNavigatorBackButton } from './hook'; import type { NavigatorBackButtonProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-back-button/hook.ts b/packages/components/src/navigator/navigator-back-button/hook.ts index 437c60731cc95..255a83997d071 100644 --- a/packages/components/src/navigator/navigator-back-button/hook.ts +++ b/packages/components/src/navigator/navigator-back-button/hook.ts @@ -6,7 +6,8 @@ import { useCallback } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import Button from '../../button'; import useNavigator from '../use-navigator'; import type { NavigatorBackButtonHookProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-button/component.tsx b/packages/components/src/navigator/navigator-button/component.tsx index 2e446dac010c0..d591758333aa9 100644 --- a/packages/components/src/navigator/navigator-button/component.tsx +++ b/packages/components/src/navigator/navigator-button/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useNavigatorButton } from './hook'; import type { NavigatorButtonProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-button/hook.ts b/packages/components/src/navigator/navigator-button/hook.ts index 15d52d269b60a..9b32c07b293c5 100644 --- a/packages/components/src/navigator/navigator-button/hook.ts +++ b/packages/components/src/navigator/navigator-button/hook.ts @@ -7,7 +7,8 @@ import { escapeAttribute } from '@wordpress/escape-html'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import Button from '../../button'; import useNavigator from '../use-navigator'; import type { NavigatorButtonProps } from '../types'; diff --git a/packages/components/src/navigator/navigator-provider/component.tsx b/packages/components/src/navigator/navigator-provider/component.tsx index 9bcffad6bc54b..c86067f7f72ce 100644 --- a/packages/components/src/navigator/navigator-provider/component.tsx +++ b/packages/components/src/navigator/navigator-provider/component.tsx @@ -20,11 +20,8 @@ import isShallowEqual from '@wordpress/is-shallow-equal'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import { View } from '../../view'; import { NavigatorContext } from '../context'; diff --git a/packages/components/src/navigator/navigator-screen/component.tsx b/packages/components/src/navigator/navigator-screen/component.tsx index 201f2261ed2f7..7a920bd7e2bc5 100644 --- a/packages/components/src/navigator/navigator-screen/component.tsx +++ b/packages/components/src/navigator/navigator-screen/component.tsx @@ -3,7 +3,9 @@ */ import type { ForwardedRef } from 'react'; // eslint-disable-next-line no-restricted-imports -import { motion, MotionProps } from 'framer-motion'; +import type { MotionProps } from 'framer-motion'; +// eslint-disable-next-line no-restricted-imports +import { motion } from 'framer-motion'; import { css } from '@emotion/react'; /** @@ -24,11 +26,8 @@ import { escapeAttribute } from '@wordpress/escape-html'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import { View } from '../../view'; import { NavigatorContext } from '../context'; diff --git a/packages/components/src/navigator/navigator-to-parent-button/component.tsx b/packages/components/src/navigator/navigator-to-parent-button/component.tsx index 5dd8ab1624ae9..a717df22c7413 100644 --- a/packages/components/src/navigator/navigator-to-parent-button/component.tsx +++ b/packages/components/src/navigator/navigator-to-parent-button/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { View } from '../../view'; import { useNavigatorBackButton } from '../navigator-back-button/hook'; import type { NavigatorToParentButtonProps } from '../types'; diff --git a/packages/components/src/popover/index.tsx b/packages/components/src/popover/index.tsx index e5e7d45c9dd21..593d51f27e828 100644 --- a/packages/components/src/popover/index.tsx +++ b/packages/components/src/popover/index.tsx @@ -3,6 +3,7 @@ */ import type { ForwardedRef, SyntheticEvent, RefCallback } from 'react'; import classnames from 'classnames'; +import type { Middleware, MiddlewareArguments } from '@floating-ui/react-dom'; import { useFloating, flip as flipMiddleware, @@ -11,16 +12,11 @@ import { arrow, offset as offsetMiddleware, size, - Middleware, - MiddlewareArguments, } from '@floating-ui/react-dom'; // eslint-disable-next-line no-restricted-imports -import { - motion, - useReducedMotion, - HTMLMotionProps, - MotionProps, -} from 'framer-motion'; +import type { HTMLMotionProps, MotionProps } from 'framer-motion'; +// eslint-disable-next-line no-restricted-imports +import { motion, useReducedMotion } from 'framer-motion'; /** * WordPress dependencies diff --git a/packages/components/src/popover/overlay-middlewares.tsx b/packages/components/src/popover/overlay-middlewares.tsx index da138af7fa331..83cc1cd0d21a9 100644 --- a/packages/components/src/popover/overlay-middlewares.tsx +++ b/packages/components/src/popover/overlay-middlewares.tsx @@ -1,7 +1,8 @@ /** * External dependencies */ -import { size, MiddlewareArguments } from '@floating-ui/react-dom'; +import type { MiddlewareArguments } from '@floating-ui/react-dom'; +import { size } from '@floating-ui/react-dom'; export function overlayMiddlewares() { return [ diff --git a/packages/components/src/resizable-box/resize-tooltip/index.tsx b/packages/components/src/resizable-box/resize-tooltip/index.tsx index 53969a664a863..4daef4d65d4df 100644 --- a/packages/components/src/resizable-box/resize-tooltip/index.tsx +++ b/packages/components/src/resizable-box/resize-tooltip/index.tsx @@ -13,7 +13,8 @@ import { forwardRef } from '@wordpress/element'; * Internal dependencies */ import Label from './label'; -import { useResizeLabel, Axis, Position, POSITIONS } from './utils'; +import type { Axis, Position } from './utils'; +import { useResizeLabel, POSITIONS } from './utils'; import { Root } from './styles/resize-tooltip.styles'; type ResizeTooltipProps = React.ComponentProps< typeof Root > & { diff --git a/packages/components/src/resizable-box/resize-tooltip/label.tsx b/packages/components/src/resizable-box/resize-tooltip/label.tsx index 8d1c91f13c8b5..36bb0db72dd2c 100644 --- a/packages/components/src/resizable-box/resize-tooltip/label.tsx +++ b/packages/components/src/resizable-box/resize-tooltip/label.tsx @@ -12,7 +12,8 @@ import { isRTL } from '@wordpress/i18n'; /** * Internal dependencies */ -import { Position, POSITIONS } from './utils'; +import type { Position } from './utils'; +import { POSITIONS } from './utils'; import { TooltipWrapper, Tooltip, diff --git a/packages/components/src/scrollable/component.tsx b/packages/components/src/scrollable/component.tsx index ffbcf8c697003..902d315e9deee 100644 --- a/packages/components/src/scrollable/component.tsx +++ b/packages/components/src/scrollable/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useScrollable } from './hook'; import type { ScrollableProps } from './types'; diff --git a/packages/components/src/scrollable/hook.ts b/packages/components/src/scrollable/hook.ts index 16e6074a1d196..7d8002dc624dd 100644 --- a/packages/components/src/scrollable/hook.ts +++ b/packages/components/src/scrollable/hook.ts @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import * as styles from './styles'; import { useCx } from '../utils/hooks/use-cx'; import type { ScrollableProps } from './types'; diff --git a/packages/components/src/spacer/component.tsx b/packages/components/src/spacer/component.tsx index cce8f0b54905e..b4f532a0fd478 100644 --- a/packages/components/src/spacer/component.tsx +++ b/packages/components/src/spacer/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useSpacer } from './hook'; import type { SpacerProps } from './types'; diff --git a/packages/components/src/spacer/hook.ts b/packages/components/src/spacer/hook.ts index 1ddf4dd7ae428..e43d45cb31f53 100644 --- a/packages/components/src/spacer/hook.ts +++ b/packages/components/src/spacer/hook.ts @@ -6,7 +6,8 @@ import { css } from '@emotion/react'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { space } from '../ui/utils/space'; import { rtl, useCx } from '../utils'; import type { SpacerProps } from './types'; diff --git a/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx b/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx index c0ab8f95409f7..eb36f06022eed 100644 --- a/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx +++ b/packages/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx @@ -13,11 +13,8 @@ import { useInstanceId } from '@wordpress/compose'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import type { ToggleGroupControlOptionBaseProps, WithToolTipProps, diff --git a/packages/components/src/toggle-group-control/toggle-group-control/component.tsx b/packages/components/src/toggle-group-control/toggle-group-control/component.tsx index ebd4893e37fb2..f9a65e0aacacd 100644 --- a/packages/components/src/toggle-group-control/toggle-group-control/component.tsx +++ b/packages/components/src/toggle-group-control/toggle-group-control/component.tsx @@ -11,11 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { - contextConnect, - useContextSystem, - WordPressComponentProps, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect, useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks'; import BaseControl from '../../base-control'; import type { ToggleGroupControlProps } from '../types'; diff --git a/packages/components/src/toolbar/toolbar-button/index.tsx b/packages/components/src/toolbar/toolbar-button/index.tsx index 578867313a429..35696d80e73eb 100644 --- a/packages/components/src/toolbar/toolbar-button/index.tsx +++ b/packages/components/src/toolbar/toolbar-button/index.tsx @@ -2,7 +2,7 @@ * External dependencies */ import classnames from 'classnames'; -import type { ForwardedRef } from 'react'; +import type { ForwardedRef, MouseEvent as ReactMouseEvent } from 'react'; /** * WordPress dependencies @@ -18,7 +18,6 @@ import ToolbarContext from '../toolbar-context'; import ToolbarButtonContainer from './toolbar-button-container'; import type { ToolbarButtonProps } from './types'; import type { WordPressComponentProps } from '../../ui/context'; -import type React from 'react'; function UnforwardedToolbarButton( { @@ -45,7 +44,7 @@ function UnforwardedToolbarButton( shortcut={ props.shortcut } data-subscript={ props.subscript } onClick={ ( - event: React.MouseEvent< + event: ReactMouseEvent< HTMLButtonElement & HTMLAnchorElement, MouseEvent > diff --git a/packages/components/src/toolbar/toolbar/index.tsx b/packages/components/src/toolbar/toolbar/index.tsx index 275836c938540..96e35d399df94 100644 --- a/packages/components/src/toolbar/toolbar/index.tsx +++ b/packages/components/src/toolbar/toolbar/index.tsx @@ -16,10 +16,8 @@ import deprecated from '@wordpress/deprecated'; import ToolbarGroup from '../toolbar-group'; import ToolbarContainer from './toolbar-container'; import type { ToolbarProps } from './types'; -import { - WordPressComponentProps, - ContextSystemProvider, -} from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { ContextSystemProvider } from '../../ui/context'; const CONTEXT_SYSTEM_VALUE = { DropdownMenu: { diff --git a/packages/components/src/tools-panel/tools-panel-header/component.tsx b/packages/components/src/tools-panel/tools-panel-header/component.tsx index 281f63728f659..a9d4fd654b839 100644 --- a/packages/components/src/tools-panel/tools-panel-header/component.tsx +++ b/packages/components/src/tools-panel/tools-panel-header/component.tsx @@ -19,7 +19,8 @@ import MenuItem from '../../menu-item'; import { HStack } from '../../h-stack'; import { Heading } from '../../heading'; import { useToolsPanelHeader } from './hook'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import { ResetLabel } from '../styles'; import type { ToolsPanelControlsGroupProps, diff --git a/packages/components/src/tools-panel/tools-panel-header/hook.ts b/packages/components/src/tools-panel/tools-panel-header/hook.ts index 6682328810e33..056258eed5d00 100644 --- a/packages/components/src/tools-panel/tools-panel-header/hook.ts +++ b/packages/components/src/tools-panel/tools-panel-header/hook.ts @@ -8,7 +8,8 @@ import { useMemo } from '@wordpress/element'; */ import * as styles from '../styles'; import { useToolsPanelContext } from '../context'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { ToolsPanelHeaderProps } from '../types'; diff --git a/packages/components/src/tools-panel/tools-panel-item/component.tsx b/packages/components/src/tools-panel/tools-panel-item/component.tsx index f66d3845ff083..fb4d1c4fae295 100644 --- a/packages/components/src/tools-panel/tools-panel-item/component.tsx +++ b/packages/components/src/tools-panel/tools-panel-item/component.tsx @@ -8,7 +8,8 @@ import type { ForwardedRef } from 'react'; */ import { useToolsPanelItem } from './hook'; import { View } from '../../view'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import type { ToolsPanelItemProps } from '../types'; // This wraps controls to be conditionally displayed within a tools panel. It diff --git a/packages/components/src/tools-panel/tools-panel-item/hook.ts b/packages/components/src/tools-panel/tools-panel-item/hook.ts index 9acee8ee1d52c..bfd59e5b953aa 100644 --- a/packages/components/src/tools-panel/tools-panel-item/hook.ts +++ b/packages/components/src/tools-panel/tools-panel-item/hook.ts @@ -9,7 +9,8 @@ import { useCallback, useEffect, useMemo } from '@wordpress/element'; */ import * as styles from '../styles'; import { useToolsPanelContext } from '../context'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { ToolsPanelItemProps } from '../types'; diff --git a/packages/components/src/tools-panel/tools-panel/component.tsx b/packages/components/src/tools-panel/tools-panel/component.tsx index c6f3a9ce5469d..223a9f0ba27f8 100644 --- a/packages/components/src/tools-panel/tools-panel/component.tsx +++ b/packages/components/src/tools-panel/tools-panel/component.tsx @@ -10,7 +10,8 @@ import ToolsPanelHeader from '../tools-panel-header'; import { ToolsPanelContext } from '../context'; import { useToolsPanel } from './hook'; import { Grid } from '../../grid'; -import { contextConnect, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { contextConnect } from '../../ui/context'; import type { ToolsPanelProps } from '../types'; const UnconnectedToolsPanel = ( diff --git a/packages/components/src/tools-panel/tools-panel/hook.ts b/packages/components/src/tools-panel/tools-panel/hook.ts index 35d4c06279419..8377376a861a5 100644 --- a/packages/components/src/tools-panel/tools-panel/hook.ts +++ b/packages/components/src/tools-panel/tools-panel/hook.ts @@ -13,7 +13,8 @@ import { * Internal dependencies */ import * as styles from '../styles'; -import { useContextSystem, WordPressComponentProps } from '../../ui/context'; +import type { WordPressComponentProps } from '../../ui/context'; +import { useContextSystem } from '../../ui/context'; import { useCx } from '../../utils/hooks/use-cx'; import type { ToolsPanelItem, diff --git a/packages/components/src/truncate/component.tsx b/packages/components/src/truncate/component.tsx index cd14fd3989e88..dfe6cd37b3e9a 100644 --- a/packages/components/src/truncate/component.tsx +++ b/packages/components/src/truncate/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import useTruncate from './hook'; import type { TruncateProps } from './types'; diff --git a/packages/components/src/truncate/hook.ts b/packages/components/src/truncate/hook.ts index 5fac3b83efe3b..c6afef52c0908 100644 --- a/packages/components/src/truncate/hook.ts +++ b/packages/components/src/truncate/hook.ts @@ -11,7 +11,8 @@ import { useMemo } from '@wordpress/element'; /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import * as styles from './styles'; import { TRUNCATE_ELLIPSIS, TRUNCATE_TYPE, truncateContent } from './utils'; import { useCx } from '../utils/hooks/use-cx'; diff --git a/packages/components/src/ui/shortcut/component.tsx b/packages/components/src/ui/shortcut/component.tsx index b48f8d385a314..f6131428a2546 100644 --- a/packages/components/src/ui/shortcut/component.tsx +++ b/packages/components/src/ui/shortcut/component.tsx @@ -6,11 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - useContextSystem, - contextConnect, - WordPressComponentProps, -} from '../context'; +import type { WordPressComponentProps } from '../context'; +import { useContextSystem, contextConnect } from '../context'; import { View } from '../../view'; export interface ShortcutDescription { diff --git a/packages/components/src/utils/hooks/use-cx.ts b/packages/components/src/utils/hooks/use-cx.ts index 19bc0a797d127..f12b2a3a5a6c5 100644 --- a/packages/components/src/utils/hooks/use-cx.ts +++ b/packages/components/src/utils/hooks/use-cx.ts @@ -5,7 +5,9 @@ import { __unsafe_useEmotionCache as useEmotionCache } from '@emotion/react'; import type { SerializedStyles } from '@emotion/serialize'; import { insertStyles } from '@emotion/utils'; // eslint-disable-next-line no-restricted-imports -import { cx as innerCx, ClassNamesArg } from '@emotion/css'; +import type { ClassNamesArg } from '@emotion/css'; +// eslint-disable-next-line no-restricted-imports +import { cx as innerCx } from '@emotion/css'; /** * WordPress dependencies diff --git a/packages/components/src/v-stack/component.tsx b/packages/components/src/v-stack/component.tsx index aa24673db1677..5c51043eba726 100644 --- a/packages/components/src/v-stack/component.tsx +++ b/packages/components/src/v-stack/component.tsx @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { contextConnect, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { contextConnect } from '../ui/context'; import { View } from '../view'; import { useVStack } from './hook'; import type { VStackProps } from './types'; diff --git a/packages/components/src/v-stack/hook.ts b/packages/components/src/v-stack/hook.ts index 0196eef36130c..f9c592e8f0285 100644 --- a/packages/components/src/v-stack/hook.ts +++ b/packages/components/src/v-stack/hook.ts @@ -1,7 +1,8 @@ /** * Internal dependencies */ -import { useContextSystem, WordPressComponentProps } from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem } from '../ui/context'; import { useHStack } from '../h-stack'; import type { VStackProps } from './types'; diff --git a/packages/components/src/visually-hidden/component.tsx b/packages/components/src/visually-hidden/component.tsx index ffaa7f564019b..c5cb9c0fd0067 100644 --- a/packages/components/src/visually-hidden/component.tsx +++ b/packages/components/src/visually-hidden/component.tsx @@ -6,11 +6,8 @@ import type { ForwardedRef } from 'react'; /** * Internal dependencies */ -import { - useContextSystem, - contextConnect, - WordPressComponentProps, -} from '../ui/context'; +import type { WordPressComponentProps } from '../ui/context'; +import { useContextSystem, contextConnect } from '../ui/context'; import { visuallyHidden } from './styles'; import { View } from '../view'; import type { VisuallyHiddenProps } from './types'; diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json index be473ffcc877d..1ee9a35f1a8b2 100644 --- a/packages/components/tsconfig.json +++ b/packages/components/tsconfig.json @@ -8,9 +8,7 @@ "gutenberg-test-env", "dom-scroll-into-view", "jest", - "@testing-library/jest-dom", - "snapshot-diff", - "@wordpress/jest-console" + "@testing-library/jest-dom" ], // TODO: Remove `skipLibCheck` after resolving duplicate declaration of the `process` variable // between `@types/webpack-env` (from @storybook packages) and `gutenberg-env`. diff --git a/packages/compose/src/higher-order/with-instance-id/index.tsx b/packages/compose/src/higher-order/with-instance-id/index.tsx index d4802f66b56d0..f2e78e7a80cfc 100644 --- a/packages/compose/src/higher-order/with-instance-id/index.tsx +++ b/packages/compose/src/higher-order/with-instance-id/index.tsx @@ -1,11 +1,11 @@ /** * Internal dependencies */ -import { - createHigherOrderComponent, +import type { WithInjectedProps, WithoutInjectedProps, } from '../../utils/create-higher-order-component'; +import { createHigherOrderComponent } from '../../utils/create-higher-order-component'; import useInstanceId from '../../hooks/use-instance-id'; type InstanceIdProps = { instanceId: string | number }; diff --git a/packages/compose/src/higher-order/with-safe-timeout/index.tsx b/packages/compose/src/higher-order/with-safe-timeout/index.tsx index d15b8a72d41ea..73e8faec6c101 100644 --- a/packages/compose/src/higher-order/with-safe-timeout/index.tsx +++ b/packages/compose/src/higher-order/with-safe-timeout/index.tsx @@ -6,11 +6,11 @@ import { Component } from '@wordpress/element'; /** * Internal dependencies */ -import { - createHigherOrderComponent, +import type { WithInjectedProps, WithoutInjectedProps, } from '../../utils/create-higher-order-component'; +import { createHigherOrderComponent } from '../../utils/create-higher-order-component'; /** * We cannot use the `Window['setTimeout']` and `Window['clearTimeout']` diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 78a8ab62997ce..99479447741bd 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Enhancement + +- Support Typescript 5 and 5.1 by updating both `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin` to version `^5.62.0`. ([#52621](https://github.com/WordPress/gutenberg/pull/52621)). + ## 14.11.0 (2023-07-20) ## 14.10.0 (2023-07-05) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 39d6327b8b94a..693bf7dcb891a 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -32,8 +32,8 @@ "main": "index.js", "dependencies": { "@babel/eslint-parser": "^7.16.0", - "@typescript-eslint/eslint-plugin": "^5.3.0", - "@typescript-eslint/parser": "^5.3.0", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", "@wordpress/babel-preset-default": "file:../babel-preset-default", "@wordpress/prettier-config": "file:../prettier-config", "cosmiconfig": "^7.0.0", diff --git a/packages/hooks/src/createRunHook.js b/packages/hooks/src/createRunHook.js index ec83026d4d0db..c2bf6fd187ce0 100644 --- a/packages/hooks/src/createRunHook.js +++ b/packages/hooks/src/createRunHook.js @@ -8,7 +8,7 @@ * @param {boolean} [returnFirstArg=false] Whether each hook callback is expected to * return its first argument. * - * @return {(hookName:string, ...args: unknown[]) => unknown} Function that runs hook callbacks. + * @return {(hookName:string, ...args: unknown[]) => undefined|unknown} Function that runs hook callbacks. */ function createRunHook( hooks, storeKey, returnFirstArg = false ) { return function runHooks( hookName, ...args ) { @@ -60,6 +60,8 @@ function createRunHook( hooks, storeKey, returnFirstArg = false ) { if ( returnFirstArg ) { return args[ 0 ]; } + + return undefined; }; } diff --git a/packages/redux-routine/src/runtime.ts b/packages/redux-routine/src/runtime.ts index 8710bc0236f15..741a942fa0188 100644 --- a/packages/redux-routine/src/runtime.ts +++ b/packages/redux-routine/src/runtime.ts @@ -1,7 +1,8 @@ /** * External dependencies */ -import { create, Control } from 'rungen'; +import type { Control } from 'rungen'; +import { create } from 'rungen'; import isPromise from 'is-promise'; import type { Dispatch, AnyAction } from 'redux'; diff --git a/packages/report-flaky-tests/src/__tests__/markdown.test.ts b/packages/report-flaky-tests/src/__tests__/markdown.test.ts index a4a1727029a78..4a0fa73f35492 100644 --- a/packages/report-flaky-tests/src/__tests__/markdown.test.ts +++ b/packages/report-flaky-tests/src/__tests__/markdown.test.ts @@ -15,7 +15,7 @@ import { renderCommitComment, isReportComment, } from '../markdown'; -import { ReportedIssue } from '../types'; +import type { ReportedIssue } from '../types'; jest.useFakeTimers( 'modern' ).setSystemTime( new Date( '2020-05-10' ) ); diff --git a/test/storybook-playwright/playwright.config.ts b/test/storybook-playwright/playwright.config.ts index eabe9b17121f2..091398371e902 100644 --- a/test/storybook-playwright/playwright.config.ts +++ b/test/storybook-playwright/playwright.config.ts @@ -1,7 +1,7 @@ /** * External dependencies */ -import { PlaywrightTestConfig } from '@playwright/test'; +import type { PlaywrightTestConfig } from '@playwright/test'; const config: PlaywrightTestConfig = { outputDir: 'test-results/output', diff --git a/tsconfig.base.json b/tsconfig.base.json index 201304f455a13..495796402bdf8 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,7 +21,6 @@ "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, - "importsNotUsedAsValues": "error", /* Module Resolution Options */ "moduleResolution": "node",