mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
integrate Prettier with tslint (#1419)
* integrate prettier with tslint * remove obsolte scripts * update tsconfig * fix lint issues * fix lint errors * more rules and fixes * kebab case and lint fixes * update helpers * update util
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/@alfresco/adf-office-services-ext",
|
||||
"lib": {
|
||||
"entryFile": "src/public_api.ts",
|
||||
"entryFile": "src/public-api.ts",
|
||||
"flatModuleFile": "adf-office-services-ext",
|
||||
"umdModuleIds": {
|
||||
"@alfresco/js-api": "@alfresco/js-api",
|
||||
|
@@ -81,7 +81,7 @@ export class AosEditOnlineService {
|
||||
|
||||
private onAlreadyLockedNotification(nodeId: string, lockOwner: string) {
|
||||
this.notificationService.openSnackMessage(
|
||||
`Document {nodeId} locked by {lockOwner}`,
|
||||
`Document ${nodeId} locked by ${lockOwner}`,
|
||||
3000
|
||||
);
|
||||
}
|
||||
@@ -155,12 +155,12 @@ export class AosEditOnlineService {
|
||||
}
|
||||
|
||||
private isFile(node: MinimalNodeEntryEntity): boolean {
|
||||
const implicitFile = (<any>node).nodeId || (<any>node).guid;
|
||||
const implicitFile = (node as any).nodeId || (node as any).guid;
|
||||
|
||||
return !!implicitFile || node.isFile;
|
||||
}
|
||||
|
||||
private getNodeId(node: MinimalNodeEntryEntity): string {
|
||||
return (<any>node).nodeId || (<any>node).guid || node.id;
|
||||
return (node as any).nodeId || (node as any).guid || node.id;
|
||||
}
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@ describe('evaluators', () => {
|
||||
}
|
||||
};
|
||||
|
||||
expect(canOpenWithOffice(context, null)).toBeFalsy();
|
||||
expect(canOpenWithOffice(context)).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should return [false] if no selection present', () => {
|
||||
|
@@ -23,13 +23,10 @@
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { RuleContext, RuleParameter } from '@alfresco/adf-extensions';
|
||||
import { RuleContext } from '@alfresco/adf-extensions';
|
||||
import { getFileExtension, supportedExtensions } from './utils';
|
||||
|
||||
export function canOpenWithOffice(
|
||||
context: RuleContext,
|
||||
...args: RuleParameter[]
|
||||
): boolean {
|
||||
export function canOpenWithOffice(context: RuleContext): boolean {
|
||||
if (
|
||||
context.navigation &&
|
||||
context.navigation.url &&
|
||||
|
Reference in New Issue
Block a user