Commit 19edd595 authored by Marcelo Rivera's avatar Marcelo Rivera

(fix): lint

1 merge request!623Homepage redesign
Pipeline #97921267 running with stages
export * from './text-input-autocomplete.module';
export {
TextInputAutocompleteMenuComponent,
} from './text-input-autocomplete-menu.component';
export { TextInputAutocompleteMenuComponent } from './text-input-autocomplete-menu.component';
......@@ -79,9 +79,7 @@ export class FeaturedContentComponent implements OnInit {
component
);
const componentRef: ComponentRef<
any
> = this.dynamicHost.viewContainerRef.createComponent(
const componentRef: ComponentRef<any> = this.dynamicHost.viewContainerRef.createComponent(
componentFactory,
void 0,
this.injector
......
......@@ -81,9 +81,10 @@ export class UpdateMarkersService {
if (!opts.marker) throw 'marker must be set';
if (!opts.noReply) {
this.http
.post('api/v2/notifications/markers/read', opts)
.subscribe(res => null, err => console.warn(err));
this.http.post('api/v2/notifications/markers/read', opts).subscribe(
res => null,
err => console.warn(err)
);
}
for (let i = 0; i < this.data.length; i++) {
......
......@@ -132,10 +132,9 @@ describe('GroupsMembersModuleComponent', () => {
tick();
expect(membersComponent.load).toHaveBeenCalled();
expect(clientMock.get).toHaveBeenCalledWith(
'api/v1/groups/membership/11111',
{ limit: 21 }
);
expect(
clientMock.get
).toHaveBeenCalledWith('api/v1/groups/membership/11111', { limit: 21 });
expect(membersComponent.members).toEqual(successfulGroupResponse.members);
}));
......
......@@ -42,7 +42,9 @@
type="email"
id="email"
formControlName="email"
i18n-placeholder="email placeholder|@@FORMS__REGISTER__EMAIL_PLACEHOLDER"
i18n-placeholder="
email placeholder|@@FORMS__REGISTER__EMAIL_PLACEHOLDER
"
/>
</div>
<div class="mdl-cell mdl-cell--12-col" style="position: relative">
......
......@@ -61,9 +61,9 @@ export class NewsfeedEntityComponent {
this.getComponent(this.entity.type)
);
let componentRef: ComponentRef<
any
> = this.host.viewContainerRef.createComponent(componentFactory);
let componentRef: ComponentRef<any> = this.host.viewContainerRef.createComponent(
componentFactory
);
componentRef.instance.entity = this.entity;
componentRef.changeDetectorRef.detectChanges();
}
......
......@@ -240,9 +240,9 @@ export class ProSettingsComponent implements OnInit, OnDestroy {
getPreviewAssetSrc(type: string): string | SafeUrl {
if (this.settings[type]) {
if (!this.settings[type]._mindsBlobUrl) {
this.settings[type]._mindsBlobUrl = URL.createObjectURL(this.settings[
type
] as File);
this.settings[type]._mindsBlobUrl = URL.createObjectURL(
this.settings[type] as File
);
}
return this.sanitizer.bypassSecurityTrustUrl(
......
......@@ -13,10 +13,10 @@ let run = (cmd: string, env: any = {}, outputAsResult: boolean = true) => {
opts = {
env: {
...process.env,
...env
...env,
},
maxBuffer: 1024 * 1024,
stdio: <StdioOptions>(outputAsResult ? 'pipe' : 'inherit')
stdio: <StdioOptions>(outputAsResult ? 'pipe' : 'inherit'),
};
if (shell) {
......@@ -42,19 +42,22 @@ function transform(source, output) {
let fileContent = readFileSync(source).toString();
fileContent = fileContent
.replace(/\&#10;/g, "\n")
.replace(/\&#13;/g, "\n")
.replace(/<x\s+(.*?)\s*\/>/g, "{{$1}}")
.replace(/\&#10;/g, '\n')
.replace(/\&#13;/g, '\n')
.replace(/<x\s+(.*?)\s*\/>/g, '{{$1}}')
.replace(/{{id="INTERPOLATION" equiv-text="[^"]+"}}/g, '%1$s')
.replace(/{{id="INTERPOLATION_([0-9]+)" equiv-text="[^"]+"}}/g, (substring, match_1) => {
const idx = parseInt(match_1) + 1;
.replace(
/{{id="INTERPOLATION_([0-9]+)" equiv-text="[^"]+"}}/g,
(substring, match_1) => {
const idx = parseInt(match_1) + 1;
if (idx < 2) {
process.exit(1);
}
if (idx < 2) {
process.exit(1);
}
return `%${idx}$s`;
});
return `%${idx}$s`;
}
);
writeFileSync(output, fileContent);
}
......@@ -63,7 +66,10 @@ function transform(source, output) {
export = () => cb => {
run(`node_modules/.bin/ng xi18n --i18nFormat xlf`, {}, false);
transform(join(APP_SRC, 'messages.xlf'), join(APP_SRC, 'locale', argv.output || 'Default.xliff'));
transform(
join(APP_SRC, 'messages.xlf'),
join(APP_SRC, 'locale', argv.output || 'Default.xliff')
);
unlinkSync(join(APP_SRC, 'messages.xlf'));
cb();
......
Please register or to comment