From 12abac0339ceb2a918e14bffe1ed0e1457b1d965 Mon Sep 17 00:00:00 2001 From: Eugenio Romano Date: Mon, 20 Feb 2017 14:23:01 +0000 Subject: [PATCH] add tslint in demo shell #1641 (#1642) --- demo-shell-ng2/app/app.module.ts | 1 - .../components/activiti/activiti-demo.component.ts | 12 ++++++------ .../app/components/search/search.component.ts | 1 - demo-shell-ng2/package.json | 4 ++-- demo-shell-ng2/tslint.json | 10 ++++------ 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/demo-shell-ng2/app/app.module.ts b/demo-shell-ng2/app/app.module.ts index 4fd0305b80..5dde42379f 100644 --- a/demo-shell-ng2/app/app.module.ts +++ b/demo-shell-ng2/app/app.module.ts @@ -96,4 +96,3 @@ import { bootstrap: [ AppComponent ] }) export class AppModule { } - diff --git a/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts b/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts index 7c030da7f1..bc7c0a130c 100644 --- a/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts +++ b/demo-shell-ng2/app/components/activiti/activiti-demo.component.ts @@ -104,8 +104,8 @@ export class ActivitiDemoComponent implements AfterViewInit { this.dataTasks = new ObjectDataTableAdapter( [], [ - { type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true }, - { type: 'text', key: 'created', title: 'Created', cssClass: 'hidden', sortable: true } + {type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true}, + {type: 'text', key: 'created', title: 'Created', cssClass: 'hidden', sortable: true} ] ); this.dataTasks.setSorting(new DataSorting('created', 'desc')); @@ -113,8 +113,8 @@ export class ActivitiDemoComponent implements AfterViewInit { this.dataProcesses = new ObjectDataTableAdapter( [], [ - { type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true }, - { type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true } + {type: 'text', key: 'name', title: 'Name', cssClass: 'full-width name-column', sortable: true}, + {type: 'text', key: 'started', title: 'Started', cssClass: 'hidden', sortable: true} ] ); this.dataProcesses.setSorting(new DataSorting('started', 'desc')); @@ -211,8 +211,8 @@ export class ActivitiDemoComponent implements AfterViewInit { this.selectFirstElementInReportList(); } - selectFirstElementInReportList(){ - if (! this.analyticsreportlist.isReportsEmpty()) { + selectFirstElementInReportList() { + if (!this.analyticsreportlist.isReportsEmpty()) { this.analyticsreportlist.selectReport(this.analyticsreportlist.reports[0]); } } diff --git a/demo-shell-ng2/app/components/search/search.component.ts b/demo-shell-ng2/app/components/search/search.component.ts index 9882609249..971af0e758 100644 --- a/demo-shell-ng2/app/components/search/search.component.ts +++ b/demo-shell-ng2/app/components/search/search.component.ts @@ -17,7 +17,6 @@ import { Component } from '@angular/core'; import { Router } from '@angular/router'; -import { MinimalNodeEntity } from 'alfresco-js-api'; @Component({ selector: 'search-component', diff --git a/demo-shell-ng2/package.json b/demo-shell-ng2/package.json index 5e66c148e9..6295601882 100644 --- a/demo-shell-ng2/package.json +++ b/demo-shell-ng2/package.json @@ -9,10 +9,10 @@ "start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0", "clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'", "test": "karma start", - "build": "npm run server-versions && rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail", + "build": "npm run tslint && npm run server-versions && rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail", "server-versions": "rimraf versions.json && npm list --depth=0 --json=true --prod=true > versions.json || exit 0", "aws": "node app.js", - "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts'", + "tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts' -e 'app/vendor.ts' -e 'app/polyfills.ts' ", "licensecheck": "license-check" }, "repository": { diff --git a/demo-shell-ng2/tslint.json b/demo-shell-ng2/tslint.json index aacef3b7ac..999106027f 100644 --- a/demo-shell-ng2/tslint.json +++ b/demo-shell-ng2/tslint.json @@ -3,7 +3,6 @@ "align": [ true, "parameters", - "arguments", "statements" ], "ban": false, @@ -29,15 +28,14 @@ ], "member-ordering": [ true, - "public-before-private", "static-before-instance", "variables-before-functions" ], "no-any": false, "no-arg": true, - "no-bitwise": true, + "no-bitwise": false, "no-conditional-assignment": true, - "no-consecutive-blank-lines": false, + "no-consecutive-blank-lines": true, "no-console": [ true, "debug", @@ -51,7 +49,7 @@ "no-debugger": true, "no-duplicate-key": true, "no-duplicate-variable": true, - "no-empty": true, + "no-empty": false, "no-eval": true, "no-inferrable-types": false, "no-internal-module": true, @@ -64,7 +62,7 @@ "no-unused-variable": true, "no-use-before-declare": true, "no-var-keyword": true, - "no-var-requires": false, + "no-var-requires": true, "object-literal-sort-keys": false, "one-line": [ true,