Skip to content

Commit f0aed25

Browse files
committed
Fix lint errors
1 parent b2569db commit f0aed25

File tree

9 files changed

+15
-18
lines changed

9 files changed

+15
-18
lines changed

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ export default defineConfig([
3030
'@tinymce/prefer-fun': 'off',
3131
'@tinymce/prefer-fun': 'off',
3232
'no-underscore-dangle': 'off',
33-
'@typescript-eslint/member-ordering': 'off'
33+
'@typescript-eslint/member-ordering': 'off',
34+
'@typescript-eslint/parameter-properties': 'off'
3435
}
3536
},
3637
{

stories/form-control/FormControl.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable no-console */
21
import { Component } from '@angular/core';
32
import { FormBuilder, FormControl } from '@angular/forms';
43
import { apiKey } from 'stories/Settings';
@@ -11,9 +10,9 @@ export class FormControlComponent {
1110
public apiKey = apiKey;
1211
public formControl: FormControl<string | null>;
1312

14-
// eslint-disable-next-line @typescript-eslint/no-parameter-properties
1513
public constructor(private readonly formBuilder: FormBuilder) {
1614
this.formControl = this.formBuilder.control<string | null>(null);
15+
// eslint-disable-next-line no-console
1716
this.formControl.valueChanges.subscribe(console.log);
1817
this.formControl.setValue('<p>Initial value</p>');
1918
// Console log should be triggered just once

stories/form-with-on-push/form-with-on-push.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* eslint-disable @typescript-eslint/unbound-method */
2-
/* eslint-disable @typescript-eslint/no-parameter-properties */
32
import {
43
Component,
54
ChangeDetectionStrategy,

stories/pipes/Safe.pipe.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
55
name: 'safe'
66
})
77
export class SafePipe implements PipeTransform {
8-
// eslint-disable-next-line @typescript-eslint/no-parameter-properties
98
public constructor(protected sanitizer: DomSanitizer) {}
109

1110
public transform(value: string, type: string): SafeHtml {

tinymce-angular-component/src/main/ts/editor/editor.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-parameter-properties */
21
import { isPlatformBrowser, CommonModule } from '@angular/common';
32
import {
43
AfterViewInit,
@@ -114,7 +113,7 @@ export class EditorComponent extends Events implements AfterViewInit, ControlVal
114113
elementRef: ElementRef,
115114
ngZone: NgZone,
116115
private cdRef: ChangeDetectorRef,
117-
@Inject(PLATFORM_ID) private platformId: Object,
116+
@Inject(PLATFORM_ID) private platformId: object,
118117
@Optional() @Inject(TINYMCE_SCRIPT_SRC) private tinymceScriptSrc?: string
119118
) {
120119
super();

tinymce-angular-component/src/main/ts/utils/Utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ const normalizePluginArray = (plugins?: string | string[]): string[] => {
8282
const mergePlugins = (initPlugins: string | string[], inputPlugins?: string | string[]) =>
8383
normalizePluginArray(initPlugins).concat(normalizePluginArray(inputPlugins));
8484

85-
// eslint-disable-next-line @typescript-eslint/no-empty-function
8685
const noop: (...args: any[]) => void = () => { };
8786

8887
const isNullOrUndefined = (value: any): value is null | undefined => value === null || value === undefined;

tinymce-angular-component/src/test/ts/alien/TestHooks.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ export interface EditorFixture<T> extends ComponentFixture<T> {
3535

3636
export type CreateEditorFixture<T> = (
3737
props?: Partial<
38-
Omit<
39-
EditorComponent,
40-
`${'on' | 'ng' | 'register' | 'set' | 'write'}${string}` | 'createElement' | 'initialise' | 'editor'
41-
>
38+
Omit<
39+
EditorComponent,
40+
`${'on' | 'ng' | 'register' | 'set' | 'write'}${string}` | 'createElement' | 'initialise' | 'editor'
41+
>
4242
>
4343
) => Promise<EditorFixture<T>>;
4444

tinymce-angular-component/src/test/ts/browser/NgModelTest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable max-classes-per-file */
1+
22
import '../alien/InitTestEnvironment';
33

44
import { Component } from '@angular/core';

tinymce-angular-component/src/test/ts/browser/PropTest.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ describe('PropTest', () => {
5959
const [ ed ] = await waitForEditorsToLoad(fixture);
6060
expect(ed.id).to.equal('my-id');
6161
});
62-
expect(containsIDWarning(warnings), 'Should not contain an ID warning').to.be.false;
62+
63+
expect(containsIDWarning(warnings) === false, 'Should not contain an ID warning');
6364
});
6465
});
6566

@@ -89,9 +90,9 @@ describe('PropTest', () => {
8990
const [ ed1, ed2 ] = await waitForEditorsToLoad(fixture);
9091
expect(ed1.id).to.equal('my-id-0');
9192
expect(ed1.getContent()).to.equal('<p>text1</p>');
92-
expect(ed2).to.be.undefined;
93+
expect(ed2).to.equal(undefined);
9394
});
94-
expect(containsIDWarning(warnings), 'Should contain an ID warning').to.be.true;
95+
expect(containsIDWarning(warnings) === true, 'Should contain an ID warning');
9596
});
9697

9798
it('INT-3299: creating more than one editor with different IDs does not log a warning', async () => {
@@ -110,10 +111,10 @@ describe('PropTest', () => {
110111
expect(ed2.editor?.getContent()).to.equal('<p>text1</p>');
111112
expect(ed3.id).to.equal('my-id-2');
112113
expect(ed3.editor?.getContent()).to.equal('<p>text2</p>');
113-
expect(ed4?.editor).to.be.undefined;
114+
expect(ed4?.editor).to.equal(undefined);
114115
}, 1000, 10000);
115116
});
116-
expect(containsIDWarning(warnings), 'Should not contain an ID warning').to.be.false;
117+
expect(containsIDWarning(warnings), 'Should not contain an ID warning').to.equal(false);
117118
});
118119
});
119120
});

0 commit comments

Comments
 (0)