Skip to content

Commit 88f06cf

Browse files
committed
chore(samples): clean up deprecated imports and replace var with
let/const - Remove deprecated module imports flagged by @typescript-eslint/no-deprecated - Replace `var` declarations with `let`/`const` across sample sources
1 parent 413b7cb commit 88f06cf

351 files changed

Lines changed: 657 additions & 1692 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

browser/templates/shared/src/DataGridSharedData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class DataGridSharedData {
144144
const gender: string = this.getRandomGender();
145145
const firstName: string = this.getRandomNameFirst(gender);
146146
const lastName: string = this.getRandomNameLast();
147-
const initials = firstName.substr(0, 1).toLowerCase();
147+
const initials = firstName.substring(0, 1).toLowerCase();
148148
const email: string = initials + lastName.toLowerCase() + "@" + this.getRandomItem(emails);
149149

150150
const street: string = this.getRandomStreet();

samples/charts/category-chart/annotations-all/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default class Sample extends React.Component<any, any> {
126126
public get renderer(): ComponentRenderer {
127127
if (this._componentRenderer == null) {
128128
this._componentRenderer = new ComponentRenderer();
129-
var context = this._componentRenderer.context;
129+
const context = this._componentRenderer.context;
130130
PropertyEditorPanelDescriptionModule.register(context);
131131
CategoryChartDescriptionModule.register(context);
132132
}
@@ -137,4 +137,4 @@ export default class Sample extends React.Component<any, any> {
137137

138138
// rendering above component in the React DOM
139139
const root = ReactDOM.createRoot(document.getElementById('root'));
140-
root.render(<Sample/>);
140+
root.render(<Sample/>);

samples/charts/category-chart/annotations-callouts/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default class Sample extends React.Component<any, any> {
9696
public get renderer(): ComponentRenderer {
9797
if (this._componentRenderer == null) {
9898
this._componentRenderer = new ComponentRenderer();
99-
var context = this._componentRenderer.context;
99+
let context = this._componentRenderer.context;
100100
PropertyEditorPanelDescriptionModule.register(context);
101101
CategoryChartDescriptionModule.register(context);
102102
}

samples/charts/category-chart/annotations-crosshairs/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export default class Sample extends React.Component<any, any> {
108108
public get renderer(): ComponentRenderer {
109109
if (this._componentRenderer == null) {
110110
this._componentRenderer = new ComponentRenderer();
111-
var context = this._componentRenderer.context;
111+
let context = this._componentRenderer.context;
112112
PropertyEditorPanelDescriptionModule.register(context);
113113
CategoryChartDescriptionModule.register(context);
114114
}

samples/charts/category-chart/annotations-custom/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export default class Sample extends React.Component<any, any> {
9999
public get renderer(): ComponentRenderer {
100100
if (this._componentRenderer == null) {
101101
this._componentRenderer = new ComponentRenderer();
102-
var context = this._componentRenderer.context;
102+
let context = this._componentRenderer.context;
103103
PropertyEditorPanelDescriptionModule.register(context);
104104
CategoryChartDescriptionModule.register(context);
105105
}

samples/charts/category-chart/annotations-final-value/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default class Sample extends React.Component<any, any> {
9898
public get renderer(): ComponentRenderer {
9999
if (this._componentRenderer == null) {
100100
this._componentRenderer = new ComponentRenderer();
101-
var context = this._componentRenderer.context;
101+
let context = this._componentRenderer.context;
102102
PropertyEditorPanelDescriptionModule.register(context);
103103
CategoryChartDescriptionModule.register(context);
104104
}

samples/charts/category-chart/annotations-highlighting/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export default class Sample extends React.Component<any, any> {
101101
public get renderer(): ComponentRenderer {
102102
if (this._componentRenderer == null) {
103103
this._componentRenderer = new ComponentRenderer();
104-
var context = this._componentRenderer.context;
104+
let context = this._componentRenderer.context;
105105
PropertyEditorPanelDescriptionModule.register(context);
106106
CategoryChartDescriptionModule.register(context);
107107
}

samples/charts/category-chart/axis-gap/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default class Sample extends React.Component<any, any> {
110110
public get renderer(): ComponentRenderer {
111111
if (this._componentRenderer == null) {
112112
this._componentRenderer = new ComponentRenderer();
113-
var context = this._componentRenderer.context;
113+
let context = this._componentRenderer.context;
114114
PropertyEditorPanelDescriptionModule.register(context);
115115
LegendDescriptionModule.register(context);
116116
CategoryChartDescriptionModule.register(context);

samples/charts/category-chart/axis-gridlines/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default class Sample extends React.Component<any, any> {
166166
public get renderer(): ComponentRenderer {
167167
if (this._componentRenderer == null) {
168168
this._componentRenderer = new ComponentRenderer();
169-
var context = this._componentRenderer.context;
169+
let context = this._componentRenderer.context;
170170
PropertyEditorPanelDescriptionModule.register(context);
171171
LegendDescriptionModule.register(context);
172172
CategoryChartDescriptionModule.register(context);

samples/charts/category-chart/axis-inverted/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default class Sample extends React.Component<any, any> {
104104
public get renderer(): ComponentRenderer {
105105
if (this._componentRenderer == null) {
106106
this._componentRenderer = new ComponentRenderer();
107-
var context = this._componentRenderer.context;
107+
let context = this._componentRenderer.context;
108108
PropertyEditorPanelDescriptionModule.register(context);
109109
CategoryChartDescriptionModule.register(context);
110110
}

0 commit comments

Comments
 (0)