Skip to content

Commit

Permalink
chore(package): update @typescript-eslint/* to version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
greenkeeper[bot] authored and sbrunner committed Aug 19, 2019
1 parent 19cc61f commit 5d7706f
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 19 deletions.
10 changes: 7 additions & 3 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
extends:
- openlayers
- plugin:@typescript-eslint/recommended
- openlayers
- plugin:@typescript-eslint/recommended
env:
jquery: true
parserOptions:
ecmaVersion: 2017
project: ./tsconfig.json
project: ./tsconfig-eslint.json
rules:
no-console: 0
comma-dangle: 0
Expand Down Expand Up @@ -35,3 +35,7 @@ rules:
- error
'@typescript-eslint/restrict-plus-operands':
- error
'@typescript-eslint/ban-ts-ignore': 0
'@typescript-eslint/explicit-function-return-type': 0
'@typescript-eslint/no-var-requires': 0
'@typescript-eslint/no-empty-function': 0
16 changes: 11 additions & 5 deletions contribs/gmf/apps/appmodule.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ import {decodeQueryString} from 'ngeo/utils.js';
*/
const module = angular.module('app', []);

module.config(['$compileProvider', function($compileProvider) {
if (!('debug' in decodeQueryString(window.location.search))) {
// Disable the debug info
$compileProvider.debugInfoEnabled(false);
module.config([
'$compileProvider',
/**
* @param {angular.ICompileProvider} $compileProvider
*/
function($compileProvider) {
if (!('debug' in decodeQueryString(window.location.search))) {
// Disable the debug info
$compileProvider.debugInfoEnabled(false);
}
}
}]);
]);


export default module;
9 changes: 5 additions & 4 deletions contribs/gmf/apps/desktop_alt/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Controller extends AbstractDesktopController {
}];

/**
* @type {GridMergeTabs}
* @type {import('gmf/query/gridComponent.js').GridMergeTabs}
*/
this.gridMergeTabs = {
'OSM_time_merged': ['osm_time', 'osm_time2'],
Expand All @@ -133,7 +133,7 @@ class Controller extends AbstractDesktopController {
});

/**
* @type {Object<string, ol.style.Style>} Map of styles for search overlay.
* @type {Object<string, import('ol/style/Style.js').default>} Map of styles for search overlay.
* @export
*/
this.searchStyles = {
Expand Down Expand Up @@ -186,10 +186,11 @@ module.controller('AlternativeDesktopController', Controller);
module.value('gmfPermalinkOptions', /** @type {import('gmf/permalink/Permalink.js').PermalinkOptions} */ ({
crosshairStyle: [
new Style({
image: new Icon({
image: /** @type {import('ol/style/Image.js').default} */(new Icon({
// @ts-ignore: webpack
src: 'data:image/svg+xml;base64,' + btoa(require('./image/crosshair.svg?viewbox')),
imgSize: [22, 22],
})
}))
})
]
}));
Expand Down
6 changes: 3 additions & 3 deletions contribs/gmf/apps/oeedit/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Controller extends AbstractDesktopController {

/**
* The ngeo ToolActivate manager service.
* @type {import('ngeo/misc/ToolActivateMgr.js').default}
* @type {import('ngeo/misc/ToolActivateMgr.js').ToolActivateMgr}
*/
const ngeoToolActivateMgr = $injector.get('ngeoToolActivateMgr');

Expand All @@ -76,7 +76,7 @@ class Controller extends AbstractDesktopController {
});

/**
* @type {import("ol/source/Vector.js").default}
* @type {import("ol/source/Vector.js").default<*>}
* @private
*/
this.vectorSource_ = new olSourceVector({
Expand Down Expand Up @@ -222,7 +222,7 @@ module.run(
$templateCache.put('gmf/contextualdata', require('./contextualdata.html'));
});

module.value('gmfPermalinkOptions', /** @type {PermalinkOptions} */ ({
module.value('gmfPermalinkOptions', /** @type {import('gmf/permalink/Permalink.js').PermalinkOptions} */ ({
pointRecenterZoom: 10
}));

Expand Down
2 changes: 1 addition & 1 deletion contribs/gmf/src/lidarprofile/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export default class {
let closestPoint = null;

if (hP.length > 0) {
const minDist = Math.min.apply(Math, distances);
const minDist = Math.min(...distances);
const indexMin = distances.indexOf(minDist);
if (indexMin != -1) {
closestPoint = hP[indexMin];
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@types/proj4": "^2.5.0",
"@types/sinon": "^7.0.13",
"@types/typeahead": "^0.11.32",
"@typescript-eslint/eslint-plugin": "^1.11.0",
"@typescript-eslint/parser": "^1.11.0",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"angular": "1.7.8",
"angular-animate": "^1.7.8",
"angular-dynamic-locale": "^0.1.37",
Expand Down
8 changes: 8 additions & 0 deletions tsconfig-eslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "tsconfig.json",
"include": [
"node_modules/ol/**/*.js",
"node_modules/olcs/**/*.js",
"node_modules/moment/src/**/*.js",
],
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
"src/**/*.js",
"api/src/**/*.js",
"contribs/gmf/src/**/*.js",
"contribs/gmf/apps/**/*.js",
"test/spec/**/*.js",
"contribs/gmf/test/spec/**/*.js",
"examples/*.js",
"contribs/gmf/examples/*.js",
],
"files": [
"types/dom.d.ts"
"types/dom.d.ts",
]
}

0 comments on commit 5d7706f

Please sign in to comment.