Skip to content

Commit

Permalink
Fixes tslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudify committed Jun 20, 2019
1 parent 953d9c1 commit d24185d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
18 changes: 16 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,25 @@ jobs:
tests:
<<: *defaults_js
steps:
# Install azure-functions-core-tools
# see https://github.com/Azure/azure-functions-core-tools#debian-9
- run:
command: |
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/debian/9/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-get update
sudo apt-get install azure-functions-core-tools
- checkout
- *restore_node_cache
- *install_node_modules

- run: yarn test
- run: 'bash <(curl -s https://codecov.io/bash)'
- run: "bash <(curl -s https://codecov.io/bash)"

lint:
<<: *defaults_js
Expand Down Expand Up @@ -69,4 +83,4 @@ workflows:
- danger:
filters:
branches:
ignore: master
ignore: master
4 changes: 1 addition & 3 deletions HttpTest/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { AzureFunction, Context, HttpRequest } from "@azure/functions";

import * as express from "express";
import createAzureFunctionHandler from "../src/createAzureFunctionsHandler";

const app = express();

app.get("/api/HttpTest/ping", (req, res) => {
app.get("/api/HttpTest/ping", (_, res) => {
res.send("PONG");
});

Expand Down
1 change: 1 addition & 0 deletions src/IncomingMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default class IncomingMessage extends EventEmitter {
headers: req.headers || {}, // Should always have a headers object
resume: NOOP,
socket: { destroy: NOOP },
// tslint:disable-next-line: no-any
url: (req as any).originalUrl
});
}
Expand Down
3 changes: 1 addition & 2 deletions src/OutgoingMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ export default class OutgoingMessage extends NativeOutgoingMessage {
// See https://github.com/expressjs/express/blob/master/lib/middleware/init.js#L29
public end: NativeOutgoingMessage["end"] = (
// tslint:disable-next-line: no-any
chunkOrCb?: any,
encodingOrCb?: string | (() => void)
chunkOrCb?: any
) => {
// 1. Write head
this.writeHead(this.statusCode); // Make jshttp/on-headers able to trigger
Expand Down
2 changes: 1 addition & 1 deletion src/createAzureFunctionsHandler.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Context } from "@azure/functions";
import { Application } from "express";

import ExpressAdapter, { RequestListener } from "./ExpressAdapter";
import ExpressAdapter from "./ExpressAdapter";

/**
* Creates a function ready to be exposed to Azure Function for request handling.
Expand Down

0 comments on commit d24185d

Please sign in to comment.