Skip to content

Commit 8195f56

Browse files
sbrunnerrenovate[bot]
authored andcommitted
Fix or ignore new checks errors
1 parent 6fd6f0d commit 8195f56

File tree

15 files changed

+29
-20
lines changed

15 files changed

+29
-20
lines changed

.eslintrc.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ rules:
5959
'@typescript-eslint/no-misused-promises': warn
6060
'@typescript-eslint/require-await': warn
6161
'@typescript-eslint/no-unsafe-argument': warn
62+
'@typescript-eslint/no-unused-vars': warn
63+
'@typescript-eslint/no-unused-expressions': warn
64+
'@typescript-eslint/prefer-promise-reject-errors': warn
65+
# TODO: Remove before release 2.9
66+
'@typescript-eslint/no-require-imports': warn
6267
'@typescript-eslint/no-useless-constructor': error
6368
'@typescript-eslint/prefer-for-of': error
6469
'@typescript-eslint/prefer-includes': error

buildtools/codeshift-js2ts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ function visit(indent, node, call) {
566566
if (!done) {
567567
console.log('Unknown node type');
568568
console.log(node);
569-
throw 'Unknown node type';
569+
throw new Error('Unknown node type');
570570
}
571571
}
572572

buildtools/svg-viewbox-loader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module.exports = function (source) {
4141
let tokens = simpleHTMLTokenizer.tokenize(source);
4242

4343
tokens = tokens.map((tag) => {
44+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
4445
if (tag.type === 'StartTag' && tag.tagName === 'svg') {
4546
let width = undefined;
4647
let height = undefined;

src/controllers/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ function bootstrap(module) {
112112
angular.bootstrap(document, [appName]);
113113
})
114114
.catch((error) => {
115-
window.alert(`Failed to get the dynamic: ${error}`);
115+
window.alert(`Failed to get the dynamic: ${error}`); // eslint-disable-line @typescript-eslint/no-base-to-string
116116
});
117117
}
118118

src/e2e/mobile.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ if (Cypress.browser.isHeaded) {
464464
cy.wrap(btn)
465465
.click({force: true})
466466
.then((btn) => {
467-
expect(btn).to.not.be.visible;
467+
expect(btn).to.not.be.visible; // eslint-disable-line @typescript-eslint/no-unused-expressions
468468

469469
// Check the placeholder
470470
cy.get('.tt-input').should('have.attr', 'placeholder', 'Search…');

src/lidar/Manager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ export class LidarprofileManager {
422422
this.processBuffer_(data, iter, distanceOffset, lastLOD, resetPlot);
423423
})
424424
.catch((err: Error) => {
425-
throw `Error on pytree query: ${err.message}`;
425+
throw new Error(`Error on pytree query: ${err.message}`);
426426
});
427427
}
428428

@@ -471,6 +471,7 @@ export class LidarprofileManager {
471471

472472
try {
473473
JSON.parse(strHeaderLocal);
474+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
474475
} catch (e) {
475476
if (!this.isPlotSetup_) {
476477
const canvas: any = d3select(lidarContainerElement.querySelector('.lidar-canvas'));

src/lidar/PanelElement.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export default class GmfLidarPanel extends ToolPanelElement {
257257
* @param key The key string of the toggled classification.
258258
*/
259259
toggleVisibility(classification: LidarprofileServerConfigClassification, key: string): void {
260-
classification.visible === 0 ? (classification.visible = 1) : (classification.visible = 0);
260+
classification.visible = classification.visible === 0 ? 1 : 0;
261261
this.setClassification(classification, parseInt(key));
262262
}
263263

src/lidar/Plot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ export default class {
502502
source.clear();
503503
const lidarPointGeom = new olGeomPoint([p.coords[0], p.coords[1]]);
504504
const lidarPointFeature = new olFeature(lidarPointGeom);
505-
if (typeof pointClassification.color !== undefined) {
505+
if (pointClassification.color !== undefined) {
506506
lidarPointFeature.setStyle(
507507
new olStyleStyle({
508508
image: new olStyleCircle({

src/message/Disclaimer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ export class MessageDisclaimerService extends ngeoMessageMessage {
337337
jqueryObj.alert('close');
338338
}
339339
} else {
340-
console.log(`No disclaimer found for '${message}'.`);
340+
console.log(`No disclaimer found for '${message.msg}'.`);
341341
}
342342

343343
// (3) Remove message from cache since it's closed now.

src/message/Notification.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,16 @@ export class MessageNotification extends ngeoMessageMessage {
106106

107107
const classNames = ['alert', 'fade', 'show'];
108108
switch (type) {
109-
case MessageType.ERROR:
109+
case MessageType.ERROR: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
110110
classNames.push('alert-danger');
111111
break;
112-
case MessageType.INFORMATION:
112+
case MessageType.INFORMATION: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
113113
classNames.push('alert-info');
114114
break;
115-
case MessageType.SUCCESS:
115+
case MessageType.SUCCESS: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
116116
classNames.push('alert-success');
117117
break;
118-
case MessageType.WARNING:
118+
case MessageType.WARNING: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
119119
classNames.push('alert-warning');
120120
break;
121121
default:

0 commit comments

Comments
 (0)