From b29f304cd474fa3f2367ebd521608b3949cab1e2 Mon Sep 17 00:00:00 2001 From: mistic100 Date: Tue, 9 Nov 2021 16:20:08 +0100 Subject: [PATCH] Update eslint --- .eslintrc.json | 5 ++++- package.json | 8 ++++---- src/Viewer.js | 1 - src/adapters/equirectangular-tiles/index.js | 4 +++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 0c00079c3..0120d6423 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -4,7 +4,7 @@ "DeviceOrientationControls.js" ], "extends": "airbnb-base", - "parser": "babel-eslint", + "parser": "@babel/eslint-parser", "env": { "browser": true, "es6": true @@ -29,6 +29,9 @@ "prefer-template": "off", "no-mixed-operators": "off", "no-restricted-globals": "off", + "function-paren-newline": "off", + "function-call-argument-newline": "off", + "prefer-exponentiation-operator": "off", "arrow-parens": [ "error", "as-needed", diff --git a/package.json b/package.json index c9cd4f3dd..dd1e0037a 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ }, "devDependencies": { "@babel/core": "^7.15.0", + "@babel/eslint-parser": "^7.16.0", "@babel/plugin-proposal-class-properties": "^7.14.5", "@babel/plugin-proposal-optional-chaining": "^7.14.5", "@babel/preset-env": "^7.15.0", @@ -52,12 +53,11 @@ "@vuepress/plugin-google-analytics": "^1.8.2", "autoprefixer": "^10.3.3", "axios": "^0.24.0", - "babel-eslint": "^10.0.3", "cpx": "^1.5.0", "date-fns": "^2.23.0", - "eslint": "^7.32.0", - "eslint-config-airbnb-base": "^14.2.1", - "eslint-plugin-import": "^2.24.2", + "eslint": "^8.2.0", + "eslint-config-airbnb-base": "^15.0.0", + "eslint-plugin-import": "^2.25.2", "jsdoc": "^3.6.7", "live-server": "^1.2.0", "marked": "^4.0.0", diff --git a/src/Viewer.js b/src/Viewer.js index 091e1ae84..1737cb186 100644 --- a/src/Viewer.js +++ b/src/Viewer.js @@ -428,7 +428,6 @@ export class Viewer extends EventEmitter { this.prop.aspect = this.prop.size.width / this.prop.size.height; this.prop.hFov = this.dataHelper.vFovToHFov(this.prop.vFov); - this.needsUpdate(); this.trigger(EVENTS.SIZE_UPDATED, this.getSize()); this.__resizeRefresh(); } diff --git a/src/adapters/equirectangular-tiles/index.js b/src/adapters/equirectangular-tiles/index.js index 07c22f740..dbc5907bd 100644 --- a/src/adapters/equirectangular-tiles/index.js +++ b/src/adapters/equirectangular-tiles/index.js @@ -409,7 +409,9 @@ export class EquirectangularTilesAdapter extends AbstractAdapter { this.loader.setRequestHeader(this.psv.config.requestHeaders(url)); } - return new Promise((resolve, reject) => this.loader.load(url, resolve, undefined, reject)) + return new Promise((resolve, reject) => { + this.loader.load(url, resolve, undefined, reject); + }) .then((image) => { if (!task.isCancelled()) { const material = new THREE.MeshBasicMaterial({