]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add linting of type tests (.ts) + fix errors (#8505)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Tue, 23 Feb 2021 16:41:00 +0000 (18:41 +0200)
committerGitHub <noreply@github.com>
Tue, 23 Feb 2021 16:41:00 +0000 (11:41 -0500)
package.json
types/tests/plugins/plugin.tooltip/tooltip_parsed_data_chart_defaults.ts

index c58235a8268d89b82557f818804ad5f1a903afa7..3711de2d7d92bcaac43faa6ec21bbd15fdb5c338 100644 (file)
@@ -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"
index c5c37adddab752be33d9f8ae760838f2a4424d3a..119301c44cfcf26cf8b34609bfefa2849794df56 100644 (file)
@@ -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',