From: Jukka Kurkela Date: Tue, 23 Feb 2021 16:41:00 +0000 (+0200) Subject: Add linting of type tests (.ts) + fix errors (#8505) X-Git-Tag: v3.0.0-beta.12~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e55a12ce87162463bcfe28afc98eb5053382b375;p=thirdparty%2FChart.js.git Add linting of type tests (.ts) + fix errors (#8505) --- diff --git a/package.json b/package.json index c58235a82..3711de2d7 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "lint-js": "eslint \"samples/**/*.html\" \"samples/**/*.js\" \"src/**/*.js\" \"test/**/*.js\"", "lint-md": "markdownlint-cli2 \"**/*.md\" \"**/*.mdx\" \"#**/node_modules\"", "lint-tsc": "tsc", - "lint-types": "eslint \"types/**/*.d.ts\" && tsc -p types/tests/", + "lint-types": "eslint \"types/**/*.ts\" && tsc -p types/tests/", "lint": "concurrently \"npm:lint-*\"", "test": "npm run lint && cross-env NODE_ENV=test karma start --auto-watch --single-run --coverage --grep", "typedoc": "npx typedoc" diff --git a/types/tests/plugins/plugin.tooltip/tooltip_parsed_data_chart_defaults.ts b/types/tests/plugins/plugin.tooltip/tooltip_parsed_data_chart_defaults.ts index c5c37addd..119301c44 100644 --- a/types/tests/plugins/plugin.tooltip/tooltip_parsed_data_chart_defaults.ts +++ b/types/tests/plugins/plugin.tooltip/tooltip_parsed_data_chart_defaults.ts @@ -1,9 +1,9 @@ import { Chart } from '../../../index.esm'; Chart.defaults.controllers.bubble.plugins.tooltip.callbacks.label = (item) => { - const {x, y, _custom: r} = item.parsed; - return `${item.label}: (${x}, ${y}, ${r})`; -} + const { x, y, _custom: r } = item.parsed; + return `${item.label}: (${x}, ${y}, ${r})`; +}; const chart = new Chart('id', { type: 'bubble',