Add linting of type tests (.ts) + fix errors (#8505)

This commit is contained in:
Jukka Kurkela 2021-02-23 18:41:00 +02:00 committed by GitHub
parent 4c960fb138
commit e55a12ce87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View 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"

View 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',