]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Disable warning of unused variables in types/tests (#8607)
authorJukka Kurkela <jukka.kurkela@gmail.com>
Wed, 10 Mar 2021 13:13:04 +0000 (15:13 +0200)
committerGitHub <noreply@github.com>
Wed, 10 Mar 2021 13:13:04 +0000 (08:13 -0500)
types/tests/.eslintrc.yml [new file with mode: 0644]
types/tests/layout/position.ts
types/tests/options.ts
types/tests/parsed.data.type.ts
types/tests/scriptable.ts
types/tests/test_instance_assignment.ts

diff --git a/types/tests/.eslintrc.yml b/types/tests/.eslintrc.yml
new file mode 100644 (file)
index 0000000..d5b7cf0
--- /dev/null
@@ -0,0 +1,2 @@
+rules:
+  '@typescript-eslint/no-unused-vars': 'off'
index c8d2c5229042ea7f15b192682e87a0de2050714a..87f249e27d3798b7c9174e0b2f831e607c9085ef 100644 (file)
@@ -1,11 +1,11 @@
 import { LayoutPosition } from '../../index.esm';
 
-export const left: LayoutPosition = 'left';
-export const right: LayoutPosition = 'right';
-export const top: LayoutPosition = 'top';
-export const bottom: LayoutPosition = 'bottom';
-export const center: LayoutPosition = 'center';
-export const axis: LayoutPosition = { x: 10 };
+const left: LayoutPosition = 'left';
+const right: LayoutPosition = 'right';
+const top: LayoutPosition = 'top';
+const bottom: LayoutPosition = 'bottom';
+const center: LayoutPosition = 'center';
+const axis: LayoutPosition = { x: 10 };
 
 // @ts-expect-error invalid position
-export const invalid: LayoutPosition = 'none';
+const invalid: LayoutPosition = 'none';
index d771a88da46dce70ecc065136cfd90684ae01dc7..0aab0f0f7cbc58c20b4db61f0ba20192937fe02d 100644 (file)
@@ -1,6 +1,6 @@
 import { Chart } from '../index.esm';
 
-export const chart = new Chart('test', {
+const chart = new Chart('test', {
   type: 'bar',
   data: {
     labels: ['a'],
index a0357f09585c5a9a41aa8f798322a23b4037ec25..c5476eaae395cbfc6996adae1af88b647766ae35 100644 (file)
@@ -8,7 +8,7 @@ interface test {
   testC: ParsedDataType<'pie' | 'line' | 'bar'>
 }
 
-export const testImpl: test = {
+const testImpl: test = {
   pie: 1,
   line: { x: 1, y: 2 },
   testA: 1,
index 5a6dea957450e905a91a9f26529a51144eb5a69b..9a403cebf63ccf19c36d0c3ec65a661d47b8e261 100644 (file)
@@ -9,7 +9,7 @@ interface test {
   testD?: Scriptable<number, ScriptableContext<ChartType>>
 }
 
-export const testImpl: test = {
+const testImpl: test = {
   pie: (ctx) => ctx.parsed,
   line: (ctx) => ctx.parsed.x + ctx.parsed.y,
   testA: (ctx) => ctx.parsed,
index 4f798650fe60ad628c7c45d496ae56a0a5eb5399..044f53f7cfbf7cc7b7605036a34ddb9db0d64ed9 100644 (file)
@@ -15,9 +15,9 @@ interface Context {
   chart: Chart;
 }
 
-export const ctx: Context = {
+const ctx: Context = {
   chart: chart
 };
 
 // @ts-expect-error Type '{ x: number; y: number; }[]' is not assignable to type 'number[]'.
-export const dataArray: number[] = chart.data.datasets[0].data;
+const dataArray: number[] = chart.data.datasets[0].data;