update prettier (#790)

* update prettier

* enable auto-formatting for html
This commit is contained in:
Denys Vuika 2018-11-08 11:54:25 +00:00 committed by GitHub
parent 2dc2f51944
commit cb3754e29d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 69 additions and 63 deletions

View File

@ -4,9 +4,6 @@
"typescript.preferences.quoteStyle": "single",
"typescript.preferences.importModuleSpecifier": "relative",
"editor.formatOnSave": true,
"[html]": {
"editor.formatOnSave": false
},
"[json]": {
"editor.formatOnSave": false
}

6
package-lock.json generated
View File

@ -12486,9 +12486,9 @@
"dev": true
},
"prettier": {
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.14.2.tgz",
"integrity": "sha512-McHPg0n1pIke+A/4VcaS2en+pTNjy4xF+Uuq86u/5dyDO59/TtFZtQ708QIRkEZ3qwKz3GVkVa6mpxK/CpB8Rg==",
"version": "1.15.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.15.1.tgz",
"integrity": "sha512-4rgV2hyc/5Pk0XHH4VjJWHRgVjgRbpMfLQjREAhHBtyW1UvTFkjJEsueGYNYYZd9mn97K+1qv0EBwm11zoaSgA==",
"dev": true
},
"process": {

View File

@ -90,7 +90,7 @@
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"ng-packagr": "^4.4.0",
"prettier": "^1.14.2",
"prettier": "^1.15.1",
"protractor": "^5.4.0",
"rimraf": "2.6.2",
"rxjs-tslint-rules": "^4.8.0",

View File

@ -41,7 +41,9 @@ import { ExtensionService } from '@alfresco/adf-extensions';
@Component({
selector: 'app-dynamic-column',
template: `<ng-container #content></ng-container>`,
template: `
<ng-container #content></ng-container>
`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'app-dynamic-column' },

View File

@ -37,9 +37,7 @@ import { ShareDataRow } from '@alfresco/adf-content-services';
@Component({
selector: 'app-library-name-column',
template: `
<span
title="{{ displayTooltip }}"
(click)="onClick()">
<span title="{{ displayTooltip }}" (click)="onClick()">
{{ displayText }}
</span>
`,

View File

@ -42,10 +42,10 @@ import { ContentApiService } from '../../../services/content-api.service';
@Component({
selector: 'aca-location-link',
template: `
<a href="" [title]="nodeLocation$ | async" (click)="goToLocation()">
{{ displayText | async }}
</a>
`,
<a href="" [title]="nodeLocation$ | async" (click)="goToLocation()">
{{ displayText | async }}
</a>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
host: { class: 'aca-location-link adf-location-cell' }

View File

@ -36,9 +36,7 @@ import { MinimalNodeEntity } from 'alfresco-js-api';
@Component({
selector: 'app-name-column',
template: `
<span
title="{{ node | adfNodeNameTooltip }}"
(click)="onClick()">
<span title="{{ node | adfNodeNameTooltip }}" (click)="onClick()">
{{ displayText }}
</span>
`,

View File

@ -35,10 +35,7 @@ import { MinimalNodeEntity } from 'alfresco-js-api';
@Component({
selector: 'app-trashcan-name-column',
template: `
<span
title="{{ node | adfNodeNameTooltip }}">
{{ displayText }}
</span>
<span title="{{ node | adfNodeNameTooltip }}">{{ displayText }}</span>
`,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,

View File

@ -30,8 +30,11 @@ import { NodePermissionService } from '../../../services/node-permission.service
@Component({
selector: 'app-comments-tab',
template: `
<adf-comments [readOnly]="!canUpdateNode" [nodeId]="node?.id"></adf-comments>
`
<adf-comments
[readOnly]="!canUpdateNode"
[nodeId]="node?.id"
></adf-comments>
`
})
export class CommentsTabComponent {
@Input()

View File

@ -36,9 +36,10 @@ import { AppConfigService } from '@alfresco/adf-core';
[readOnly]="!canUpdateNode"
[displayEmpty]="canUpdateNode"
[preset]="'custom'"
[node]="node">
[node]="node"
>
</adf-content-metadata-card>
`,
`,
encapsulation: ViewEncapsulation.None,
host: { class: 'app-metadata-tab' }
})

View File

@ -29,21 +29,26 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
@Component({
selector: 'app-versions-tab',
template: `
<ng-container *ngIf="isFileSelected;else empty">
<adf-version-manager
[showComments]="'adf-version-manager.allowComments' | adfAppConfig:true"
[allowDownload]="'adf-version-manager.allowDownload' | adfAppConfig:true"
[node]="node">
</adf-version-manager>
</ng-container>
<ng-container *ngIf="isFileSelected; else: empty">
<adf-version-manager
[showComments]="
'adf-version-manager.allowComments' | adfAppConfig: true
"
[allowDownload]="
'adf-version-manager.allowDownload' | adfAppConfig: true
"
[node]="node"
>
</adf-version-manager>
</ng-container>
<ng-template #empty>
<div class="adf-manage-versions-empty">
<mat-icon class="adf-manage-versions-empty-icon">face</mat-icon>
{{ 'VERSION.SELECTION.EMPTY' | translate }}
</div>
</ng-template>
`
<ng-template #empty>
<div class="adf-manage-versions-empty">
<mat-icon class="adf-manage-versions-empty-icon">face</mat-icon>
{{ 'VERSION.SELECTION.EMPTY' | translate }}
</div>
</ng-template>
`
})
export class VersionsTabComponent implements OnInit, OnChanges {
@Input()

View File

@ -33,7 +33,9 @@ import {
@Component({
selector: 'app-page-layout-content',
template: `<ng-content></ng-content>`,
template: `
<ng-content></ng-content>
`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'app-page-layout-content' }

View File

@ -31,7 +31,9 @@ import {
@Component({
selector: 'app-page-layout-error',
template: `<ng-content></ng-content>`,
template: `
<ng-content></ng-content>
`,
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'app-page-layout-error' }

View File

@ -39,7 +39,9 @@ import { MinimalNodeEntryEntity } from 'alfresco-js-api';
@Component({
selector: 'app-preview-extension',
template: `<div #content></div>`
template: `
<div #content></div>
`
})
export class PreviewExtensionComponent implements OnInit, OnChanges, OnDestroy {
@ViewChild('content', { read: ViewContainerRef })

View File

@ -33,10 +33,7 @@ import { ToggleDocumentDisplayMode } from '../../../store/actions';
@Component({
selector: 'app-document-display-mode',
template: `
<button
mat-icon-button
color="primary"
(click)="onClick()">
<button mat-icon-button color="primary" (click)="onClick()">
<mat-icon *ngIf="(displayMode$ | async) === 'list'">view_comfy</mat-icon>
<mat-icon *ngIf="(displayMode$ | async) === 'gallery'">list</mat-icon>
</button>

View File

@ -35,15 +35,16 @@ import { ContentManagementService } from '../../../services/content-management.s
selector: 'app-toggle-favorite',
template: `
<button
mat-menu-item
#favorites="adfFavorite"
(toggle)="onToggleEvent()"
[adf-node-favorite]="(selection$ | async).nodes">
<mat-icon *ngIf="favorites.hasFavorites()">star</mat-icon>
<mat-icon *ngIf="!favorites.hasFavorites()">star_border</mat-icon>
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
mat-menu-item
#favorites="adfFavorite"
(toggle)="onToggleEvent()"
[adf-node-favorite]="(selection$ | async).nodes"
>
<mat-icon *ngIf="favorites.hasFavorites()">star</mat-icon>
<mat-icon *ngIf="!favorites.hasFavorites()">star_border</mat-icon>
<span>{{ 'APP.ACTIONS.FAVORITE' | translate }}</span>
</button>
`,
`,
encapsulation: ViewEncapsulation.None,
host: { class: 'app-toggle-favorite' }
})

View File

@ -33,14 +33,15 @@ import { ToggleInfoDrawerAction } from '../../../store/actions';
@Component({
selector: 'app-toggle-info-drawer',
template: `
<button
mat-icon-button
[color]="(infoDrawerOpened$ | async) ? 'accent' : 'primary'"
[attr.title]="'APP.ACTIONS.DETAILS' | translate"
(click)="onClick()">
<mat-icon>info_outline</mat-icon>
</button>
`,
<button
mat-icon-button
[color]="(infoDrawerOpened$ | async) ? 'accent' : 'primary'"
[attr.title]="'APP.ACTIONS.DETAILS' | translate"
(click)="onClick()"
>
<mat-icon>info_outline</mat-icon>
</button>
`,
encapsulation: ViewEncapsulation.None,
host: { class: 'app-toggle-info-drawer' }
})