[AAE-10474] review why xit and console log is allowed to be committed (#7829)

* [AAE-10474] Add husky pre-commit script to run lint-staged

* [AAE-10474] Enable lint rules for console log

* [AAE-10474] Run affected:lint command on pre-commit, remoive old scripts that use tslint

* [AAE-10474] Remove console.log

* [AAE-10474] Disable no-console lint rule for 'testing' and 'cli' projects
This commit is contained in:
Amedeo Lepore
2022-09-16 11:25:11 +02:00
committed by GitHub
parent a1d8b9e96e
commit 48b92389ea
7 changed files with 36 additions and 18 deletions

View File

@@ -386,7 +386,7 @@ describe('PaginationComponent', () => {
const expectedPages = [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 101];
console.log(component.pagination.totalItems, component.pagination.skipCount);
expect(component.limitedPages).toEqual(expectedPages);
expect(component.limitedPages).not.toEqual(component.pages);
});

View File

@@ -74,7 +74,7 @@ export class RichTextEditorComponent implements OnInit, OnDestroy, AfterViewInit
this.editorInstance.save().then((outputData) => {
this._outputData.next(outputData);
}).catch((error) => {
console.log('Saving failed: ', error);
console.error('Saving failed: ', error);
});
}