Skip to content

Commit

Permalink
Allow ! operator
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrotoff committed Jul 6, 2023
1 parent c9d6817 commit 9557a60
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const config = {
'@typescript-eslint/no-shadow': 'error',

'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/class-name-casing': 'off',
'@typescript-eslint/no-unused-vars': 'off',
Expand Down
3 changes: 0 additions & 3 deletions src/Http.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ test('defaults.init', async () => {
headers: expect.any(Headers),
method: 'GET'
});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
let headers = entriesToObject(spy.mock.calls[0][1]!.headers as Headers);
expect(headers).toEqual({ accept: 'text/*' });

Expand All @@ -42,7 +41,6 @@ test('defaults.init', async () => {
headers: expect.any(Headers),
method: 'GET'
});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
headers = entriesToObject(spy.mock.calls[0][1]!.headers as Headers);
expect(headers).toEqual({ accept: 'text/*', test1: 'true' });

Expand All @@ -56,7 +54,6 @@ test('defaults.init', async () => {
headers: expect.any(Headers),
method: 'GET'
});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
headers = entriesToObject(spy.mock.calls[0][1]!.headers as Headers);
expect(headers).toEqual({ accept: 'text/*', test1: 'true', test2: 'true' });

Expand Down
1 change: 0 additions & 1 deletion src/createTestServer/createTestServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ export function createTestServer(options?: Options) {
// https://github.com/fastify/fastify/blob/v4.10.2/lib/error-handler.js#L74
// FYI Express needs the same hack: http://expressjs.com/en/guide/error-handling.html#the-default-error-handler
// FYI http.createServer() doesn't need it
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
process.stderr.write(error.stack!);
defaultErrorHandler(error, request as any, reply as any); // FIXME as any because the types look wrong
}
Expand Down

0 comments on commit 9557a60

Please sign in to comment.