Skip to content

Commit

Permalink
Tools: Upgraded TS linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
bre1470 committed Nov 2, 2021
1 parent a16ea6f commit 41780b7
Show file tree
Hide file tree
Showing 8 changed files with 2,332 additions and 1,277 deletions.
3,579 changes: 2,314 additions & 1,265 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -49,8 +49,8 @@
"@octokit/rest": "^18.10.0",
"@types/jquery": "^3.5.6",
"@types/qunit": "^2.11.2",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"aws-sdk": "^2.981.0",
"browserify": "^17.0.0",
"colors": "^1.4.0",
Expand All @@ -73,7 +73,7 @@
"highcharts-assembler": "github:highcharts/highcharts-assembler#v1.3.7",
"highcharts-declarations-generator": "github:highcharts/highcharts-declarations-generator#v1.1.20",
"highcharts-documentation-generators": "github:highcharts/highcharts-documentation-generators#v0.5.28",
"highcharts-utils": "github:highcharts/highcharts-utils#ci-upgrade",
"highcharts-utils": "github:highcharts/highcharts-utils",
"highsoft-websearch": "github:highcharts/highsoft-websearch#v0.0.3",
"husky": "4.3.6",
"js-yaml": "^3.14.1",
Expand Down
12 changes: 11 additions & 1 deletion ts/.eslintrc
Expand Up @@ -20,7 +20,7 @@
"properties": "always"
}
],
"class-methods-use-this": 0, // @todo
"class-methods-use-this": 1, // @todo
"comma-dangle": [
2,
"never"
Expand Down Expand Up @@ -61,6 +61,7 @@
"require-unicode-regexp": 1,
"valid-jsdoc": 0,
"@typescript-eslint/array-type": 0,
"@typescript-eslint/ban-types": 0, // @todo
"@typescript-eslint/explicit-function-return-type": [
"error",
{
Expand All @@ -79,17 +80,25 @@
"@typescript-eslint/no-empty-function": 0, // @todo
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-floating-promises": 1, // @todo
"@typescript-eslint/no-inferrable-types": 0, // @todo ?
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/no-object-literal-type-assertion": 0,
"@typescript-eslint/no-this-alias": 0, // @todo
"@typescript-eslint/no-unnecessary-type-assertion": 0, // @todo
"@typescript-eslint/no-unsafe-argument": 0, // @todo
"@typescript-eslint/no-unsafe-assignment": 0, // @todo
"@typescript-eslint/no-unsafe-call": 1, // @todo
"@typescript-eslint/no-unsafe-member-access": 0, // @todo
"@typescript-eslint/no-unsafe-return": 1, // @todo
"@typescript-eslint/no-unused-vars": 0, // @todo
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-useless-constructor": 2,
"@typescript-eslint/prefer-includes": 0, // @todo
"@typescript-eslint/prefer-regexp-exec": 0, // @todo
"@typescript-eslint/prefer-string-starts-ends-with": 0, // @todo
"@typescript-eslint/restrict-plus-operands": 1, // @todo
"@typescript-eslint/restrict-template-expressions": 1, // @todo
"@typescript-eslint/unbound-method": 0, // @todo
"highcharts/doclet-apioption-last": 2,
"highcharts/no-highcharts-namespace": 1, // @todo
Expand Down Expand Up @@ -129,6 +138,7 @@
"jsdoc/require-param-type": 1, // @todo
"jsdoc/require-returns": 0,
"node/no-missing-import": 0, // @todo
"node/no-unsupported-features/es-builtins": 0, // @todo
"node/no-unsupported-features/es-syntax": 0 // @todo
},
"settings": {
Expand Down
1 change: 1 addition & 0 deletions ts/Extensions/MarkerClusters.ts
Expand Up @@ -1458,6 +1458,7 @@ Scatter.prototype.markerClusterAlgorithms = {

// Start kmeans iteration process.
while (repeat) {
// eslint-disable-next-line no-loop-func
clusters.map((c): Highcharts.KmeansClusterObject => {
c.points.length = 0;
return c;
Expand Down
2 changes: 1 addition & 1 deletion ts/Extensions/OfflineExporting/OfflineExportingVendor.d.ts
Expand Up @@ -38,7 +38,7 @@ declare global {
jsPDF: typeof jsPDF;
svg2pdf: Function;
}
class jsPDF { // eslint-disable-line @typescript-eslint/class-name-casing
class jsPDF {
constructor (a: string, b: string, c: Array<number>);
output: Function;
}
Expand Down
4 changes: 2 additions & 2 deletions ts/Series/Gantt/GanttSeries.ts
Expand Up @@ -137,11 +137,11 @@ class GanttSeries extends XRangeSeries {
symbol: 'arrow-filled',
radius: 4,
fill: '#fa0',
align: 'left' as 'left'
align: 'left' as const
},
endMarker: {
enabled: false, // Only show arrow on the dependent task
align: 'right' as 'right'
align: 'right' as const
}
}
} as GanttSeriesOptions);
Expand Down
2 changes: 0 additions & 2 deletions ts/Stock/Indicators/IKH/IKHIndicator.ts
Expand Up @@ -909,8 +909,6 @@ class IKHIndicator extends SMAIndicator {
}
}

/* eslint-disable @typescript-eslint/interface-name-prefix */

/* *
*
* Prototype Properties
Expand Down
3 changes: 0 additions & 3 deletions ts/Stock/Indicators/IKH/IKHOptions.d.ts
Expand Up @@ -26,8 +26,6 @@ import type TooltipOptions from '../../../Core/TooltipOptions';
*
* */

/* eslint-disable @typescript-eslint/interface-name-prefix */

export interface IKHDrawSenkouSpanObject {
indicator: IKHIndicator;
points: Array<IKHPoint>;
Expand Down Expand Up @@ -69,4 +67,3 @@ export interface IKHOptions extends SMAOptions {
senkouSpanB?: Record<string, CSSObject>;
tenkanLine?: Record<string, CSSObject>;
}
/* eslint-enable @typescript-eslint/interface-name-prefix */

0 comments on commit 41780b7

Please sign in to comment.