Skip to content

Commit 5c8af59

Browse files
committed
Enable no-deprecated #10723
1 parent 7ae2739 commit 5c8af59

File tree

6 files changed

+10
-2
lines changed

6 files changed

+10
-2
lines changed

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ function tsFiles(files, extraRules = {}) {
7777
'@typescript-eslint/no-unsafe-return': 'off',
7878
'@typescript-eslint/prefer-nullish-coalescing': 'off', // Usually a good idea, but sometimes dangerous false-positive
7979
'@typescript-eslint/unbound-method': 'off',
80-
'@typescript-eslint/no-deprecated': 'off', // TODO Angular 19: enable and solves them
8180
'@typescript-eslint/no-unnecessary-type-parameters': 'off', // The doc is scary, let's revisit this when we have time
8281
'@angular-eslint/prefer-signals': [
8382
'error',

projects/natural-editor/src/lib/editor/editor.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ export class NaturalEditorComponent implements OnInit, OnDestroy, ControlValueAc
175175
}
176176

177177
private createPlugins(): Plugin[] {
178+
// eslint-disable-next-line @typescript-eslint/no-deprecated
178179
const isMac = !!this.document.defaultView?.navigator.platform.match(/Mac/);
179180

180181
const plugins = [

projects/natural/src/lib/classes/utility.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ export function copyToClipboard(document: Document, text: string): void {
206206
document.body.append(input);
207207
input.value = text;
208208
input.select();
209+
// eslint-disable-next-line @typescript-eslint/no-deprecated
209210
document.execCommand('copy');
210211
document.body.removeChild(input);
211212
}

projects/natural/src/lib/modules/common/pipes/ellipsis.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ import {Pipe, PipeTransform} from '@angular/core';
66
})
77
export class NaturalEllipsisPipe implements PipeTransform {
88
public transform(value: string, limit: number): string {
9-
return value.substr(0, limit - 1) + (value.length > limit ? '…' : '');
9+
return value.substring(0, limit - 1) + (value.length > limit ? '…' : '');
1010
}
1111
}

projects/natural/src/lib/modules/file/component/file.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ export class NaturalFileComponent implements OnInit, OnChanges {
174174
subject.next(btoa(ev.target.result));
175175
subject.complete();
176176
});
177+
// eslint-disable-next-line @typescript-eslint/no-deprecated
177178
reader.readAsBinaryString(file);
178179

179180
return subject.asObservable();

projects/natural/src/lib/modules/hierarchic-selector/hierarchic-selector/hierarchic-selector.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,11 @@ export class NaturalHierarchicSelectorComponent implements OnInit, OnChanges {
108108
*/
109109
public flatNodesSelection!: SelectionModel<HierarchicFlatNode>;
110110

111+
// eslint-disable-next-line @typescript-eslint/no-deprecated
111112
public treeControl!: FlatTreeControl<HierarchicFlatNode>;
113+
// eslint-disable-next-line @typescript-eslint/no-deprecated
112114
public treeFlattener!: MatTreeFlattener<HierarchicModelNode, HierarchicFlatNode>;
115+
// eslint-disable-next-line @typescript-eslint/no-deprecated
113116
public dataSource!: MatTreeFlatDataSource<HierarchicModelNode, HierarchicFlatNode>;
114117

115118
public loading = false;
@@ -140,16 +143,19 @@ export class NaturalHierarchicSelectorComponent implements OnInit, OnChanges {
140143
this.flatNodesSelection = new SelectionModel<any>(this.multiple);
141144

142145
// Tree controllers and manipulators
146+
// eslint-disable-next-line @typescript-eslint/no-deprecated
143147
this.treeFlattener = new MatTreeFlattener(
144148
this.transformer(),
145149
this.getLevel(),
146150
this.isExpandable(),
147151
this.getChildren(),
148152
);
153+
// eslint-disable-next-line @typescript-eslint/no-deprecated
149154
this.treeControl = new FlatTreeControl<HierarchicFlatNode>(this.getLevel(), this.isExpandable());
150155

151156
// The dataSource contains a nested ModelNodes list. Each ModelNode has a child attribute that returns an observable.
152157
// The dataSource contains a flat representation of the nested ModelNodes that is generated by the treeFlattener related functions
158+
// eslint-disable-next-line @typescript-eslint/no-deprecated
153159
this.dataSource = new MatTreeFlatDataSource(this.treeControl, this.treeFlattener);
154160

155161
// Update dataSource when receiving new list -> we assign the whole tree

0 commit comments

Comments
 (0)