Skip to content

Commit

Permalink
Fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Aug 28, 2024
1 parent f914103 commit 46813be
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
12 changes: 4 additions & 8 deletions src/message/Notification_OLD.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,20 +105,16 @@ export class MessageNotification extends ngeoMessageMessage {
console.assert(typeof type == 'string', 'Type should be set.');
const classNames = ['alert', 'fade', 'show'];
switch (type) {
case MessageType.ERROR:
// eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
case MessageType.ERROR: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
classNames.push('alert-danger');
break;
case MessageType.INFORMATION:
// eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
case MessageType.INFORMATION: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
classNames.push('alert-info');
break;
case MessageType.SUCCESS:
// eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
case MessageType.SUCCESS: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
classNames.push('alert-success');
break;
case MessageType.WARNING:
// eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
case MessageType.WARNING: // eslint-disable-line @typescript-eslint/no-unsafe-enum-comparison
classNames.push('alert-warning');
break;
default:
Expand Down
6 changes: 3 additions & 3 deletions src/offline/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const component = {
templateUrl: ngeoOfflineTemplateUrl,
};
myModule.component('ngeoOffline', component);
export const Controller = class _ngInjectAnonymousClass {
export class Controller {
/**
* @param {angular.ITimeoutService} $timeout Angular timeout service.
* @param {import('ngeo/offline/ServiceManager').default} ngeoOfflineServiceManager
Expand Down Expand Up @@ -565,8 +565,8 @@ export const Controller = class _ngInjectAnonymousClass {
const maskSizeMeter = (maskSizePixel * (this.map.getView().getResolution() || 1)) / DEVICE_PIXEL_RATIO;
return maskSizeMeter;
}
};
_ngInjectAnonymousClass.$inject = [
}
Controller.$inject = [
'$timeout',
'ngeoOfflineServiceManager',
'ngeoOfflineConfiguration',
Expand Down
6 changes: 3 additions & 3 deletions src/olcs/Service.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {toDegrees} from 'ol/math';
/**
* @hidden
*/
export const OlcsService = class _ngInjectAnonymousClass {
export class OlcsService {
/**
* @param {import('ngeo/misc/debounce').miscDebounce<function(): void>} ngeoDebounce ngeo debounce
* service.
Expand Down Expand Up @@ -152,8 +152,8 @@ export const OlcsService = class _ngInjectAnonymousClass {
this.ngeoStateManager_.deleteParam(key);
});
}
};
_ngInjectAnonymousClass.$inject = ['ngeoDebounce', 'ngeoLocation', 'ngeoStateManager'];
}
OlcsService.$inject = ['ngeoDebounce', 'ngeoLocation', 'ngeoStateManager'];
/**
* @type {angular.IModule}
* @hidden
Expand Down
6 changes: 3 additions & 3 deletions src/olcs/controls3d.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function shouldUpdate(older, newer) {
/**
* @hidden
*/
export const Controller = class _ngInjectAnonymousClass {
export class Controller {
/**
* @param {JQuery} $element The element
* @param {import('ngeo/olcs/Service').OlcsService} ngeoOlcsService The ol-cesium service.
Expand Down Expand Up @@ -252,8 +252,8 @@ export const Controller = class _ngInjectAnonymousClass {
easing: olEasing.easeOut,
});
}
};
_ngInjectAnonymousClass.$inject = ['$element', 'ngeoOlcsService'];
}
Controller.$inject = ['$element', 'ngeoOlcsService'];
/**
* @param {angular.IAttributes} $attrs Attributes.
* @param {string} ngeoOlcsControls3dTemplateUrl Template function.
Expand Down
2 changes: 1 addition & 1 deletion src/raster/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ Controller.prototype.getRasterSuccess_ = function (resp) {
const separator =
postfix.length > 0 ? (options.hasOwnProperty('separator') ? options.separator : '\u00a0') : '';
const args = Array.prototype.concat([value], custom_args);
const elevation = /** @type {string} */ this.filter_(filter)(...args);
const elevation = /** @type {string} */ (this.filter_(filter)(...args));
if (typeof elevation != 'string') {
throw new Error('Wrong elevation type');
}
Expand Down

0 comments on commit 46813be

Please sign in to comment.