Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Commit c8c9d98

Browse files
authored
fix: linting error with new version (#156)
1 parent b71be98 commit c8c9d98

5 files changed

Lines changed: 28 additions & 24 deletions

File tree

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@ stages:
44
- name: test
55
if: tag IS blank
66
- name: deploy
7-
if: branch = master
7+
if: branch = master AND type != pull_request
88

99
notifications:
1010
email: false
1111

12+
env:
13+
- BUILD_LEADER_ID=4
14+
1215
jobs:
1316
include:
1417
- stage: test
@@ -19,10 +22,6 @@ jobs:
1922
node_js: '7'
2023
after_success:
2124
- npm install coveralls@^2.11.9 && cat ./coverage/lcov.info | coveralls
22-
- stage: deploy
23-
node_js: '8'
24-
before_script: npm run build
25-
script: npm run semantic-release
2625
- stage: deploy
2726
node_js: '8'
2827
script: npm run typedoc
@@ -31,3 +30,8 @@ jobs:
3130
skip_cleanup: true
3231
github_token: $GH_TOKEN
3332
local_dir: ./docs
33+
- stage: deploy
34+
node_js: '8'
35+
before_script: npm run build
36+
script: echo "Deploy with semantic release"
37+
after_success: npm run semantic-release

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ but not a great piece of musical history! We compose routes for you. giuseppe is
66
[Express](http://expressjs.com/) and depends on it. We were tired of writing all the route registrations by ourselves.
77

88
[![Build Status](https://travis-ci.org/smartive/giuseppe.svg)](https://travis-ci.org/smartive/giuseppe)
9-
[![Build status](https://ci.appveyor.com/api/projects/status/7m14ruqjaopwbfn4?svg=true)](https://ci.appveyor.com/project/buehler/giuseppe)
9+
[![Build Status](https://ci.appveyor.com/api/projects/status/7m14ruqjaopwbfn4?svg=true)](https://ci.appveyor.com/project/buehler/giuseppe)
1010
[![npm](https://img.shields.io/npm/v/giuseppe.svg?maxAge=3600)](https://www.npmjs.com/package/giuseppe)
1111
[![Coverage status](https://img.shields.io/coveralls/smartive/giuseppe.svg?maxAge=3600)](https://coveralls.io/github/smartive/giuseppe)
1212
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

docs/index.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
layout: default
33
title: giuseppe - by smartive AG
44
---
5-
giuseppe [Italian: dʒuˈzɛppe] is a controller routing system for [Express](http://expressjs.com/) using [TypeScript](https://www.typescriptlang.org/)
6-
decorators and annotations named after the great Italian componist Giuseppe Verdi. Like Verdi,
5+
giuseppe [Italian: dʒuˈzɛppe] is a controller routing system for [Express](http://expressjs.com/) using [TypeScript](https://www.typescriptlang.org/)
6+
decorators and annotations named after the great Italian componist Giuseppe Verdi. Like Verdi,
77
it composes things, but not a great piece of musical history! We compose routes for you. giuseppe is dedicated to
88
[Express](http://expressjs.com/) and depends on it. We were tired of writing all the route registrations by ourselves.
99

1010
[![Build Status](https://travis-ci.org/smartive/giuseppe.svg)](https://travis-ci.org/smartive/giuseppe)
11+
[![Build Status](https://ci.appveyor.com/api/projects/status/7m14ruqjaopwbfn4?svg=true)](https://ci.appveyor.com/project/buehler/giuseppe)
1112
[![npm](https://img.shields.io/npm/v/giuseppe.svg?maxAge=3600)](https://www.npmjs.com/package/giuseppe)
1213
[![Coverage status](https://img.shields.io/coveralls/smartive/giuseppe.svg?maxAge=3600)](https://coveralls.io/github/smartive/giuseppe)
1314
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
@@ -27,15 +28,15 @@ To install this package, simply run
2728

2829
[![NPM](https://nodei.co/npm/giuseppe.png?downloads=true&stars=true)](https://nodei.co/npm/giuseppe/)
2930

30-
The suggested method would actually be: use the yeoman generator which we created @
31+
The suggested method would actually be: use the yeoman generator which we created @
3132
[generator-giuseppe](https://github.com/smartive/generator-giuseppe).
3233
It installs all dependencies and libraries that you need.
3334

3435
When you use the manual way npm should install all typing dependencies.
3536
They are listed in the `package.json` with the `@types` prefix.
3637

3738
This package installs the transpiled `*.js` files instead of `*.ts` files, since the compiler tries
38-
to compile them everytime. The declaration files with the JSDocs are provided aswell so your
39+
to compile them everytime. The declaration files with the JSDocs are provided aswell so your
3940
autocomplete does work as it should.
4041

4142
## Migrate to new major versions
@@ -83,12 +84,12 @@ import { Controller, Get, Giuseppe } from 'giuseppe';
8384

8485
@Controller()
8586
class PingPongController {
86-
87+
8788
@Get('ping')
8889
public ping(): any {
8990
return {ping: 'pong'};
9091
}
91-
92+
9293
}
9394

9495
const giusi = new Giuseppe();
@@ -110,22 +111,22 @@ import { Controller, Get, Query } from 'giuseppe';
110111

111112
@Controller()
112113
export class PingPongController {
113-
114+
114115
@Get('ping')
115116
public ping(): any {
116117
return {ping: 'pong'};
117118
}
118-
119+
119120
}
120121

121122
@Controller('echo')
122123
export class EchoController {
123-
124+
124125
@Get()
125126
public ping(@Query('data') data: string): string {
126127
return 'you gave me: ' + data;
127128
}
128-
129+
129130
}
130131
```
131132

@@ -164,7 +165,7 @@ We're happy if you have any contributions! Every participation counts. Feel free
164165
open pull requests, issues or use any other form of contribution. Maybe we'll
165166
set up a `CONTRIBUTING.md` file in the future. soon(tm).
166167

167-
If you want to create a plugin for giuseppe, use the other yeoman generator @
168+
If you want to create a plugin for giuseppe, use the other yeoman generator @
168169
[generator-giuseppe-plugin](https://github.com/smartive/generator-giuseppe-plugin)
169170

170171
[Full list of contributors](https://github.com/smartive/giuseppe/graphs/contributors)

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,20 @@
5050
"@types/express": "^4.0.39",
5151
"@types/glob": "^5.0.33",
5252
"@types/http-status": "^0.2.30",
53-
"@types/node": "^8.0.47",
53+
"@types/node": "^8.0.53",
5454
"express": "^4.16.2",
5555
"glob": "^7.1.2",
5656
"http-status": "^1.0.1",
5757
"reflect-metadata": "^0.1.10",
5858
"tslib": "^1.8.0"
5959
},
6060
"devDependencies": {
61-
"@types/jest": "^21.1.5",
61+
"@types/jest": "^21.1.8",
6262
"del-cli": "^1.1.0",
6363
"jest": "^21.2.1",
64-
"ts-jest": "^21.1.4",
64+
"ts-jest": "^21.2.3",
6565
"tslint": "^5.8.0",
66-
"tslint-config-airbnb": "^5.3.0",
66+
"tslint-config-airbnb": "^5.4.2",
6767
"tsutils": "^2.12.2",
6868
"typedoc": "^0.9.0",
6969
"typescript": "^2.6.1",

src/core/parameters/GiuseppeBaseParameter.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const PRIMITIVE_TYPES: Function[] = [Object, String, Array, Number, Boolean];
1616
/**
1717
* Giuseppe base parameter class. Is used for all core parameters (like cookie or body) to generalize
1818
* some logic.
19-
*
19+
*
2020
* @export
2121
* @abstract
2222
* @class GiuseppeBaseParameter
@@ -56,9 +56,8 @@ export abstract class GiuseppeBaseParameter implements ParameterDefinition {
5656
const ctor = this.type as any;
5757
if (rawValue.constructor === ctor) {
5858
return rawValue;
59-
} else {
60-
return PRIMITIVE_TYPES.indexOf(ctor) !== -1 ? ctor(rawValue) : new ctor(rawValue);
6159
}
60+
return PRIMITIVE_TYPES.indexOf(ctor) !== -1 ? ctor(rawValue) : new ctor(rawValue);
6261
};
6362
}
6463

0 commit comments

Comments
 (0)