diff --git a/src/auth/FormElement.ts b/src/auth/FormElement.ts index ba7317eaab98..ea65e432577c 100644 --- a/src/auth/FormElement.ts +++ b/src/auth/FormElement.ts @@ -618,9 +618,9 @@ export default class GmfAuthForm extends GmfBaseElement { */ cleanForm_(): void { const form = this.renderRoot.querySelector('form') as HTMLFormElement; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + const loginField = document.body.querySelector('input[slot=gmf-auth-login]') as HTMLInputElement; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion + const passwordField = document.body.querySelector('input[slot=gmf-auth-password]') as HTMLInputElement; form.reset(); loginField.value = ''; diff --git a/src/auth/component.spec.ts b/src/auth/component.spec.ts index d9f607cf5076..06ef1ff232b2 100644 --- a/src/auth/component.spec.ts +++ b/src/auth/component.spec.ts @@ -62,7 +62,6 @@ describe('Auth component', () => { } as Configuration); }); - // eslint-disable-next-line @typescript-eslint/no-misused-promises it.skip('tries to login with wrong credentials', async () => { gmfAuthenticationService.load_(); expect(user.getState()).to.equal(UserState.NOT_INITIALIZED); @@ -81,7 +80,6 @@ describe('Auth component', () => { }); }); - // eslint-disable-next-line @typescript-eslint/no-misused-promises it.skip('logins successfully', async () => { gmfAuthenticationService.load_(); expect(user.getState()).to.equal(UserState.READY); @@ -95,7 +93,6 @@ describe('Auth component', () => { }); }); - // eslint-disable-next-line @typescript-eslint/no-misused-promises it.skip('logs out', async () => { expect(user.getState()).to.equal(UserState.LOGGED_IN); // eslint-disable-next-line @typescript-eslint/no-floating-promises diff --git a/src/auth/component.stories.ts b/src/auth/component.stories.ts index 31af7bd17067..a4a6da48d244 100644 --- a/src/auth/component.stories.ts +++ b/src/auth/component.stories.ts @@ -20,7 +20,6 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ import './FormElement'; import './PanelElement'; diff --git a/src/canvas/Desktop.stories.ts b/src/canvas/Desktop.stories.ts index af143ba3c20b..f732ad3ff68c 100644 --- a/src/canvas/Desktop.stories.ts +++ b/src/canvas/Desktop.stories.ts @@ -20,7 +20,6 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ import ToolButtonElement, {ToolButtonDefault} from 'gmfapi/elements/ToolButtonElement'; import {css, html, TemplateResult} from 'lit'; diff --git a/src/download/Csv.ts b/src/download/Csv.ts index cf0123f11f85..f5631e9096b5 100644 --- a/src/download/Csv.ts +++ b/src/download/Csv.ts @@ -101,7 +101,6 @@ export class DownloadCsvService { const rowValues = values.map((value) => { if (value !== undefined && value !== null) { - // eslint-disable-next-line @typescript-eslint/restrict-template-expressions const strValue = `${value}`; // wrap each value into quotes and escape quotes with double quotes return `${this.quote_}${strValue.replace(matchAllQuotesRegex, doubleQuote)}${this.quote_}`; diff --git a/src/e2e/desktop.spec.ts b/src/e2e/desktop.spec.ts index e64000019455..3a1af860eba5 100644 --- a/src/e2e/desktop.spec.ts +++ b/src/e2e/desktop.spec.ts @@ -21,9 +21,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ -/* eslint-disable @typescript-eslint/unbound-method */ import olMap from 'ol/Map'; import path from 'path'; @@ -251,9 +248,9 @@ if (Cypress.browser.isHeaded) { */ function validateCsv(csv: string, validationObject: any) { cy.wrap(csv) - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + .then(stripBom) // Remove Byte order mark - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + .then(neatCSV) // Parse the CSV .then((list: any) => { expect(list, 'number of records').to.have.length(1); diff --git a/src/lidar/Manager.ts b/src/lidar/Manager.ts index 1ada2c4a8f57..f4eabc8228e6 100644 --- a/src/lidar/Manager.ts +++ b/src/lidar/Manager.ts @@ -561,7 +561,7 @@ export class LidarprofileManager { this.profilePoints.altitude.push(z); this.profilePoints.coords.push([x, y]); } - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + aoffset = aoffset + attribute.bytes; } } diff --git a/src/lidar/Measure.ts b/src/lidar/Measure.ts index 1213c5f24aa5..fe674adeb3a4 100644 --- a/src/lidar/Measure.ts +++ b/src/lidar/Measure.ts @@ -153,9 +153,9 @@ export default class { if (p !== null) { this.pStart_.distance = p.distance; this.pStart_.altitude = p.altitude; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + this.pStart_.cx = sx(p.distance) + margin.left; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + this.pStart_.cy = sy(p.altitude) + margin.top; } else { // @ts-ignore @@ -178,9 +178,9 @@ export default class { if (p !== null) { this.pEnd_.distance = p.distance; this.pEnd_.altitude = p.altitude; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + this.pEnd_.cx = sx(p.distance) + margin.left; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + this.pEnd_.cy = sy(p.altitude) + margin.top; } else { // @ts-ignore @@ -221,9 +221,9 @@ export default class { svg .append('text') .attr('id', 'text_m') - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + .attr('x', 10 + (this.pStart_.cx + this.pEnd_.cx) / 2) - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + .attr('y', (this.pStart_.cy + this.pEnd_.cy) / 2) .text(`${height} m`) .attr('font-family', 'sans-serif') diff --git a/src/lidar/Plot.ts b/src/lidar/Plot.ts index 62f52b86a30a..0d0f016bd5f5 100644 --- a/src/lidar/Plot.ts +++ b/src/lidar/Plot.ts @@ -245,9 +245,9 @@ export default class { const containerEl = container.node(); const containerWidth = containerEl.getBoundingClientRect().width; const containerHeight = containerEl.getBoundingClientRect().height; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + this.width_ = containerWidth - (margin.left + margin.right); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + this.height_ = containerHeight - (margin.top + margin.bottom); this.material = this.manager_.config.serverConfig.default_attribute; @@ -322,7 +322,6 @@ export default class { svg.selectAll('*').remove(); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands svg.attr('width', this.width_ + margin.left).attr('height', this.height_ + margin.top + margin.bottom); svg.on('mousemove', (event: MouseEvent) => { @@ -340,9 +339,8 @@ export default class { // @ts-ignore svg.append('g').attr('class', 'x axis').call(xAxis); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands svg.select('.y.axis').attr('transform', `translate(${margin.left}, ${margin.top})`); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + svg.select('.x.axis').attr('transform', `translate(${margin.left}, ${this.height_ + margin.top})`); svg.select('.y.axis').selectAll('g.tick line').style('opacity', '0.5').style('stroke', '#b7cff7'); @@ -470,9 +468,8 @@ export default class { const source = this.manager_.lidarPointHighlight.getSource(); if (p != undefined) { - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands cx = this.updateScaleX(p.distance) + margin.left; - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + cy = this.updateScaleY(p.altitude) + margin.top; svg.selectAll('#highlightCircle').remove(); @@ -482,7 +479,7 @@ export default class { .attr('id', 'highlightCircle') .attr('cx', cx) .attr('cy', cy) - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + .attr('r', pointSize + 1) .style('fill', 'orange'); @@ -515,7 +512,7 @@ export default class { ); } - source.addFeature(lidarPointFeature); // eslint-disable-line @typescript-eslint/no-unsafe-call + source.addFeature(lidarPointFeature); } else { source.clear(); svg.select('#highlightCircle').remove(); @@ -544,22 +541,22 @@ export default class { if (distance !== undefined) { const distanceTxt = i18next.t('Distance: '); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + html.push(`${distanceTxt + this.formatDecimals(distance, distDecimal)}`); } if (altitude !== undefined) { const altitudeTxt = i18next.t('Altitude: '); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + html.push(`${altitudeTxt + this.formatDecimals(altitude, distDecimal)}`); } if (classification.length > 0) { const classificationTxt = i18next.t('Classification: '); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + html.push(`${classificationTxt + classification}`); } if (intensity !== undefined) { const intensityTxt = i18next.t('Intensity: '); - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + html.push(`${intensityTxt + this.formatDecimals(intensity, 0)}`); } diff --git a/src/profile/d3Elevation.ts b/src/profile/d3Elevation.ts index 99f9c9c667db..459981cf96c4 100644 --- a/src/profile/d3Elevation.ts +++ b/src/profile/d3Elevation.ts @@ -22,7 +22,6 @@ /* eslint-disable @typescript-eslint/no-unsafe-argument */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable jsdoc/no-undefined-types */ import d3, { area as d3area, @@ -269,7 +268,7 @@ function d3Elevation( // eslint-disable-next-line @typescript-eslint/no-unused-vars const func = function (data: number[][], index: number, groups: d3.BaseType[] | ArrayLike) { // @ts-ignore - const element: ContainerElement = this; // eslint-disable-line @typescript-eslint/no-this-alias, @typescript-eslint/no-explicit-any + const element: ContainerElement = this; // eslint-disable-line @typescript-eslint/no-this-alias d3select(element).selectAll('svg').remove(); if (data === undefined) { return;