[AAE-7101] - Introduced Eslint to ACA and added some fix to avoid errors (#2424)

* Conversion to ESlint

* Fixed ESLINT for ACA

* [AAE-6638] - typo in eslint file

* [AAE-6638] - attempt to fix problem on linting

* Check caching to improve lint speed

* Improved eslint for content-app

* Added new cache

* Remove cache file

* Removed eslintcache

* Attempt to make eslint run on travis

* Slow ng lint on travis

* Fixed eslint error
This commit is contained in:
Vito
2022-02-09 08:40:04 +00:00
committed by GitHub
parent fde64be498
commit 23262d0949
72 changed files with 3979 additions and 702 deletions

View File

@@ -122,9 +122,7 @@ describe('ExtensionsDataLoaderGuard', () => {
it('should call canActivate only once', () => {
const subject1 = new Subject<true>();
const extensionLoaders = {
fct1: function () {
return subject1.asObservable();
}
fct1: () => subject1.asObservable()
};
const extensionLoaderSpy = spyOn(extensionLoaders, 'fct1').and.callThrough();
const guard = new ExtensionsDataLoaderGuard([extensionLoaders.fct1]);

View File

@@ -30,9 +30,7 @@ import { tap, map, catchError } from 'rxjs/operators';
export type ExtensionLoaderCallback = (route: ActivatedRouteSnapshot) => Observable<boolean>;
export function DefaultExtensionLoaderFactory() {
return [];
}
export const DefaultExtensionLoaderFactory = () => [];
export const EXTENSION_DATA_LOADERS = new InjectionToken<ExtensionLoaderCallback[]>('EXTENSION_DATA_LOADERS', {
providedIn: 'root',
@@ -64,9 +62,9 @@ export class ExtensionsDataLoaderGuard implements CanActivate {
map(() => true),
tap(() => (this.invoked = true)),
catchError((e) => {
// tslint:disable-next-line
// eslint-disable-next-line no-console
console.error('Some of the extension data loader guards has been errored.');
// tslint:disable-next-line
// eslint-disable-next-line no-console
console.error(e);
return of(true);
})