Skip to content

Commit 0c83843

Browse files
authored
Disable warning of unused variables in types/tests (#8607)
1 parent 7dce94e commit 0c83843

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

types/tests/.eslintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rules:
2+
'@typescript-eslint/no-unused-vars': 'off'

types/tests/layout/position.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { LayoutPosition } from '../../index.esm';
22

3-
export const left: LayoutPosition = 'left';
4-
export const right: LayoutPosition = 'right';
5-
export const top: LayoutPosition = 'top';
6-
export const bottom: LayoutPosition = 'bottom';
7-
export const center: LayoutPosition = 'center';
8-
export const axis: LayoutPosition = { x: 10 };
3+
const left: LayoutPosition = 'left';
4+
const right: LayoutPosition = 'right';
5+
const top: LayoutPosition = 'top';
6+
const bottom: LayoutPosition = 'bottom';
7+
const center: LayoutPosition = 'center';
8+
const axis: LayoutPosition = { x: 10 };
99

1010
// @ts-expect-error invalid position
11-
export const invalid: LayoutPosition = 'none';
11+
const invalid: LayoutPosition = 'none';

types/tests/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Chart } from '../index.esm';
22

3-
export const chart = new Chart('test', {
3+
const chart = new Chart('test', {
44
type: 'bar',
55
data: {
66
labels: ['a'],

types/tests/parsed.data.type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface test {
88
testC: ParsedDataType<'pie' | 'line' | 'bar'>
99
}
1010

11-
export const testImpl: test = {
11+
const testImpl: test = {
1212
pie: 1,
1313
line: { x: 1, y: 2 },
1414
testA: 1,

types/tests/scriptable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ interface test {
99
testD?: Scriptable<number, ScriptableContext<ChartType>>
1010
}
1111

12-
export const testImpl: test = {
12+
const testImpl: test = {
1313
pie: (ctx) => ctx.parsed,
1414
line: (ctx) => ctx.parsed.x + ctx.parsed.y,
1515
testA: (ctx) => ctx.parsed,

types/tests/test_instance_assignment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ interface Context {
1515
chart: Chart;
1616
}
1717

18-
export const ctx: Context = {
18+
const ctx: Context = {
1919
chart: chart
2020
};
2121

2222
// @ts-expect-error Type '{ x: number; y: number; }[]' is not assignable to type 'number[]'.
23-
export const dataArray: number[] = chart.data.datasets[0].data;
23+
const dataArray: number[] = chart.data.datasets[0].data;

0 commit comments

Comments
 (0)