diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index cd0ca280ec42..000000000000 --- a/.eslintignore +++ /dev/null @@ -1,23 +0,0 @@ -Apps/HelloWorld.html -Apps/Sandcastle/ThirdParty/** -Build/** -Documentation/** -Source/** -Specs/jasmine/** -ThirdParty/** -Tools/** -Apps/Sandcastle/jsHintOptions.js -Apps/Sandcastle/gallery/gallery-index.js -index.html -index.release.html - - -# packages/engine -packages/engine/Build/** -packages/engine/Source/Scene/GltfPipeline/** -packages/engine/Source/Shaders/** -packages/engine/Source/ThirdParty/** - -# packages/widgets -packages/widgets/Build/** -packages/widgets/Source/ThirdParty/** \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 1468218cac65..000000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "extends": [ - "cesium/node" - ] -} diff --git a/.github/actions/check-for-CLA/.gitignore b/.github/actions/check-for-CLA/.gitignore new file mode 100644 index 000000000000..25c8fdbaba62 --- /dev/null +++ b/.github/actions/check-for-CLA/.gitignore @@ -0,0 +1,2 @@ +node_modules +package-lock.json \ No newline at end of file diff --git a/.github/actions/check-for-CLA/index.js b/.github/actions/check-for-CLA/index.js index e1ee29e17d2f..a08806abf267 100644 --- a/.github/actions/check-for-CLA/index.js +++ b/.github/actions/check-for-CLA/index.js @@ -20,30 +20,26 @@ const GOOGLE_SHEETS_INFO = { const CONTRIBUTORS_URL = "https://github.com/CesiumGS/cesium/blob/main/CONTRIBUTORS.md"; -const main = async () => { - let hasSignedCLA; - let errorFoundOnCLACheck; +const getGoogleSheetsApiClient = async () => { + const googleConfigFilePath = "GoogleConfig.json"; + fs.writeFileSync(googleConfigFilePath, GOOGLE_SHEETS_INFO.APIKeys); - try { - hasSignedCLA = await checkIfUserHasSignedAnyCLA(); - } catch (error) { - errorFoundOnCLACheck = error.toString(); - } + const auth = new google.auth.GoogleAuth({ + keyFile: googleConfigFilePath, + scopes: ["https://www.googleapis.com/auth/spreadsheets"], + }); + const googleAuthClient = await auth.getClient(); - const response = await postCommentOnPullRequest( - hasSignedCLA, - errorFoundOnCLACheck - ); + return google.sheets({ version: "v4", auth: googleAuthClient }); }; -const checkIfUserHasSignedAnyCLA = async () => { - let foundIndividualCLA = await checkIfIndividualCLAFound(); - if (foundIndividualCLA) { - return true; - } +const getValuesFromGoogleSheet = async (sheetId, cellRanges) => { + const googleSheetsApi = await getGoogleSheetsApiClient(); - let foundCorporateCLA = await checkIfCorporateCLAFound(); - return foundCorporateCLA; + return googleSheetsApi.spreadsheets.values.get({ + spreadsheetId: sheetId, + range: cellRanges, + }); }; const checkIfIndividualCLAFound = async () => { @@ -95,26 +91,31 @@ const checkIfCorporateCLAFound = async () => { return false; }; -const getValuesFromGoogleSheet = async (sheetId, cellRanges) => { - const googleSheetsApi = await getGoogleSheetsApiClient(); +const checkIfUserHasSignedAnyCLA = async () => { + const foundIndividualCLA = await checkIfIndividualCLAFound(); + if (foundIndividualCLA) { + return true; + } - return googleSheetsApi.spreadsheets.values.get({ - spreadsheetId: sheetId, - range: cellRanges, - }); + const foundCorporateCLA = await checkIfCorporateCLAFound(); + return foundCorporateCLA; }; -const getGoogleSheetsApiClient = async () => { - const googleConfigFilePath = "GoogleConfig.json"; - fs.writeFileSync(googleConfigFilePath, GOOGLE_SHEETS_INFO.APIKeys); +const getCommentBody = (hasSignedCLA, errorFoundOnCLACheck) => { + const commentTemplate = fs.readFileSync( + "./.github/actions/check-for-CLA/templates/pullRequestComment.hbs", + "utf-8" + ); - const auth = new google.auth.GoogleAuth({ - keyFile: googleConfigFilePath, - scopes: ["https://www.googleapis.com/auth/spreadsheets"], + const getCommentFromTemplate = Handlebars.compile(commentTemplate); + const commentBody = getCommentFromTemplate({ + errorCla: errorFoundOnCLACheck, + hasCla: hasSignedCLA, + username: PULL_REQUST_INFO.username, + contributorsUrl: CONTRIBUTORS_URL, }); - const googleAuthClient = await auth.getClient(); - return google.sheets({ version: "v4", auth: googleAuthClient }); + return commentBody; }; const postCommentOnPullRequest = async (hasSignedCLA, errorFoundOnCLACheck) => { @@ -136,21 +137,17 @@ const postCommentOnPullRequest = async (hasSignedCLA, errorFoundOnCLACheck) => { ); }; -const getCommentBody = (hasSignedCLA, errorFoundOnCLACheck) => { - const commentTemplate = fs.readFileSync( - "./.github/actions/check-for-CLA/templates/pullRequestComment.hbs", - "utf-8" - ); +const main = async () => { + let hasSignedCLA; + let errorFoundOnCLACheck; - const getCommentFromTemplate = Handlebars.compile(commentTemplate); - const commentBody = getCommentFromTemplate({ - errorCla: errorFoundOnCLACheck, - hasCla: hasSignedCLA, - username: PULL_REQUST_INFO.username, - contributorsUrl: CONTRIBUTORS_URL, - }); + try { + hasSignedCLA = await checkIfUserHasSignedAnyCLA(); + } catch (error) { + errorFoundOnCLACheck = error.toString(); + } - return commentBody; + await postCommentOnPullRequest(hasSignedCLA, errorFoundOnCLACheck); }; main(); diff --git a/.github/actions/check-for-CLA/package.json b/.github/actions/check-for-CLA/package.json new file mode 100644 index 000000000000..d04d9c10a6d3 --- /dev/null +++ b/.github/actions/check-for-CLA/package.json @@ -0,0 +1,21 @@ +{ + "name": "@cesium/check-for-cla", + "version": "0.1.0", + "main": "index.js", + "dependencies": { + "@octokit/core": "^6.1.2", + "fs-extra": "^11.2.0", + "googleapis": "^137.1.0", + "handlebars": "^4.7.8" + }, + "type": "module", + "repository": { + "type": "git", + "url": "git+https://github.com/CesiumGS/cesium.git" + }, + "license": "Apache-2.0", + "author": { + "name": "Cesium GS, Inc.", + "url": "https://cesium.com" + } +} diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 79a23b3a1a2b..60ffd52516e6 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -16,9 +16,11 @@ jobs: with: node-version: '20' - name: install npm packages - run: npm install googleapis @octokit/core handlebars fs-extra + working-directory: ./.github/actions/check-for-CLA + run: npm install - name: run script - run: node .github/actions/check-for-CLA/index.js + working-directory: ./.github/actions/check-for-CLA + run: node index.js env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PULL_REQUEST_ID: ${{ github.event.number }} diff --git a/Apps/.eslintrc.json b/Apps/.eslintrc.json deleted file mode 100644 index e646ee82716f..000000000000 --- a/Apps/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "../packages/.eslintrc.json" -} diff --git a/Apps/Sandcastle/.eslintrc.json b/Apps/Sandcastle/.eslintrc.json deleted file mode 100644 index daf23f0bdcdf..000000000000 --- a/Apps/Sandcastle/.eslintrc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "extends": "../.eslintrc.json", - "env": { - "amd": true - }, - "globals": { - "JSON": true, - "require": true, - "console": true, - "Sandcastle": true, - "Cesium": true - }, - "parserOptions": { - "sourceType": "script" - }, - "rules": { - "no-alert": ["off"], - "no-unused-vars": ["off"] - }, - "overrides": [ - { - "files": [ - "load-cesium-es6.js" - ], - "parserOptions": { - "sourceType": "module" - } - } - ] -} diff --git a/Apps/TimelineDemo/.eslintrc.json b/Apps/TimelineDemo/.eslintrc.json deleted file mode 100644 index 237b3b29d43c..000000000000 --- a/Apps/TimelineDemo/.eslintrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../.eslintrc.json", - "env": { - "amd": true - }, - "parserOptions": { - "sourceType": "script" - } -} diff --git a/Apps/TimelineDemo/TimelineDemo.js b/Apps/TimelineDemo/TimelineDemo.js index f03d16c34db7..5f865c99146d 100644 --- a/Apps/TimelineDemo/TimelineDemo.js +++ b/Apps/TimelineDemo/TimelineDemo.js @@ -1,6 +1,5 @@ define(["dijit/dijit", "dojo"], function (dijit, dojo) { "use strict"; - /* global Cesium */ const defined = Cesium.defined; const Clock = Cesium.Clock; diff --git a/Specs/.eslintrc.json b/Specs/.eslintrc.json deleted file mode 100644 index 926cc63cb4a5..000000000000 --- a/Specs/.eslintrc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "extends": "../packages/.eslintrc.json", - "env": { - "jasmine": true - }, - "rules": { - "no-self-assign": "off" - }, - "overrides": [ - { - "files": [ - "karma.conf.cjs", - "test.cjs" - ], - "parserOptions": { - "sourceType": "script" - } - } - ] -} diff --git a/Specs/TestWorkers/.eslintrc.json b/Specs/TestWorkers/.eslintrc.json deleted file mode 100644 index cfa5954c554a..000000000000 --- a/Specs/TestWorkers/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "cesium/browser", - "plugins": [ - "es" - ] -} \ No newline at end of file diff --git a/Specs/e2e/.eslintrc.json b/Specs/e2e/.eslintrc.json deleted file mode 100644 index 01ed4242fa79..000000000000 --- a/Specs/e2e/.eslintrc.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "root": true, - "extends": "cesium", - "globals": { - "Cesium": true - }, - "env": { - "browser": true, - "node": true - }, - "plugins": [ - "html", - "es" - ], - "rules": { - "no-unused-vars": "off" - }, - "parserOptions": { - "sourceType": "module" - }, - "overrides": [ - { - "files": [ - "playwright.config.js" - ] - } - ] -} diff --git a/Specs/karma.conf.cjs b/Specs/karma.conf.cjs index d368206fef3a..86a6933f189c 100644 --- a/Specs/karma.conf.cjs +++ b/Specs/karma.conf.cjs @@ -1,4 +1,3 @@ -/*eslint-env node*/ "use strict"; module.exports = function (config) { diff --git a/Specs/test.cjs b/Specs/test.cjs index f248664a0c07..e0daa6746651 100644 --- a/Specs/test.cjs +++ b/Specs/test.cjs @@ -1,4 +1,3 @@ -/*eslint-env node*/ "use strict"; const assert = require("node:assert"); diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 000000000000..c8ec3d9bd70c --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,106 @@ +import globals from "globals"; +import html from "eslint-plugin-html"; +import configCesium from "eslint-config-cesium"; + +export default [ + { + ignores: [ + "**/Build/", + "Documentation/**/*", + "Source/*", + "**/ThirdParty/", + "Tools/**/*", + "index.html", + "index.release.html", + "Apps/HelloWorld.html", + "Apps/Sandcastle/jsHintOptions.js", + "Apps/Sandcastle/gallery/gallery-index.js", + "packages/engine/Source/Scene/GltfPipeline/**/*", + "packages/engine/Source/Shaders/**/*", + "Specs/jasmine/*", + "**/*/SpecList.js", + ], + }, + { + ...configCesium.configs.recommended, + languageOptions: { + sourceType: "module", + }, + }, + { + files: ["**/*.cjs"], + ...configCesium.configs.node, + }, + { + files: [".github/**/*.js", "scripts/**/*.js", "gulpfile.js", "server.js"], + ...configCesium.configs.node, + languageOptions: { + ...configCesium.configs.node.languageOptions, + sourceType: "module", + }, + }, + { + files: ["packages/**/*.js", "Apps/**/*.js", "Specs/**/*.js", "**/*.html"], + ...configCesium.configs.browser, + plugins: { html }, + rules: { + ...configCesium.configs.browser.rules, + "no-unused-vars": [ + "error", + { vars: "all", args: "none", caughtErrors: "none" }, + ], + }, + }, + { + files: ["Apps/Sandcastle/**/*", "Apps/TimelineDemo/**/*"], + languageOptions: { + sourceType: "script", + globals: { + ...globals.amd, + JSON: true, + console: true, + Sandcastle: true, + Cesium: true, + }, + }, + rules: { + "no-alert": ["off"], + "no-unused-vars": ["off"], + }, + }, + { + files: ["Apps/Sandcastle/load-cesium-es6.js"], + languageOptions: { + sourceType: "module", + }, + }, + { + files: ["Specs/**/*", "packages/**/Specs/**/*"], + languageOptions: { + globals: { + ...globals.jasmine, + }, + }, + rules: { + "no-self-assign": "off", + }, + }, + { + files: ["Specs/e2e/**/*"], + languageOptions: { + globals: { + ...globals.node, + Cesium: true, + }, + }, + rules: { + "no-unused-vars": "off", + }, + }, + { + files: [".github/**/*"], + rules: { + "n/no-missing-import": "off", + }, + }, +]; diff --git a/gulpfile.js b/gulpfile.js index 9342df599bed..961c76a4a018 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,3 @@ -/*eslint-env node*/ import { writeFileSync, copyFileSync, readFileSync, existsSync } from "fs"; import { readFile, writeFile } from "fs/promises"; import { join, basename, resolve, dirname } from "path"; @@ -330,7 +329,7 @@ async function clocSource() { cmdLine = "npx cloc" + " --quiet --progress-rate=0" + - " Specs/ packages/engine/Specs packages/widget/Specs --exclude-dir=Data --not-match-f=SpecList.js --not-match-f=.eslintrc.json"; + " Specs/ packages/engine/Specs packages/widget/Specs --exclude-dir=Data --not-match-f=SpecList.js --not-match-f=eslint.config.js"; exec(cmdLine, function (error, stdout, stderr) { if (error) { console.log(stderr); @@ -625,7 +624,6 @@ export const makeZip = gulp.series(release, async function createZipFile() { gulp.src( [ "Apps/**", - "Apps/**/.eslintrc.json", "Apps/Sandcastle/.jshintrc", "packages/engine/index.js", "packages/engine/index.d.ts", @@ -638,15 +636,12 @@ export const makeZip = gulp.series(release, async function createZipFile() { "packages/widgets/README.md", "packages/widgets/Source/**", "Source/**", - "Source/**/.eslintrc.json", "Specs/**", - "Specs/**/.eslintrc.json", "ThirdParty/**", + "scripts/**", "favicon.ico", - ".eslintignore", - ".eslintrc.json", ".prettierignore", - "scripts/**", + "eslint.config.js", "gulpfile.js", "server.js", "index.cjs", diff --git a/package.json b/package.json index bb7e8d218f38..8fa9980fa07b 100644 --- a/package.json +++ b/package.json @@ -59,12 +59,11 @@ "cloc": "^2.8.0", "compression": "^1.7.4", "esbuild": "^0.20.0", - "eslint": "^8.56.0", - "eslint-config-cesium": "^10.0.1", - "eslint-plugin-es": "^4.1.0", - "eslint-plugin-html": "^8.0.0", - "eslint-plugin-node": "^11.1.0", + "eslint": "^9.1.1", + "eslint-config-cesium": "^11.0.1", + "eslint-plugin-html": "^8.1.1", "express": "^4.17.1", + "globals": "^15.1.0", "globby": "^14.0.0", "glsl-strip-comments": "^1.0.0", "gulp": "^5.0.0", @@ -119,7 +118,7 @@ "coverage": "gulp coverage", "build-docs": "gulp buildDocs", "build-docs-watch": "gulp buildDocsWatch", - "eslint": "eslint \"./**/*.js\" \"./**/*.cjs\" \"./**/*.html\" --cache --quiet", + "eslint": "eslint \"./**/*.*js\" \"./**/*.html\" --cache --quiet", "make-zip": "gulp makeZip", "markdownlint": "markdownlint \"**/*.md\"", "release": "gulp release", @@ -143,7 +142,7 @@ "prettier-check": "prettier --check --no-config \"**/*\"" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.18.0" }, "lint-staged": { "*.{js,cjs,mjs,css,html}": [ diff --git a/packages/.eslintrc.json b/packages/.eslintrc.json deleted file mode 100644 index 09c9b3fe9483..000000000000 --- a/packages/.eslintrc.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "root": true, - "extends": [ - "cesium/browser" - ], - "plugins": [ - "html", - "es" - ], - "rules": { - "no-unused-vars": ["error", {"vars": "all", "args": "none"}] - } -} diff --git a/packages/engine/Source/Core/Math.js b/packages/engine/Source/Core/Math.js index a8f5e57d681f..59ae199d8dc0 100644 --- a/packages/engine/Source/Core/Math.js +++ b/packages/engine/Source/Core/Math.js @@ -205,7 +205,6 @@ CesiumMath.FOUR_GIGABYTES = 4 * 1024 * 1024 * 1024; * @param {number} value The value to return the sign of. * @returns {number} The sign of value. */ -// eslint-disable-next-line es/no-math-sign CesiumMath.sign = defaultValue(Math.sign, function sign(value) { value = +value; // coerce to number if (value === 0 || value !== value) { @@ -292,7 +291,6 @@ CesiumMath.normalize = function (value, rangeMinimum, rangeMaximum) { * @param {number} value The number whose hyperbolic sine is to be returned. * @returns {number} The hyperbolic sine of value. */ -// eslint-disable-next-line es/no-math-sinh CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) { return (Math.exp(value) - Math.exp(-value)) / 2.0; }); @@ -317,7 +315,6 @@ CesiumMath.sinh = defaultValue(Math.sinh, function sinh(value) { * @param {number} value The number whose hyperbolic cosine is to be returned. * @returns {number} The hyperbolic cosine of value. */ -// eslint-disable-next-line es/no-math-cosh CesiumMath.cosh = defaultValue(Math.cosh, function cosh(value) { return (Math.exp(value) + Math.exp(-value)) / 2.0; }); @@ -1034,7 +1031,6 @@ CesiumMath.logBase = function (number, base) { * @param {number} [number] The number. * @returns {number} The result. */ -// eslint-disable-next-line es/no-math-cbrt CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) { const result = Math.pow(Math.abs(number), 1.0 / 3.0); return number < 0.0 ? -result : result; @@ -1047,7 +1043,6 @@ CesiumMath.cbrt = defaultValue(Math.cbrt, function cbrt(number) { * @param {number} number The number. * @returns {number} The result. */ -// eslint-disable-next-line es/no-math-log2 CesiumMath.log2 = defaultValue(Math.log2, function log2(number) { return Math.log(number) * Math.LOG2E; }); diff --git a/packages/engine/Specs/.eslintrc.json b/packages/engine/Specs/.eslintrc.json deleted file mode 100644 index 5b6725648bfa..000000000000 --- a/packages/engine/Specs/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../.eslintrc.json", - "env": { - "jasmine": true - }, - "rules": { - "no-self-assign": "off", - "no-duplicate-imports": "off" - } -} \ No newline at end of file diff --git a/packages/engine/Specs/Core/Cartesian3Spec.js b/packages/engine/Specs/Core/Cartesian3Spec.js index 73e89bcf3e54..463be5cfc4bf 100644 --- a/packages/engine/Specs/Core/Cartesian3Spec.js +++ b/packages/engine/Specs/Core/Cartesian3Spec.js @@ -1,6 +1,10 @@ -import { Cartesian3, Cartographic, Ellipsoid } from "../../index.js"; +import { + Cartesian3, + Cartographic, + Ellipsoid, + Math as CesiumMath, +} from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import createPackableArraySpecs from "../../../../Specs/createPackableArraySpecs.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; diff --git a/packages/engine/Specs/Core/Cartesian4Spec.js b/packages/engine/Specs/Core/Cartesian4Spec.js index 478ec96fdf3f..b9146991493a 100644 --- a/packages/engine/Specs/Core/Cartesian4Spec.js +++ b/packages/engine/Specs/Core/Cartesian4Spec.js @@ -1,6 +1,5 @@ -import { Cartesian4, Color } from "../../index.js"; +import { Cartesian4, Color, Math as CesiumMath } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import createPackableArraySpecs from "../../../../Specs/createPackableArraySpecs.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; diff --git a/packages/engine/Specs/Core/CartographicSpec.js b/packages/engine/Specs/Core/CartographicSpec.js index 9aaf8bc8a03b..98cabba70533 100644 --- a/packages/engine/Specs/Core/CartographicSpec.js +++ b/packages/engine/Specs/Core/CartographicSpec.js @@ -1,6 +1,9 @@ -import { Cartesian3, Cartographic, Ellipsoid } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + Cartographic, + Ellipsoid, + Math as CesiumMath, +} from "../../index.js"; describe("Core/Cartographic", function () { const surfaceCartesian = new Cartesian3( diff --git a/packages/engine/Specs/Core/CatmullRomSplineSpec.js b/packages/engine/Specs/Core/CatmullRomSplineSpec.js index 8db028f94cb3..4dd08e164df3 100644 --- a/packages/engine/Specs/Core/CatmullRomSplineSpec.js +++ b/packages/engine/Specs/Core/CatmullRomSplineSpec.js @@ -1,6 +1,9 @@ -import { Cartesian3, CatmullRomSpline, HermiteSpline } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + CatmullRomSpline, + HermiteSpline, + Math as CesiumMath, +} from "../../index.js"; describe("Core/CatmullRomSpline", function () { let points; diff --git a/packages/engine/Specs/Core/CircleGeometrySpec.js b/packages/engine/Specs/Core/CircleGeometrySpec.js index dee09cac9f5b..78cc3929c4df 100644 --- a/packages/engine/Specs/Core/CircleGeometrySpec.js +++ b/packages/engine/Specs/Core/CircleGeometrySpec.js @@ -2,11 +2,10 @@ import { Cartesian3, CircleGeometry, Ellipsoid, + Math as CesiumMath, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/CircleGeometry", function () { diff --git a/packages/engine/Specs/Core/ColorSpec.js b/packages/engine/Specs/Core/ColorSpec.js index 11cb942a7227..96ab7d124170 100644 --- a/packages/engine/Specs/Core/ColorSpec.js +++ b/packages/engine/Specs/Core/ColorSpec.js @@ -1,6 +1,5 @@ -import { Cartesian4, Color } from "../../index.js"; +import { Cartesian4, Color, Math as CesiumMath } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/Color", function () { diff --git a/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js b/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js index 820b4b33b8a5..11e767ab5081 100644 --- a/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js +++ b/packages/engine/Specs/Core/CoplanarPolygonGeometrySpec.js @@ -2,12 +2,11 @@ import { Cartesian3, Cartesian2, CoplanarPolygonGeometry, + Math as CesiumMath, Ellipsoid, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/CoplanarPolygonGeometry", function () { diff --git a/packages/engine/Specs/Core/CorridorGeometrySpec.js b/packages/engine/Specs/Core/CorridorGeometrySpec.js index f11f558cd7f2..c8d4c6efd2d9 100644 --- a/packages/engine/Specs/Core/CorridorGeometrySpec.js +++ b/packages/engine/Specs/Core/CorridorGeometrySpec.js @@ -4,12 +4,11 @@ import { CorridorGeometry, Ellipsoid, GeometryOffsetAttribute, + Math as CesiumMath, Rectangle, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/CorridorGeometry", function () { diff --git a/packages/engine/Specs/Core/CubicRealPolynomialSpec.js b/packages/engine/Specs/Core/CubicRealPolynomialSpec.js index 3ee4bca475bd..5673df7ff91b 100644 --- a/packages/engine/Specs/Core/CubicRealPolynomialSpec.js +++ b/packages/engine/Specs/Core/CubicRealPolynomialSpec.js @@ -1,6 +1,4 @@ -import { CubicRealPolynomial } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { CubicRealPolynomial, Math as CesiumMath } from "../../index.js"; describe("Core/CubicRealPolynomial", function () { it("discriminant throws without a", function () { diff --git a/packages/engine/Specs/Core/EllipseGeometrySpec.js b/packages/engine/Specs/Core/EllipseGeometrySpec.js index 6aecd97936c3..06a1463fb84b 100644 --- a/packages/engine/Specs/Core/EllipseGeometrySpec.js +++ b/packages/engine/Specs/Core/EllipseGeometrySpec.js @@ -3,12 +3,11 @@ import { EllipseGeometry, Ellipsoid, GeometryOffsetAttribute, + Math as CesiumMath, Rectangle, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/EllipseGeometry", function () { diff --git a/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js b/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js index e3a52f862aa8..3b7c1edb274f 100644 --- a/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js +++ b/packages/engine/Specs/Core/EllipsoidGeodesicSpec.js @@ -1,6 +1,9 @@ -import { Cartographic, Ellipsoid, EllipsoidGeodesic } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartographic, + Ellipsoid, + EllipsoidGeodesic, + Math as CesiumMath, +} from "../../index.js"; describe("Core/EllipsoidGeodesic", function () { it("throws without start", function () { diff --git a/packages/engine/Specs/Core/EllipsoidGeometrySpec.js b/packages/engine/Specs/Core/EllipsoidGeometrySpec.js index 1e175fe763ad..7800e7afbba2 100644 --- a/packages/engine/Specs/Core/EllipsoidGeometrySpec.js +++ b/packages/engine/Specs/Core/EllipsoidGeometrySpec.js @@ -2,11 +2,10 @@ import { Cartesian3, EllipsoidGeometry, GeometryOffsetAttribute, + Math as CesiumMath, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/EllipsoidGeometry", function () { diff --git a/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js b/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js index 691d16402b54..e24be1fefa9f 100644 --- a/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js +++ b/packages/engine/Specs/Core/EllipsoidOutlineGeometrySpec.js @@ -2,9 +2,9 @@ import { Cartesian3, EllipsoidOutlineGeometry, GeometryOffsetAttribute, + Math as CesiumMath, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/EllipsoidOutlineGeometry", function () { diff --git a/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js b/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js index 87157adea73d..afc652627b08 100644 --- a/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js +++ b/packages/engine/Specs/Core/EllipsoidRhumbLineSpec.js @@ -4,10 +4,9 @@ import { Ellipsoid, EllipsoidGeodesic, EllipsoidRhumbLine, + Math as CesiumMath, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/EllipsoidRhumbLine", function () { const oneDegree = CesiumMath.RADIANS_PER_DEGREE; const fifteenDegrees = Math.PI / 12; diff --git a/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js b/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js index 6992603a74bd..154d4c502b55 100644 --- a/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js +++ b/packages/engine/Specs/Core/EllipsoidalOccluderSpec.js @@ -4,12 +4,11 @@ import { Ellipsoid, EllipsoidalOccluder, IntersectionTests, + Math as CesiumMath, Ray, Rectangle, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/EllipsoidalOccluder", function () { it("uses ellipsoid", function () { const ellipsoid = new Ellipsoid(2.0, 3.0, 4.0); diff --git a/packages/engine/Specs/Core/FrustumGeometrySpec.js b/packages/engine/Specs/Core/FrustumGeometrySpec.js index b0073b167847..24af379c2583 100644 --- a/packages/engine/Specs/Core/FrustumGeometrySpec.js +++ b/packages/engine/Specs/Core/FrustumGeometrySpec.js @@ -1,13 +1,12 @@ import { Cartesian3, FrustumGeometry, + Math as CesiumMath, PerspectiveFrustum, Quaternion, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/FrustumGeometry", function () { diff --git a/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js b/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js index bb4d2643d63c..e5435ea98dd7 100644 --- a/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js +++ b/packages/engine/Specs/Core/FrustumOutlineGeometrySpec.js @@ -1,13 +1,12 @@ import { Cartesian3, FrustumOutlineGeometry, + Math as CesiumMath, PerspectiveFrustum, Quaternion, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/FrustumOutlineGeometry", function () { diff --git a/packages/engine/Specs/Core/GeographicProjectionSpec.js b/packages/engine/Specs/Core/GeographicProjectionSpec.js index ba405515f811..19f890867cb4 100644 --- a/packages/engine/Specs/Core/GeographicProjectionSpec.js +++ b/packages/engine/Specs/Core/GeographicProjectionSpec.js @@ -3,10 +3,9 @@ import { Cartographic, Ellipsoid, GeographicProjection, + Math as CesiumMath, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/GeographicProjection", function () { it("construct0", function () { const projection = new GeographicProjection(); diff --git a/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js b/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js index 53ba59db214f..e08cc000e89b 100644 --- a/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js +++ b/packages/engine/Specs/Core/GeographicTilingSchemeSpec.js @@ -3,12 +3,11 @@ import { Cartographic, GeographicProjection, GeographicTilingScheme, + Math as CesiumMath, Rectangle, TilingScheme, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/GeographicTilingScheme", function () { it("conforms to TilingScheme interface.", function () { expect(GeographicTilingScheme).toConformToInterface(TilingScheme); diff --git a/packages/engine/Specs/Core/GeometryPipelineSpec.js b/packages/engine/Specs/Core/GeometryPipelineSpec.js index 10ccf984273b..4cba2dd3c472 100644 --- a/packages/engine/Specs/Core/GeometryPipelineSpec.js +++ b/packages/engine/Specs/Core/GeometryPipelineSpec.js @@ -14,6 +14,7 @@ import { GeometryInstance, GeometryPipeline, GeometryType, + Math as CesiumMath, Matrix4, PolygonGeometry, PrimitiveType, @@ -21,8 +22,6 @@ import { VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/GeometryPipeline", function () { it("converts triangles to wireframe in place", function () { const geometry = GeometryPipeline.toWireframe( diff --git a/packages/engine/Specs/Core/GeometrySpec.js b/packages/engine/Specs/Core/GeometrySpec.js index 2c80342e2382..c07668cb52ea 100644 --- a/packages/engine/Specs/Core/GeometrySpec.js +++ b/packages/engine/Specs/Core/GeometrySpec.js @@ -6,12 +6,11 @@ import { Geometry, GeometryAttribute, GeometryType, + Math as CesiumMath, PrimitiveType, Rectangle, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/Geometry", function () { it("constructor", function () { const attributes = { diff --git a/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js b/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js index 5ddf66bbdf03..25bc601ff706 100644 --- a/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js +++ b/packages/engine/Specs/Core/GoogleEarthEnterpriseTerrainDataSpec.js @@ -4,13 +4,12 @@ import { Ellipsoid, GeographicTilingScheme, GoogleEarthEnterpriseTerrainData, + Math as CesiumMath, Rectangle, TerrainData, TerrainMesh, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/GoogleEarthEnterpriseTerrainData", function () { const sizeOfUint8 = Uint8Array.BYTES_PER_ELEMENT; const sizeOfUint16 = Uint16Array.BYTES_PER_ELEMENT; diff --git a/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js b/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js index d308b26210c8..84af45fa9cb9 100644 --- a/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js +++ b/packages/engine/Specs/Core/GroundPolylineGeometrySpec.js @@ -6,11 +6,10 @@ import { Ellipsoid, GeographicProjection, GroundPolylineGeometry, + Math as CesiumMath, WebMercatorProjection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/GroundPolylineGeometry", function () { diff --git a/packages/engine/Specs/Core/HeadingPitchRollSpec.js b/packages/engine/Specs/Core/HeadingPitchRollSpec.js index 9cb6dbf4fb3c..a65df32d5633 100644 --- a/packages/engine/Specs/Core/HeadingPitchRollSpec.js +++ b/packages/engine/Specs/Core/HeadingPitchRollSpec.js @@ -1,6 +1,8 @@ -import { HeadingPitchRoll, Quaternion } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + HeadingPitchRoll, + Math as CesiumMath, + Quaternion, +} from "../../index.js"; describe("Core/HeadingPitchRoll", function () { const deg2rad = CesiumMath.RADIANS_PER_DEGREE; diff --git a/packages/engine/Specs/Core/HermiteSplineSpec.js b/packages/engine/Specs/Core/HermiteSplineSpec.js index 28307fad357c..3b04ea682381 100644 --- a/packages/engine/Specs/Core/HermiteSplineSpec.js +++ b/packages/engine/Specs/Core/HermiteSplineSpec.js @@ -1,6 +1,9 @@ -import { Cartesian3, HermiteSpline, Quaternion } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + HermiteSpline, + Math as CesiumMath, + Quaternion, +} from "../../index.js"; describe("Core/HermiteSpline", function () { let points; diff --git a/packages/engine/Specs/Core/IauOrientationAxesSpec.js b/packages/engine/Specs/Core/IauOrientationAxesSpec.js index c43d5c5e4242..8d220d4f1a1c 100644 --- a/packages/engine/Specs/Core/IauOrientationAxesSpec.js +++ b/packages/engine/Specs/Core/IauOrientationAxesSpec.js @@ -3,11 +3,10 @@ import { IauOrientationAxes, JulianDate, Matrix3, + Math as CesiumMath, TimeStandard, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/IauOrientationAxes", function () { it("compute ICRF to Moon Fixed", function () { const date = new JulianDate(2451545.0, -32.184, TimeStandard.TAI); diff --git a/packages/engine/Specs/Core/IndexDatatypeSpec.js b/packages/engine/Specs/Core/IndexDatatypeSpec.js index 636b59e44dac..a3a8132643bc 100644 --- a/packages/engine/Specs/Core/IndexDatatypeSpec.js +++ b/packages/engine/Specs/Core/IndexDatatypeSpec.js @@ -1,6 +1,4 @@ -import { IndexDatatype } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { IndexDatatype, Math as CesiumMath } from "../../index.js"; describe("Core/IndexDatatype", function () { it("validate validates input", function () { diff --git a/packages/engine/Specs/Core/IntersectionTestsSpec.js b/packages/engine/Specs/Core/IntersectionTestsSpec.js index 8e884ace5153..8b1a1eb776f3 100644 --- a/packages/engine/Specs/Core/IntersectionTestsSpec.js +++ b/packages/engine/Specs/Core/IntersectionTestsSpec.js @@ -3,12 +3,11 @@ import { Cartesian3, Ellipsoid, IntersectionTests, + Math as CesiumMath, Plane, Ray, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/IntersectionTests", function () { it("rayPlane intersects", function () { const ray = new Ray( diff --git a/packages/engine/Specs/Core/JulianDateSpec.js b/packages/engine/Specs/Core/JulianDateSpec.js index 751cb95e68e0..4a034a293659 100644 --- a/packages/engine/Specs/Core/JulianDateSpec.js +++ b/packages/engine/Specs/Core/JulianDateSpec.js @@ -1,12 +1,11 @@ import { Iso8601, JulianDate, + Math as CesiumMath, TimeConstants, TimeStandard, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/JulianDate", function () { // All exact Julian Dates found using NASA's Time Conversion Tool: http://ssd.jpl.nasa.gov/tc.cgi it("Construct a default date", function () { diff --git a/packages/engine/Specs/Core/Matrix2Spec.js b/packages/engine/Specs/Core/Matrix2Spec.js index 839b54df2fd0..540b550d0c20 100644 --- a/packages/engine/Specs/Core/Matrix2Spec.js +++ b/packages/engine/Specs/Core/Matrix2Spec.js @@ -1,6 +1,4 @@ -import { Cartesian2, Matrix2 } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { Cartesian2, Math as CesiumMath, Matrix2 } from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; import createPackableArraySpecs from "../../../../Specs/createPackableArraySpecs.js"; diff --git a/packages/engine/Specs/Core/Matrix3Spec.js b/packages/engine/Specs/Core/Matrix3Spec.js index ff05dd3e084d..e0ada12c1755 100644 --- a/packages/engine/Specs/Core/Matrix3Spec.js +++ b/packages/engine/Specs/Core/Matrix3Spec.js @@ -1,12 +1,11 @@ import { Cartesian3, HeadingPitchRoll, + Math as CesiumMath, Matrix3, Quaternion, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; import createPackableArraySpecs from "../../../../Specs/createPackableArraySpecs.js"; diff --git a/packages/engine/Specs/Core/Matrix4Spec.js b/packages/engine/Specs/Core/Matrix4Spec.js index 3109a8220d94..ae2c6fa15a81 100644 --- a/packages/engine/Specs/Core/Matrix4Spec.js +++ b/packages/engine/Specs/Core/Matrix4Spec.js @@ -1,6 +1,7 @@ import { Cartesian3, Cartesian4, + Math as CesiumMath, Matrix3, Matrix4, Quaternion, @@ -8,8 +9,6 @@ import { RuntimeError, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; import createPackableArraySpecs from "../../../../Specs/createPackableArraySpecs.js"; diff --git a/packages/engine/Specs/Core/OccluderSpec.js b/packages/engine/Specs/Core/OccluderSpec.js index 798f850ea84a..d4e18ff9b12e 100644 --- a/packages/engine/Specs/Core/OccluderSpec.js +++ b/packages/engine/Specs/Core/OccluderSpec.js @@ -2,13 +2,12 @@ import { BoundingSphere, Cartesian3, Ellipsoid, + Math as CesiumMath, Occluder, Rectangle, Visibility, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/Occluder", function () { it("throws an exception during construction (1 of 3)", function () { expect(function () { diff --git a/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js b/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js index 37d506dfc382..a424c6561c35 100644 --- a/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js +++ b/packages/engine/Specs/Core/OrientedBoundingBoxSpec.js @@ -4,6 +4,7 @@ import { Cartesian4, Ellipsoid, Intersect, + Math as CesiumMath, Matrix3, Matrix4, Occluder, @@ -13,8 +14,6 @@ import { Rectangle, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/OrientedBoundingBox", function () { diff --git a/packages/engine/Specs/Core/OrthographicFrustumSpec.js b/packages/engine/Specs/Core/OrthographicFrustumSpec.js index 1a65cbaba34f..fa90747bbd10 100644 --- a/packages/engine/Specs/Core/OrthographicFrustumSpec.js +++ b/packages/engine/Specs/Core/OrthographicFrustumSpec.js @@ -2,12 +2,11 @@ import { Cartesian2, Cartesian3, Cartesian4, + Math as CesiumMath, Matrix4, OrthographicFrustum, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/OrthographicFrustum", function () { diff --git a/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js b/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js index 9f87f5f5ad00..4040ffc5df38 100644 --- a/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js +++ b/packages/engine/Specs/Core/OrthographicOffCenterFrustumSpec.js @@ -2,12 +2,11 @@ import { Cartesian2, Cartesian3, Cartesian4, + Math as CesiumMath, Matrix4, OrthographicOffCenterFrustum, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/OrthographicOffCenterFrustum", function () { let frustum, planes; diff --git a/packages/engine/Specs/Core/PerspectiveFrustumSpec.js b/packages/engine/Specs/Core/PerspectiveFrustumSpec.js index afea2402bfd2..3e3c16fdcf1a 100644 --- a/packages/engine/Specs/Core/PerspectiveFrustumSpec.js +++ b/packages/engine/Specs/Core/PerspectiveFrustumSpec.js @@ -2,12 +2,11 @@ import { Cartesian2, Cartesian3, Cartesian4, + Math as CesiumMath, Matrix4, PerspectiveFrustum, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/PerspectiveFrustum", function () { diff --git a/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js b/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js index 7da3ff6afacb..3d4201bff5ca 100644 --- a/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js +++ b/packages/engine/Specs/Core/PerspectiveOffCenterFrustumSpec.js @@ -2,12 +2,11 @@ import { Cartesian2, Cartesian3, Cartesian4, + Math as CesiumMath, Matrix4, PerspectiveOffCenterFrustum, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/PerspectiveOffCenterFrustum", function () { let frustum, planes; diff --git a/packages/engine/Specs/Core/PlaneSpec.js b/packages/engine/Specs/Core/PlaneSpec.js index 0d573a0f0b24..cd41d22d07b0 100644 --- a/packages/engine/Specs/Core/PlaneSpec.js +++ b/packages/engine/Specs/Core/PlaneSpec.js @@ -1,13 +1,12 @@ import { Cartesian3, Cartesian4, + Math as CesiumMath, Matrix3, Matrix4, Plane, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/Plane", function () { it("constructs", function () { const normal = Cartesian3.UNIT_X; diff --git a/packages/engine/Specs/Core/PolygonGeometrySpec.js b/packages/engine/Specs/Core/PolygonGeometrySpec.js index 33c92d35032f..14d51ec71915 100644 --- a/packages/engine/Specs/Core/PolygonGeometrySpec.js +++ b/packages/engine/Specs/Core/PolygonGeometrySpec.js @@ -7,13 +7,12 @@ import { Ellipsoid, GeometryOffsetAttribute, GeometryPipeline, + Math as CesiumMath, PolygonGeometry, Rectangle, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/PolygonGeometry", function () { diff --git a/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js b/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js index 582fbbd8c073..92838d833a14 100644 --- a/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js +++ b/packages/engine/Specs/Core/PolygonOutlineGeometrySpec.js @@ -4,11 +4,10 @@ import { Cartesian3, Ellipsoid, GeometryOffsetAttribute, + Math as CesiumMath, PolygonOutlineGeometry, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/PolygonOutlineGeometry", function () { diff --git a/packages/engine/Specs/Core/PolygonPipelineSpec.js b/packages/engine/Specs/Core/PolygonPipelineSpec.js index 77823cb0f24e..b39594523eca 100644 --- a/packages/engine/Specs/Core/PolygonPipelineSpec.js +++ b/packages/engine/Specs/Core/PolygonPipelineSpec.js @@ -2,12 +2,11 @@ import { Cartesian2, Cartesian3, Ellipsoid, + Math as CesiumMath, PolygonPipeline, WindingOrder, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/PolygonPipeline", function () { beforeEach(function () { CesiumMath.setRandomNumberSeed(0.0); diff --git a/packages/engine/Specs/Core/PolylineGeometrySpec.js b/packages/engine/Specs/Core/PolylineGeometrySpec.js index 3ac021c212c3..46f0bf04b4d1 100644 --- a/packages/engine/Specs/Core/PolylineGeometrySpec.js +++ b/packages/engine/Specs/Core/PolylineGeometrySpec.js @@ -1,14 +1,15 @@ import { + ArcType, Cartesian3, Color, + defaultValue, Ellipsoid, + Math as CesiumMath, PolylineGeometry, VertexFormat, } from "../../index.js"; -import { ArcType, defaultValue } from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; -import CesiumMath from "../../Source/Core/Math.js"; describe("Core/PolylineGeometry", function () { it("constructor throws with no positions", function () { diff --git a/packages/engine/Specs/Core/PolylinePipelineSpec.js b/packages/engine/Specs/Core/PolylinePipelineSpec.js index cd1e1ca60897..2c8d62b014e1 100644 --- a/packages/engine/Specs/Core/PolylinePipelineSpec.js +++ b/packages/engine/Specs/Core/PolylinePipelineSpec.js @@ -1,12 +1,11 @@ import { Cartesian3, Ellipsoid, + Math as CesiumMath, PolylinePipeline, Transforms, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/PolylinePipeline", function () { it("wrapLongitude", function () { const positions = Cartesian3.fromDegreesArray([ diff --git a/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js b/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js index e3956505a9aa..283e769fab98 100644 --- a/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js +++ b/packages/engine/Specs/Core/QuadraticRealPolynomialSpec.js @@ -1,5 +1,4 @@ -import { QuadraticRealPolynomial } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; +import { Math as CesiumMath, QuadraticRealPolynomial } from "../../index.js"; describe("Core/QuadraticRealPolynomial", function () { it("discriminant throws without a", function () { diff --git a/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js b/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js index 10357fdad702..11097df0680f 100644 --- a/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js +++ b/packages/engine/Specs/Core/QuantizedMeshTerrainDataSpec.js @@ -3,13 +3,12 @@ import { Cartesian3, defined, GeographicTilingScheme, + Math as CesiumMath, QuantizedMeshTerrainData, TerrainData, TerrainMesh, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/QuantizedMeshTerrainData", function () { it("conforms to TerrainData interface", function () { expect(QuantizedMeshTerrainData).toConformToInterface(TerrainData); diff --git a/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js b/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js index 82fcc76e15ab..ff3259814cfd 100644 --- a/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js +++ b/packages/engine/Specs/Core/QuarticRealPolynomialSpec.js @@ -1,5 +1,4 @@ -import { QuarticRealPolynomial } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; +import { Math as CesiumMath, QuarticRealPolynomial } from "../../index.js"; describe("Core/QuarticRealPolynomial", function () { it("discriminant throws without a", function () { diff --git a/packages/engine/Specs/Core/QuaternionSpec.js b/packages/engine/Specs/Core/QuaternionSpec.js index 8bfc1730513c..b5186d4e1eeb 100644 --- a/packages/engine/Specs/Core/QuaternionSpec.js +++ b/packages/engine/Specs/Core/QuaternionSpec.js @@ -1,12 +1,11 @@ import { Cartesian3, HeadingPitchRoll, + Math as CesiumMath, Matrix3, Quaternion, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/Quaternion", function () { diff --git a/packages/engine/Specs/Core/QuaternionSplineSpec.js b/packages/engine/Specs/Core/QuaternionSplineSpec.js index 300ea367ab5d..e8c953433e6e 100644 --- a/packages/engine/Specs/Core/QuaternionSplineSpec.js +++ b/packages/engine/Specs/Core/QuaternionSplineSpec.js @@ -1,6 +1,9 @@ -import { Cartesian3, Quaternion, QuaternionSpline } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + Math as CesiumMath, + Quaternion, + QuaternionSpline, +} from "../../index.js"; describe("Core/QuaternionSpline", function () { let points; diff --git a/packages/engine/Specs/Core/RectangleGeometrySpec.js b/packages/engine/Specs/Core/RectangleGeometrySpec.js index 9a4feb0e0d74..2c2451a18350 100644 --- a/packages/engine/Specs/Core/RectangleGeometrySpec.js +++ b/packages/engine/Specs/Core/RectangleGeometrySpec.js @@ -4,14 +4,13 @@ import { Ellipsoid, GeographicProjection, GeometryOffsetAttribute, + Math as CesiumMath, Matrix2, Rectangle, RectangleGeometry, VertexFormat, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/RectangleGeometry", function () { diff --git a/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js b/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js index ff095efbab0f..47def1381cc5 100644 --- a/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js +++ b/packages/engine/Specs/Core/RectangleOutlineGeometrySpec.js @@ -4,13 +4,12 @@ import { Ellipsoid, GeographicProjection, GeometryOffsetAttribute, + Math as CesiumMath, Matrix2, Rectangle, RectangleOutlineGeometry, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/RectangleOutlineGeometry", function () { diff --git a/packages/engine/Specs/Core/S2CellSpec.js b/packages/engine/Specs/Core/S2CellSpec.js index ae41af333674..57a4f7ef2640 100644 --- a/packages/engine/Specs/Core/S2CellSpec.js +++ b/packages/engine/Specs/Core/S2CellSpec.js @@ -1,8 +1,9 @@ -import { Cartesian3, FeatureDetection, S2Cell } from "../../index.js"; -/* eslint-disable new-cap */ -/* eslint-disable no-undef */ - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + FeatureDetection, + Math as CesiumMath, + S2Cell, +} from "../../index.js"; describe("Core/S2Cell", function () { if (!FeatureDetection.supportsBigInt()) { @@ -15,16 +16,16 @@ describe("Core/S2Cell", function () { }); it("throws for invalid cell ID in constructor", function () { - // eslint-disable-next-line new-cap expect(function () { - S2Cell(BigInt(-1)); + // eslint-disable-next-line no-unused-vars + const cell = new S2Cell(BigInt(-1)); }).toThrowDeveloperError(); }); it("throws for missing cell ID in constructor", function () { - // eslint-disable-next-line new-cap expect(function () { - S2Cell(); + // eslint-disable-next-line no-unused-vars + const cell = new S2Cell(); }).toThrowDeveloperError(); }); diff --git a/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js b/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js index d1d3da5a043c..1375664dfda4 100644 --- a/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js +++ b/packages/engine/Specs/Core/SimplePolylineGeometrySpec.js @@ -4,12 +4,11 @@ import { Cartesian3, Color, Ellipsoid, + Math as CesiumMath, PrimitiveType, SimplePolylineGeometry, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/SimplePolylineGeometry", function () { diff --git a/packages/engine/Specs/Core/SphereGeometrySpec.js b/packages/engine/Specs/Core/SphereGeometrySpec.js index a19991ff77d9..d4aa38e45c5e 100644 --- a/packages/engine/Specs/Core/SphereGeometrySpec.js +++ b/packages/engine/Specs/Core/SphereGeometrySpec.js @@ -1,6 +1,9 @@ -import { Cartesian3, SphereGeometry, VertexFormat } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + Math as CesiumMath, + SphereGeometry, + VertexFormat, +} from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; diff --git a/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js b/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js index 97e4f78023ef..fe20690fb5bb 100644 --- a/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js +++ b/packages/engine/Specs/Core/SphereOutlineGeometrySpec.js @@ -1,7 +1,6 @@ -import { SphereOutlineGeometry } from "../../index.js"; +import { Math as CesiumMath, SphereOutlineGeometry } from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; -import { Math as CesiumMath } from "../../index.js"; describe("Core/SphereOutlineGeometry", function () { it("constructor throws if stackPartitions less than 1", function () { diff --git a/packages/engine/Specs/Core/SphericalSpec.js b/packages/engine/Specs/Core/SphericalSpec.js index 6b174fdd276b..c5515a14f861 100644 --- a/packages/engine/Specs/Core/SphericalSpec.js +++ b/packages/engine/Specs/Core/SphericalSpec.js @@ -1,6 +1,4 @@ -import { Cartesian3, Spherical } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { Cartesian3, Math as CesiumMath, Spherical } from "../../index.js"; describe("Core/Spherical", function () { //Mock object to make sure methods take non-sphericals. diff --git a/packages/engine/Specs/Core/TerrainEncodingSpec.js b/packages/engine/Specs/Core/TerrainEncodingSpec.js index 2407ed32fff0..3856b6a59521 100644 --- a/packages/engine/Specs/Core/TerrainEncodingSpec.js +++ b/packages/engine/Specs/Core/TerrainEncodingSpec.js @@ -4,6 +4,7 @@ import { Cartesian2, Cartesian3, Ellipsoid, + Math as CesiumMath, Matrix4, TerrainEncoding, VerticalExaggeration, @@ -11,8 +12,6 @@ import { Transforms, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/TerrainEncoding", function () { let center; let maximum; diff --git a/packages/engine/Specs/Core/TransformsSpec.js b/packages/engine/Specs/Core/TransformsSpec.js index f1cd9b75b5bb..30306adc4195 100644 --- a/packages/engine/Specs/Core/TransformsSpec.js +++ b/packages/engine/Specs/Core/TransformsSpec.js @@ -9,6 +9,7 @@ import { HeadingPitchRoll, Iau2006XysData, JulianDate, + Math as CesiumMath, Matrix3, Matrix4, Quaternion, @@ -18,8 +19,6 @@ import { Transforms, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/Transforms", function () { const negativeX = new Cartesian4(-1, 0, 0, 0); const negativeY = new Cartesian4(0, -1, 0, 0); diff --git a/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js b/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js index 39c558219364..b96c8720ab31 100644 --- a/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js +++ b/packages/engine/Specs/Core/TridiagonalSystemSolverSpec.js @@ -1,6 +1,8 @@ -import { Cartesian3, TridiagonalSystemSolver } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + Math as CesiumMath, + TridiagonalSystemSolver, +} from "../../index.js"; describe("Core/TridiagonalSystemSolver", function () { it("solve throws exception without lower diagonal", function () { diff --git a/packages/engine/Specs/Core/VideoSynchronizerSpec.js b/packages/engine/Specs/Core/VideoSynchronizerSpec.js index 4993cb4c9c13..2b7e578238d1 100644 --- a/packages/engine/Specs/Core/VideoSynchronizerSpec.js +++ b/packages/engine/Specs/Core/VideoSynchronizerSpec.js @@ -3,11 +3,10 @@ import { FeatureDetection, Iso8601, JulianDate, + Math as CesiumMath, VideoSynchronizer, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import pollToPromise from "../../../../Specs/pollToPromise.js"; describe("Core/VideoSynchronizer", function () { diff --git a/packages/engine/Specs/Core/WallGeometrySpec.js b/packages/engine/Specs/Core/WallGeometrySpec.js index 98af438006c6..d8f430d9f0ab 100644 --- a/packages/engine/Specs/Core/WallGeometrySpec.js +++ b/packages/engine/Specs/Core/WallGeometrySpec.js @@ -1,12 +1,11 @@ import { Cartesian3, Ellipsoid, + Math as CesiumMath, VertexFormat, WallGeometry, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; describe("Core/WallGeometry", function () { diff --git a/packages/engine/Specs/Core/WallOutlineGeometrySpec.js b/packages/engine/Specs/Core/WallOutlineGeometrySpec.js index 28236e4fb74b..42435f0eb47c 100644 --- a/packages/engine/Specs/Core/WallOutlineGeometrySpec.js +++ b/packages/engine/Specs/Core/WallOutlineGeometrySpec.js @@ -1,6 +1,9 @@ -import { Cartesian3, Ellipsoid, WallOutlineGeometry } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + Ellipsoid, + Math as CesiumMath, + WallOutlineGeometry, +} from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; diff --git a/packages/engine/Specs/Core/WebMercatorProjectionSpec.js b/packages/engine/Specs/Core/WebMercatorProjectionSpec.js index 67d1af2fda85..e8c8d0eee172 100644 --- a/packages/engine/Specs/Core/WebMercatorProjectionSpec.js +++ b/packages/engine/Specs/Core/WebMercatorProjectionSpec.js @@ -3,11 +3,10 @@ import { Cartesian3, Cartographic, Ellipsoid, + Math as CesiumMath, WebMercatorProjection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/WebMercatorProjection", function () { it("construct0", function () { const projection = new WebMercatorProjection(); diff --git a/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js b/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js index 71aead9eb659..8c1b325fbeac 100644 --- a/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js +++ b/packages/engine/Specs/Core/WebMercatorTilingSchemeSpec.js @@ -2,14 +2,13 @@ import { Cartesian2, Cartographic, Ellipsoid, + Math as CesiumMath, Rectangle, TilingScheme, WebMercatorProjection, WebMercatorTilingScheme, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Core/WebMercatorTilingScheme", function () { let tilingScheme; beforeEach(function () { diff --git a/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js b/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js index b787cba4f47e..fa7bd7714a78 100644 --- a/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js +++ b/packages/engine/Specs/Core/arrayRemoveDuplicatesSpec.js @@ -1,6 +1,9 @@ -import { arrayRemoveDuplicates, Cartesian3, Spherical } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + arrayRemoveDuplicates, + Cartesian3, + Math as CesiumMath, + Spherical, +} from "../../index.js"; describe("Core/arrayRemoveDuplicates", function () { it("removeDuplicates returns positions if none removed - length === 1", function () { diff --git a/packages/engine/Specs/Core/barycentricCoordinatesSpec.js b/packages/engine/Specs/Core/barycentricCoordinatesSpec.js index 59af6f8c5ed6..3b8f81d46388 100644 --- a/packages/engine/Specs/Core/barycentricCoordinatesSpec.js +++ b/packages/engine/Specs/Core/barycentricCoordinatesSpec.js @@ -1,6 +1,8 @@ -import { barycentricCoordinates, Cartesian3 } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + barycentricCoordinates, + Cartesian3, + Math as CesiumMath, +} from "../../index.js"; describe("Core/barycentricCoordinates", function () { const p0 = new Cartesian3(-1.0, 0.0, 0.0); diff --git a/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js index 9f25bedf82ee..6f455e96ce6e 100644 --- a/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js +++ b/packages/engine/Specs/DataSources/CorridorGeometryUpdaterSpec.js @@ -3,6 +3,7 @@ import { Cartesian3, CornerType, JulianDate, + Math as CesiumMath, TimeInterval, TimeIntervalCollection, ConstantProperty, @@ -16,8 +17,6 @@ import { PrimitiveCollection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createDynamicGeometryUpdaterSpecs from "../../../../Specs/createDynamicGeometryUpdaterSpecs.js"; import createDynamicProperty from "../../../../Specs/createDynamicProperty.js"; import createGeometryUpdaterGroundGeometrySpecs from "../../../../Specs/createGeometryUpdaterGroundGeometrySpecs.js"; diff --git a/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js index 8d3e910ee5b4..15429632c911 100644 --- a/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js +++ b/packages/engine/Specs/DataSources/EllipsoidGeometryUpdaterSpec.js @@ -4,6 +4,7 @@ import { ColorGeometryInstanceAttribute, GeometryOffsetAttribute, JulianDate, + Math as CesiumMath, Quaternion, TimeIntervalCollection, ColorMaterialProperty, @@ -18,8 +19,6 @@ import { PrimitiveCollection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createDynamicGeometryUpdaterSpecs from "../../../../Specs/createDynamicGeometryUpdaterSpecs.js"; import createDynamicProperty from "../../../../Specs/createDynamicProperty.js"; import createGeometryUpdaterSpecs from "../../../../Specs/createGeometryUpdaterSpecs.js"; diff --git a/packages/engine/Specs/DataSources/KmlDataSourceSpec.js b/packages/engine/Specs/DataSources/KmlDataSourceSpec.js index 15f9bfd6c5f5..0fe44e005c4b 100644 --- a/packages/engine/Specs/DataSources/KmlDataSourceSpec.js +++ b/packages/engine/Specs/DataSources/KmlDataSourceSpec.js @@ -16,6 +16,7 @@ import { isDataUri, Iso8601, JulianDate, + Math as CesiumMath, NearFarScalar, PerspectiveFrustum, Rectangle, @@ -38,8 +39,6 @@ import { SceneMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createCamera from "../../../../Specs/createCamera.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js b/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js index 6430da63c06f..da982b9920aa 100644 --- a/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js +++ b/packages/engine/Specs/DataSources/KmlTourFlyToSpec.js @@ -5,10 +5,9 @@ import { KmlCamera, KmlLookAt, KmlTourFlyTo, + Math as CesiumMath, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import pollToPromise from "../../../../Specs/pollToPromise.js"; describe("DataSources/KmlTourFlyTo", function () { diff --git a/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js index 8d1fdea0b76f..7e01741214fa 100644 --- a/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js +++ b/packages/engine/Specs/DataSources/PolygonGeometryUpdaterSpec.js @@ -8,6 +8,7 @@ import { CoplanarPolygonOutlineGeometry, Ellipsoid, JulianDate, + Math as CesiumMath, PolygonGeometry, PolygonHierarchy, PolygonOutlineGeometry, @@ -24,8 +25,6 @@ import { PrimitiveCollection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createDynamicGeometryUpdaterSpecs from "../../../../Specs/createDynamicGeometryUpdaterSpecs.js"; import createDynamicProperty from "../../../../Specs/createDynamicProperty.js"; import createGeometryUpdaterGroundGeometrySpecs from "../../../../Specs/createGeometryUpdaterGroundGeometrySpecs.js"; diff --git a/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js b/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js index 8d376e20dfb0..551b4e52397c 100644 --- a/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js +++ b/packages/engine/Specs/DataSources/RectangleGeometryUpdaterSpec.js @@ -2,6 +2,7 @@ import { ApproximateTerrainHeights, Cartesian3, JulianDate, + Math as CesiumMath, Rectangle, TimeIntervalCollection, ConstantProperty, @@ -12,8 +13,6 @@ import { PrimitiveCollection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createDynamicGeometryUpdaterSpecs from "../../../../Specs/createDynamicGeometryUpdaterSpecs.js"; import createDynamicProperty from "../../../../Specs/createDynamicProperty.js"; import createGeometryUpdaterGroundGeometrySpecs from "../../../../Specs/createGeometryUpdaterGroundGeometrySpecs.js"; diff --git a/packages/engine/Specs/DataSources/RotationSpec.js b/packages/engine/Specs/DataSources/RotationSpec.js index 7603863f99d8..97a5d09b5cd7 100644 --- a/packages/engine/Specs/DataSources/RotationSpec.js +++ b/packages/engine/Specs/DataSources/RotationSpec.js @@ -1,6 +1,9 @@ -import { JulianDate, Rotation, SampledProperty } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + JulianDate, + Math as CesiumMath, + Rotation, + SampledProperty, +} from "../../index.js"; import createPackableSpecs from "../../../../Specs/createPackableSpecs.js"; diff --git a/packages/engine/Specs/DataSources/SampledPropertySpec.js b/packages/engine/Specs/DataSources/SampledPropertySpec.js index 1eb6a80aaa65..8f98ee275074 100644 --- a/packages/engine/Specs/DataSources/SampledPropertySpec.js +++ b/packages/engine/Specs/DataSources/SampledPropertySpec.js @@ -6,13 +6,12 @@ import { JulianDate, LagrangePolynomialApproximation, LinearApproximation, + Math as CesiumMath, Quaternion, TimeInterval, SampledProperty, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("DataSources/SampledProperty", function () { it("constructor sets expected defaults", function () { let property = new SampledProperty(Cartesian3); diff --git a/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js b/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js index 4f032c5563cd..379410a2a3b8 100644 --- a/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js +++ b/packages/engine/Specs/DataSources/StaticGeometryColorBatchSpec.js @@ -3,6 +3,7 @@ import { Color, DistanceDisplayCondition, JulianDate, + Math as CesiumMath, TimeInterval, TimeIntervalCollection, CallbackProperty, @@ -17,8 +18,6 @@ import { ShadowMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js b/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js index d47aefd4491b..ea0933a13dfd 100644 --- a/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js +++ b/packages/engine/Specs/DataSources/StaticGeometryPerMaterialBatchSpec.js @@ -4,6 +4,7 @@ import { Color, DistanceDisplayCondition, JulianDate, + Math as CesiumMath, TimeInterval, TimeIntervalCollection, BoxGeometryUpdater, @@ -27,8 +28,6 @@ import { ShadowMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js b/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js index ed74bebc0811..24711775a350 100644 --- a/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js +++ b/packages/engine/Specs/DataSources/StaticGroundGeometryColorBatchSpec.js @@ -4,6 +4,7 @@ import { Color, DistanceDisplayCondition, JulianDate, + Math as CesiumMath, TimeInterval, TimeIntervalCollection, CallbackProperty, @@ -15,8 +16,6 @@ import { GroundPrimitive, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js b/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js index 26bb7fd8ba80..6f7ceb39ab53 100644 --- a/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js +++ b/packages/engine/Specs/DataSources/StaticGroundGeometryPerMaterialBatchSpec.js @@ -5,6 +5,7 @@ import { Color, DistanceDisplayCondition, JulianDate, + Math as CesiumMath, TimeInterval, TimeIntervalCollection, ConstantProperty, @@ -19,8 +20,6 @@ import { MaterialAppearance, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js b/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js index 028ed7db0de2..32ade306d4fd 100644 --- a/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js +++ b/packages/engine/Specs/DataSources/StaticGroundPolylinePerMaterialBatchSpec.js @@ -6,6 +6,7 @@ import { defined, DistanceDisplayCondition, JulianDate, + Math as CesiumMath, TimeInterval, TimeIntervalCollection, BoundingSphereState, @@ -21,8 +22,6 @@ import { GroundPolylinePrimitive, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js b/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js index f468076338a1..3af4d26484ab 100644 --- a/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js +++ b/packages/engine/Specs/DataSources/StaticOutlineGeometryBatchSpec.js @@ -3,6 +3,7 @@ import { Color, DistanceDisplayCondition, JulianDate, + Math as CesiumMath, TimeInterval, TimeIntervalCollection, CallbackProperty, @@ -13,8 +14,6 @@ import { ShadowMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js b/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js index 0ee09930845b..7a65f3b3b3a9 100644 --- a/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js +++ b/packages/engine/Specs/DataSources/VelocityVectorPropertySpec.js @@ -3,14 +3,13 @@ import { Event, ExtrapolationType, JulianDate, + Math as CesiumMath, CallbackProperty, ConstantPositionProperty, SampledPositionProperty, VelocityVectorProperty, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("DataSources/VelocityVectorProperty", function () { const time = JulianDate.now(); diff --git a/packages/engine/Specs/DataSources/exportKmlSpec.js b/packages/engine/Specs/DataSources/exportKmlSpec.js index 542a2edcc33d..61c40af56152 100644 --- a/packages/engine/Specs/DataSources/exportKmlSpec.js +++ b/packages/engine/Specs/DataSources/exportKmlSpec.js @@ -8,6 +8,7 @@ import { defined, Iso8601, JulianDate, + Math as CesiumMath, PolygonHierarchy, Rectangle, TimeInterval, @@ -24,8 +25,6 @@ import { VerticalOrigin, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("DataSources/exportKml", function () { let kmlDoc; function checkKmlDoc(entities, properties, options) { diff --git a/packages/engine/Specs/Scene/AxisSpec.js b/packages/engine/Specs/Scene/AxisSpec.js index 5478e5e413b5..f01d807ed0f4 100644 --- a/packages/engine/Specs/Scene/AxisSpec.js +++ b/packages/engine/Specs/Scene/AxisSpec.js @@ -1,6 +1,4 @@ -import { Cartesian4, Matrix4, Axis } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { Cartesian4, Math as CesiumMath, Matrix4, Axis } from "../../index.js"; describe("Scene/Axis", function () { function convertUpAxis(upAxis, transformation, expected) { diff --git a/packages/engine/Specs/Scene/BatchTableSpec.js b/packages/engine/Specs/Scene/BatchTableSpec.js index feb3c823c6c9..ea765487e13c 100644 --- a/packages/engine/Specs/Scene/BatchTableSpec.js +++ b/packages/engine/Specs/Scene/BatchTableSpec.js @@ -1,13 +1,12 @@ import { Cartesian4, ComponentDatatype, + Math as CesiumMath, PixelDatatype, Texture, BatchTable, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; describe( diff --git a/packages/engine/Specs/Scene/BillboardCollectionSpec.js b/packages/engine/Specs/Scene/BillboardCollectionSpec.js index 58b341e8fc7f..a47d52468462 100644 --- a/packages/engine/Specs/Scene/BillboardCollectionSpec.js +++ b/packages/engine/Specs/Scene/BillboardCollectionSpec.js @@ -9,6 +9,7 @@ import { createGuid, DistanceDisplayCondition, Globe, + Math as CesiumMath, NearFarScalar, OrthographicOffCenterFrustum, PerspectiveFrustum, @@ -23,8 +24,6 @@ import { VerticalOrigin, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/CameraFlightPathSpec.js b/packages/engine/Specs/Scene/CameraFlightPathSpec.js index 795c7bc02552..a4573e7688ea 100644 --- a/packages/engine/Specs/Scene/CameraFlightPathSpec.js +++ b/packages/engine/Specs/Scene/CameraFlightPathSpec.js @@ -4,13 +4,12 @@ import { Ellipsoid, GeographicProjection, Globe, + Math as CesiumMath, OrthographicOffCenterFrustum, CameraFlightPath, SceneMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; describe( diff --git a/packages/engine/Specs/Scene/CameraSpec.js b/packages/engine/Specs/Scene/CameraSpec.js index c6340f832abb..6f90f345f173 100644 --- a/packages/engine/Specs/Scene/CameraSpec.js +++ b/packages/engine/Specs/Scene/CameraSpec.js @@ -8,6 +8,7 @@ import { Ellipsoid, GeographicProjection, HeadingPitchRange, + Math as CesiumMath, Matrix3, Matrix4, OrthographicFrustum, @@ -23,8 +24,6 @@ import { TweenCollection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Scene/Camera", function () { let scene; let camera; diff --git a/packages/engine/Specs/Scene/CloudCollectionSpec.js b/packages/engine/Specs/Scene/CloudCollectionSpec.js index fae53214550e..a8283482baaa 100644 --- a/packages/engine/Specs/Scene/CloudCollectionSpec.js +++ b/packages/engine/Specs/Scene/CloudCollectionSpec.js @@ -7,13 +7,11 @@ import { ComputeCommand, DrawCommand, defined, + Math as CesiumMath, PerspectiveFrustum, } from "../../index.js"; import createScene from "../../../../Specs/createScene.js"; - -import { Math as CesiumMath } from "../../index.js"; - import pollToPromise from "../../../../Specs/pollToPromise.js"; describe( diff --git a/packages/engine/Specs/Scene/ConeEmitterSpec.js b/packages/engine/Specs/Scene/ConeEmitterSpec.js index 54e62f1ce1e3..f3f94dd75adb 100644 --- a/packages/engine/Specs/Scene/ConeEmitterSpec.js +++ b/packages/engine/Specs/Scene/ConeEmitterSpec.js @@ -1,6 +1,9 @@ -import { Cartesian3, ConeEmitter, Particle } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + ConeEmitter, + Math as CesiumMath, + Particle, +} from "../../index.js"; describe("Scene/ConeEmitter", function () { it("default constructor", function () { diff --git a/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js b/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js index 245d90f9639f..af76fa49b6d3 100644 --- a/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js +++ b/packages/engine/Specs/Scene/DeviceOrientationCameraControllerSpec.js @@ -1,6 +1,8 @@ -import { Cartesian3, DeviceOrientationCameraController } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + Cartesian3, + DeviceOrientationCameraController, + Math as CesiumMath, +} from "../../index.js"; import createCamera from "../../../../Specs/createCamera.js"; import createCanvas from "../../../../Specs/createCanvas.js"; diff --git a/packages/engine/Specs/Scene/ExpressionSpec.js b/packages/engine/Specs/Scene/ExpressionSpec.js index a5a5c7f39428..c1f1d8c9d7be 100644 --- a/packages/engine/Specs/Scene/ExpressionSpec.js +++ b/packages/engine/Specs/Scene/ExpressionSpec.js @@ -5,11 +5,10 @@ import { Color, Expression, ExpressionNodeType, + Math as CesiumMath, RuntimeError, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Scene/Expression", function () { function MockFeature() { this._properties = {}; diff --git a/packages/engine/Specs/Scene/GeometryRenderingSpec.js b/packages/engine/Specs/Scene/GeometryRenderingSpec.js index 46ebb2e03483..316131be6ef1 100644 --- a/packages/engine/Specs/Scene/GeometryRenderingSpec.js +++ b/packages/engine/Specs/Scene/GeometryRenderingSpec.js @@ -19,6 +19,7 @@ import { Geometry, GeometryAttribute, GeometryInstance, + Math as CesiumMath, Matrix4, PerspectiveFrustum, PlaneGeometry, @@ -40,8 +41,6 @@ import { SceneMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js b/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js index 3e394c609551..fd9f8eeb639c 100644 --- a/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js +++ b/packages/engine/Specs/Scene/GroundPolylinePrimitiveSpec.js @@ -10,6 +10,7 @@ import { GeometryInstance, GroundPolylineGeometry, HeadingPitchRange, + Math as CesiumMath, Rectangle, RectangleGeometry, ShowGeometryInstanceAttribute, @@ -21,8 +22,6 @@ import { Primitive, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createCanvas from "../../../../Specs/createCanvas.js"; import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/GroundPrimitiveSpec.js b/packages/engine/Specs/Scene/GroundPrimitiveSpec.js index 20a453354b24..1fffa328d6fb 100644 --- a/packages/engine/Specs/Scene/GroundPrimitiveSpec.js +++ b/packages/engine/Specs/Scene/GroundPrimitiveSpec.js @@ -7,6 +7,7 @@ import { Ellipsoid, GeometryInstance, HeadingPitchRange, + Math as CesiumMath, PolygonGeometry, Rectangle, RectangleGeometry, @@ -23,8 +24,6 @@ import { StencilConstants, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createCanvas from "../../../../Specs/createCanvas.js"; import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js b/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js index 9505296676ef..06835f4d42a9 100644 --- a/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js +++ b/packages/engine/Specs/Scene/HeightmapTessellatorSpec.js @@ -3,12 +3,11 @@ import { Cartesian3, Ellipsoid, HeightmapTessellator, + Math as CesiumMath, Rectangle, WebMercatorProjection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Scene/HeightmapTessellator", function () { it("throws when heightmap is not provided", function () { expect(function () { diff --git a/packages/engine/Specs/Scene/LabelCollectionSpec.js b/packages/engine/Specs/Scene/LabelCollectionSpec.js index 70d96c24404e..352e8fcfd822 100644 --- a/packages/engine/Specs/Scene/LabelCollectionSpec.js +++ b/packages/engine/Specs/Scene/LabelCollectionSpec.js @@ -7,6 +7,7 @@ import { Color, defined, DistanceDisplayCondition, + Math as CesiumMath, NearFarScalar, Rectangle, BlendOption, @@ -19,7 +20,6 @@ import { VerticalOrigin, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js b/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js index e2f3374f26a0..201da71b3e65 100644 --- a/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js +++ b/packages/engine/Specs/Scene/MapboxImageryProviderSpec.js @@ -1,4 +1,5 @@ import { + Math as CesiumMath, Rectangle, Request, RequestScheduler, @@ -10,7 +11,6 @@ import { ImageryState, MapboxImageryProvider, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js b/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js index 16fa51193a14..a44d3c25c3e2 100644 --- a/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js +++ b/packages/engine/Specs/Scene/MapboxStyleImageryProviderSpec.js @@ -1,4 +1,5 @@ import { + Math as CesiumMath, Rectangle, Request, RequestScheduler, @@ -10,7 +11,6 @@ import { ImageryState, MapboxStyleImageryProvider, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/MultifrustumSpec.js b/packages/engine/Specs/Scene/MultifrustumSpec.js index aa9917256f08..5c417c6f4a7a 100644 --- a/packages/engine/Specs/Scene/MultifrustumSpec.js +++ b/packages/engine/Specs/Scene/MultifrustumSpec.js @@ -8,6 +8,7 @@ import { defined, destroyObject, GeometryPipeline, + Math as CesiumMath, Matrix4, Resource, BufferUsage, @@ -22,8 +23,6 @@ import { TextureAtlas, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/OctahedralProjectedCubeMapSpec.js b/packages/engine/Specs/Scene/OctahedralProjectedCubeMapSpec.js index 2d13eba58fb1..ac9efc89fb90 100644 --- a/packages/engine/Specs/Scene/OctahedralProjectedCubeMapSpec.js +++ b/packages/engine/Specs/Scene/OctahedralProjectedCubeMapSpec.js @@ -1,9 +1,10 @@ import { + Cartesian3, + defined, ComputeEngine, Pass, OctahedralProjectedCubeMap, } from "../../index.js"; -import { Cartesian3, defined } from "../../index.js"; import createContext from "../../../../Specs/createContext.js"; import createFrameState from "../../../../Specs/createFrameState.js"; diff --git a/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js b/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js index 4300e9d8d377..b097f2c020e1 100644 --- a/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js +++ b/packages/engine/Specs/Scene/OpenStreetMapImageryProviderSpec.js @@ -1,4 +1,5 @@ import { + Math as CesiumMath, Rectangle, Request, RequestScheduler, @@ -10,7 +11,6 @@ import { ImageryState, UrlTemplateImageryProvider, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/PickingSpec.js b/packages/engine/Specs/Scene/PickingSpec.js index bbf53c690f6e..362fb4ca53b6 100644 --- a/packages/engine/Specs/Scene/PickingSpec.js +++ b/packages/engine/Specs/Scene/PickingSpec.js @@ -6,6 +6,7 @@ import { Color, Ellipsoid, GeometryInstance, + Math as CesiumMath, Matrix4, OrthographicFrustum, PerspectiveFrustum, @@ -23,8 +24,6 @@ import { VoxelPrimitive, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import Cesium3DTilesTester from "../../../../Specs/Cesium3DTilesTester.js"; import createCanvas from "../../../../Specs/createCanvas.js"; import createScene from "../../../../Specs/createScene.js"; diff --git a/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js b/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js index 2b502bb8ddd3..7668c5c4d02c 100644 --- a/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js +++ b/packages/engine/Specs/Scene/PointCloudEyeDomeLightingSpec.js @@ -2,12 +2,11 @@ import { Cartesian3, Cesium3DTileStyle, HeadingPitchRange, + Math as CesiumMath, PerspectiveFrustum, PointCloudEyeDomeLighting, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import Cesium3DTilesTester from "../../../../Specs/Cesium3DTilesTester.js"; import createScene from "../../../../Specs/createScene.js"; diff --git a/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js b/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js index fc5844f0bdfe..bbe04eebdd38 100644 --- a/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js +++ b/packages/engine/Specs/Scene/PointPrimitiveCollectionSpec.js @@ -5,6 +5,7 @@ import { Cartesian3, Color, DistanceDisplayCondition, + Math as CesiumMath, NearFarScalar, Rectangle, BlendOption, @@ -12,8 +13,6 @@ import { PointPrimitiveCollection, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; describe( diff --git a/packages/engine/Specs/Scene/PolylineCollectionSpec.js b/packages/engine/Specs/Scene/PolylineCollectionSpec.js index d931227c0457..f237f0a4aef3 100644 --- a/packages/engine/Specs/Scene/PolylineCollectionSpec.js +++ b/packages/engine/Specs/Scene/PolylineCollectionSpec.js @@ -4,6 +4,7 @@ import { Color, DistanceDisplayCondition, HeadingPitchRange, + Math as CesiumMath, Matrix4, Camera, Material, @@ -11,8 +12,6 @@ import { SceneMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; describe( diff --git a/packages/engine/Specs/Scene/PrimitiveCullingSpec.js b/packages/engine/Specs/Scene/PrimitiveCullingSpec.js index 7fd59d356f39..e9f311e4b55e 100644 --- a/packages/engine/Specs/Scene/PrimitiveCullingSpec.js +++ b/packages/engine/Specs/Scene/PrimitiveCullingSpec.js @@ -5,6 +5,7 @@ import { defaultValue, defined, GeometryInstance, + Math as CesiumMath, PerspectiveFrustum, Rectangle, RectangleGeometry, @@ -22,8 +23,6 @@ import { VerticalOrigin, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/PrimitiveSpec.js b/packages/engine/Specs/Scene/PrimitiveSpec.js index 4c229a09a1e4..c218d4443153 100644 --- a/packages/engine/Specs/Scene/PrimitiveSpec.js +++ b/packages/engine/Specs/Scene/PrimitiveSpec.js @@ -13,6 +13,7 @@ import { GeometryInstance, GeometryInstanceAttribute, HeadingPitchRange, + Math as CesiumMath, Matrix4, PerspectiveFrustum, PolygonGeometry, @@ -28,8 +29,6 @@ import { SceneMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import BadGeometry from "../../../../Specs/BadGeometry.js"; import createContext from "../../../../Specs/createContext.js"; import createFrameState from "../../../../Specs/createFrameState.js"; diff --git a/packages/engine/Specs/Scene/QuadtreeTileSpec.js b/packages/engine/Specs/Scene/QuadtreeTileSpec.js index 350e5ca4816f..2e6d6c7edcb9 100644 --- a/packages/engine/Specs/Scene/QuadtreeTileSpec.js +++ b/packages/engine/Specs/Scene/QuadtreeTileSpec.js @@ -1,12 +1,11 @@ import { GeographicTilingScheme, Rectangle, + Math as CesiumMath, WebMercatorTilingScheme, QuadtreeTile, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Scene/QuadtreeTile", function () { it("throws without a options", function () { expect(function () { diff --git a/packages/engine/Specs/Scene/SceneSpec.js b/packages/engine/Specs/Scene/SceneSpec.js index 99f090019150..7e3fc5fdaa69 100644 --- a/packages/engine/Specs/Scene/SceneSpec.js +++ b/packages/engine/Specs/Scene/SceneSpec.js @@ -11,6 +11,7 @@ import { GeometryInstance, HeadingPitchRoll, JulianDate, + Math as CesiumMath, PixelFormat, Rectangle, RectangleGeometry, @@ -48,8 +49,6 @@ import { Resource, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createCanvas from "../../../../Specs/createCanvas.js"; import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/SceneTransformsSpec.js b/packages/engine/Specs/Scene/SceneTransformsSpec.js index adaad81640a9..0839423d89ec 100644 --- a/packages/engine/Specs/Scene/SceneTransformsSpec.js +++ b/packages/engine/Specs/Scene/SceneTransformsSpec.js @@ -2,6 +2,7 @@ import { Cartesian2, Cartesian3, Ellipsoid, + Math as CesiumMath, OrthographicFrustum, Rectangle, Camera, @@ -9,8 +10,6 @@ import { SceneTransforms, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; describe( diff --git a/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js b/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js index 5da26e0c64aa..9611aac90c41 100644 --- a/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js +++ b/packages/engine/Specs/Scene/ScreenSpaceCameraControllerSpec.js @@ -7,6 +7,7 @@ import { GeographicProjection, IntersectionTests, KeyboardEventModifier, + Math as CesiumMath, OrthographicFrustum, OrthographicOffCenterFrustum, Ray, @@ -18,8 +19,6 @@ import { ScreenSpaceCameraController, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createCamera from "../../../../Specs/createCamera.js"; import createCanvas from "../../../../Specs/createCanvas.js"; import DomEventSimulator from "../../../../Specs/DomEventSimulator.js"; diff --git a/packages/engine/Specs/Scene/ShadowMapSpec.js b/packages/engine/Specs/Scene/ShadowMapSpec.js index 231ea6088e74..762791743a0d 100644 --- a/packages/engine/Specs/Scene/ShadowMapSpec.js +++ b/packages/engine/Specs/Scene/ShadowMapSpec.js @@ -12,6 +12,7 @@ import { HeadingPitchRoll, HeightmapTerrainData, JulianDate, + Math as CesiumMath, Matrix4, OrthographicOffCenterFrustum, PixelFormat, @@ -31,8 +32,6 @@ import { ShadowMode, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js b/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js index a24bad1fcbb2..8eba7af6b61f 100644 --- a/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js +++ b/packages/engine/Specs/Scene/ShadowVolumeAppearanceSpec.js @@ -4,6 +4,7 @@ import { ComponentDatatype, Ellipsoid, EncodedCartesian3, + Math as CesiumMath, Matrix4, Rectangle, Transforms, @@ -14,8 +15,6 @@ import { ShadowVolumeAppearance, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Scene/ShadowVolumeAppearance", function () { // using ShadowVolumeAppearanceVS directly fails on CI with the --release test const testVs = diff --git a/packages/engine/Specs/Scene/SkyAtmosphereSpec.js b/packages/engine/Specs/Scene/SkyAtmosphereSpec.js index b7be045cfd39..71a215cff6cb 100644 --- a/packages/engine/Specs/Scene/SkyAtmosphereSpec.js +++ b/packages/engine/Specs/Scene/SkyAtmosphereSpec.js @@ -2,12 +2,11 @@ import { Cartesian3, DynamicAtmosphereLightingType, Ellipsoid, + Math as CesiumMath, SceneMode, SkyAtmosphere, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; describe( diff --git a/packages/engine/Specs/Scene/SunSpec.js b/packages/engine/Specs/Scene/SunSpec.js index f892f6e0a37b..caa9fd397934 100644 --- a/packages/engine/Specs/Scene/SunSpec.js +++ b/packages/engine/Specs/Scene/SunSpec.js @@ -1,6 +1,10 @@ -import { BoundingSphere, Color, SceneMode, Sun } from "../../index.js"; - -import { Math as CesiumMath } from "../../index.js"; +import { + BoundingSphere, + Color, + Math as CesiumMath, + SceneMode, + Sun, +} from "../../index.js"; import createScene from "../../../../Specs/createScene.js"; diff --git a/packages/engine/Specs/Scene/TerrainFillMeshSpec.js b/packages/engine/Specs/Scene/TerrainFillMeshSpec.js index 0d604f43b218..cf3589dd19af 100644 --- a/packages/engine/Specs/Scene/TerrainFillMeshSpec.js +++ b/packages/engine/Specs/Scene/TerrainFillMeshSpec.js @@ -4,6 +4,7 @@ import { GeographicProjection, HeightmapTerrainData, Intersect, + Math as CesiumMath, Camera, GlobeSurfaceTileProvider, ImageryLayerCollection, @@ -16,8 +17,6 @@ import { import MockTerrainProvider from "../../../../Specs/MockTerrainProvider.js"; import TerrainTileProcessor from "../../../../Specs/TerrainTileProcessor.js"; -import { Math as CesiumMath } from "../../index.js"; - describe("Scene/TerrainFillMesh", function () { let processor; let scene; diff --git a/packages/engine/Specs/Scene/TileBoundingRegionSpec.js b/packages/engine/Specs/Scene/TileBoundingRegionSpec.js index eda4730996d7..92beba6e486f 100644 --- a/packages/engine/Specs/Scene/TileBoundingRegionSpec.js +++ b/packages/engine/Specs/Scene/TileBoundingRegionSpec.js @@ -6,14 +6,13 @@ import { Ellipsoid, GeographicTilingScheme, Intersect, + Math as CesiumMath, Plane, Rectangle, SceneMode, TileBoundingRegion, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createFrameState from "../../../../Specs/createFrameState.js"; describe("Scene/TileBoundingRegion", function () { diff --git a/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js b/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js index 4777629003c0..61f0d8f20f1b 100644 --- a/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js +++ b/packages/engine/Specs/Scene/TileBoundingS2CellSpec.js @@ -3,13 +3,12 @@ import { Color, Ellipsoid, Intersect, + Math as CesiumMath, Plane, S2Cell, TileBoundingS2Cell, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createFrameState from "../../../../Specs/createFrameState.js"; describe("Scene/TileBoundingS2Cell", function () { diff --git a/packages/engine/Specs/Scene/TileBoundingSphereSpec.js b/packages/engine/Specs/Scene/TileBoundingSphereSpec.js index 05164ba32e6b..32c87cb0078f 100644 --- a/packages/engine/Specs/Scene/TileBoundingSphereSpec.js +++ b/packages/engine/Specs/Scene/TileBoundingSphereSpec.js @@ -2,12 +2,11 @@ import { Cartesian3, Color, Intersect, + Math as CesiumMath, Plane, TileBoundingSphere, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createFrameState from "../../../../Specs/createFrameState.js"; describe("Scene/TileBoundingSphere", function () { diff --git a/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js b/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js index 293813ecca82..72494dceb68c 100644 --- a/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js +++ b/packages/engine/Specs/Scene/TileMapServiceImageryProviderSpec.js @@ -4,6 +4,7 @@ import { GeographicProjection, GeographicTilingScheme, getAbsoluteUri, + Math as CesiumMath, Rectangle, Request, RequestErrorEvent, @@ -19,8 +20,6 @@ import { UrlTemplateImageryProvider, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import pollToPromise from "../../../../Specs/pollToPromise.js"; describe("Scene/TileMapServiceImageryProvider", function () { diff --git a/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js b/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js index 9748bfd03c3c..91ad1dbfc720 100644 --- a/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js +++ b/packages/engine/Specs/Scene/TileOrientedBoundingBoxSpec.js @@ -2,13 +2,12 @@ import { Cartesian3, Color, Intersect, + Math as CesiumMath, Matrix3, Plane, TileOrientedBoundingBox, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createFrameState from "../../../../Specs/createFrameState.js"; describe("Scene/TileOrientedBoundingBox", function () { diff --git a/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js b/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js index eabc3f55f44c..a7e6e2a3761b 100644 --- a/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js +++ b/packages/engine/Specs/Scene/UrlTemplateImageryProviderSpec.js @@ -1,6 +1,7 @@ import { Ellipsoid, GeographicTilingScheme, + Math as CesiumMath, Rectangle, Request, RequestScheduler, @@ -15,8 +16,6 @@ import { UrlTemplateImageryProvider, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import pollToPromise from "../../../../Specs/pollToPromise.js"; describe("Scene/UrlTemplateImageryProvider", function () { diff --git a/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js b/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js index c1a22dfedf69..eb701fc82367 100644 --- a/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js +++ b/packages/engine/Specs/Scene/Vector3DTilePointsSpec.js @@ -8,6 +8,7 @@ import { defined, DistanceDisplayCondition, Ellipsoid, + Math as CesiumMath, NearFarScalar, Rectangle, Cesium3DTileBatchTable, @@ -19,8 +20,6 @@ import { VerticalOrigin, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js b/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js index 7a82e8db713d..1ca2cffad46b 100644 --- a/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js +++ b/packages/engine/Specs/Scene/Vector3DTilePolylinesSpec.js @@ -3,14 +3,13 @@ import { Cartesian3, Cartographic, Ellipsoid, + Math as CesiumMath, Rectangle, Cesium3DTileBatchTable, ColorBlendMode, Vector3DTilePolylines, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; import pollToPromise from "../../../../Specs/pollToPromise.js"; diff --git a/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js b/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js index 320052224e04..fe750f3c4347 100644 --- a/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js +++ b/packages/engine/Specs/Scene/WebMapServiceImageryProviderSpec.js @@ -12,6 +12,7 @@ import { ImageryProvider, ImageryState, JulianDate, + Math as CesiumMath, queryToObject, Rectangle, Request, @@ -23,8 +24,6 @@ import { WebMercatorTilingScheme, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import pollToPromise from "../../../../Specs/pollToPromise.js"; describe("Scene/WebMapServiceImageryProvider", function () { diff --git a/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js b/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js index b0bb626bf893..1b1ee0ee4a7a 100644 --- a/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js +++ b/packages/engine/Specs/Scene/createElevationBandMaterialSpec.js @@ -2,13 +2,12 @@ import { Cartesian4, Color, createElevationBandMaterial, + Math as CesiumMath, PixelFormat, Texture, TextureMinificationFilter, } from "../../index.js"; -import { Math as CesiumMath } from "../../index.js"; - import createScene from "../../../../Specs/createScene.js"; describe("Scene/createElevationBandMaterial", function () { diff --git a/packages/widgets/Specs/.eslintrc.json b/packages/widgets/Specs/.eslintrc.json deleted file mode 100644 index 5b6725648bfa..000000000000 --- a/packages/widgets/Specs/.eslintrc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../.eslintrc.json", - "env": { - "jasmine": true - }, - "rules": { - "no-self-assign": "off", - "no-duplicate-imports": "off" - } -} \ No newline at end of file diff --git a/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js b/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js index 94ecb6361b29..8d8c22af3c4f 100644 --- a/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js +++ b/packages/widgets/Specs/I3SBSLExplorer/I3SBSLExplorerViewModelSpec.js @@ -1,6 +1,7 @@ -import { I3SBuildingSceneLayerExplorerViewModel } from "../../index.js"; - -import { knockout } from "../../index.js"; +import { + I3SBuildingSceneLayerExplorerViewModel, + knockout, +} from "../../index.js"; describe("Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorerViewModel", function () { const i3sProvider = { diff --git a/scripts/build.js b/scripts/build.js index 2358bb8ac78a..a28de85995a0 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -1,4 +1,3 @@ -/*eslint-env node*/ import child_process from "child_process"; import { existsSync, readFileSync, statSync } from "fs"; import { readFile, writeFile } from "fs/promises"; @@ -640,7 +639,7 @@ export async function createGalleryList(noDevelopmentGallery) { .toString() .trim() .split("\n"); - } catch (e) { + } catch { // On a Cesium fork, tags don't exist so we can't generate the list. } diff --git a/server.js b/server.js index 590470ef1ba0..057beb0f0d98 100644 --- a/server.js +++ b/server.js @@ -1,4 +1,3 @@ -/*eslint-env node*/ import fs from "fs"; import path from "path"; import { performance } from "perf_hooks";