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:
Denys Vuika
2020-04-19 23:29:20 +01:00
committed by GitHub
parent 6a84717a00
commit bf509843b7
96 changed files with 829 additions and 559 deletions

View File

@@ -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",

View File

@@ -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;
}
}

View File

@@ -36,7 +36,7 @@ describe('evaluators', () => {
}
};
expect(canOpenWithOffice(context, null)).toBeFalsy();
expect(canOpenWithOffice(context)).toBeFalsy();
});
it('should return [false] if no selection present', () => {

View File

@@ -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 &&