mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
Improved ESLint configuration, integrated spellcheck and error fixes (#8931)
* integrate cspell with eslint, improved configuration * core: fix linting errors * core: fix lint warnings * content: lint fixes * process service lint fixes * lint: process services cloud * lint: insights * lint: extensions * [ci:force] lint: cli fixes * [ci:force] comment out dead code * [ci:force] exclude dead code * fix code and tests * rollback some changes * fix testing lib * fix demo shell * minor lint warning fixes * minor lint fixes * fix process services
This commit is contained in:
@@ -24,10 +24,10 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
@Component({
|
||||
template: `<div tabindex="0" adf-auto-focus> Test</div>`
|
||||
})
|
||||
class AutoFoucsTestComponent {}
|
||||
class AutoFocusTestComponent {}
|
||||
|
||||
describe('AutoFocusDirective', () => {
|
||||
let fixture: ComponentFixture<AutoFoucsTestComponent>;
|
||||
let fixture: ComponentFixture<AutoFocusTestComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
@@ -36,10 +36,10 @@ describe('AutoFocusDirective', () => {
|
||||
],
|
||||
declarations: [
|
||||
AutoFocusDirective,
|
||||
AutoFoucsTestComponent
|
||||
AutoFocusTestComponent
|
||||
]
|
||||
});
|
||||
fixture = TestBed.createComponent(AutoFoucsTestComponent);
|
||||
fixture = TestBed.createComponent(AutoFocusTestComponent);
|
||||
});
|
||||
|
||||
it('should focus the element after content is initialized', fakeAsync(() => {
|
||||
|
@@ -118,7 +118,7 @@ export class NodeDeleteDirective implements OnChanges {
|
||||
|
||||
let promise: Promise<any>;
|
||||
|
||||
if (node.entry.hasOwnProperty('archivedAt') && node.entry['archivedAt']) {
|
||||
if (Object.prototype.hasOwnProperty.call(node.entry, 'archivedAt') && node.entry['archivedAt']) {
|
||||
promise = this.trashcanApi.deleteDeletedNode(id);
|
||||
} else {
|
||||
promise = this.nodesApi.deleteNode(id, { permanent: this.permanent });
|
||||
|
@@ -130,7 +130,7 @@ export class NodeFavoriteDirective implements OnChanges {
|
||||
const node: Node | SharedLink = selected.entry;
|
||||
|
||||
// ACS 6.x with 'isFavorite' include
|
||||
if (node?.hasOwnProperty('isFavorite')) {
|
||||
if (node && Object.prototype.hasOwnProperty.call(node, 'isFavorite')) {
|
||||
return of(selected);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user