Skip to content

Commit

Permalink
Auto fix new import lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ejizba committed Nov 7, 2023
1 parent 68d3b7d commit 8edd622
Show file tree
Hide file tree
Showing 21 changed files with 24 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/InvocationModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
RpcTypedData,
} from '@azure/functions-core';
import { format } from 'util';
import { InvocationContext } from './InvocationContext';
import { returnBindingKey } from './constants';
import { fromRpcBindings } from './converters/fromRpcBindings';
import { fromRpcRetryContext, fromRpcTraceContext } from './converters/fromRpcContext';
Expand All @@ -21,6 +20,7 @@ import { fromRpcTypedData } from './converters/fromRpcTypedData';
import { toCamelCaseValue } from './converters/toCamelCase';
import { toRpcHttp } from './converters/toRpcHttp';
import { toRpcTypedData } from './converters/toRpcTypedData';
import { InvocationContext } from './InvocationContext';
import { isHttpTrigger, isTimerTrigger, isTrigger } from './utils/isTrigger';
import { isDefined, nonNullProp, nonNullValue } from './utils/nonNull';

Expand Down
2 changes: 1 addition & 1 deletion src/addBindingName.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

export { InvocationContext } from './InvocationContext';
export { HttpRequest } from './http/HttpRequest';
export { HttpResponse } from './http/HttpResponse';
export { InvocationContext } from './InvocationContext';

const bindingCounts: Record<string, number> = {};
/**
Expand Down
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import {
} from '@azure/functions';
import * as coreTypes from '@azure/functions-core';
import { CoreInvocationContext, FunctionCallback } from '@azure/functions-core';
import { InvocationModel } from './InvocationModel';
import { returnBindingKey, version } from './constants';
import { toRpcDuration } from './converters/toRpcDuration';
import { InvocationModel } from './InvocationModel';
import * as output from './output';
import * as trigger from './trigger';
import { isTrigger } from './utils/isTrigger';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/InvocationHookContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Licensed under the MIT License.

import * as types from '@azure/functions';
import { InvocationContext } from '../InvocationContext';
import { ReadOnlyError } from '../errors';
import { InvocationContext } from '../InvocationContext';
import { nonNullProp } from '../utils/nonNull';
import { HookContext } from './HookContext';

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

export { InvocationContext } from './InvocationContext';
export * as app from './app';
export { AppStartContext } from './hooks/AppStartContext';
export { AppTerminateContext } from './hooks/AppTerminateContext';
Expand All @@ -12,6 +11,7 @@ export { PreInvocationContext } from './hooks/PreInvocationContext';
export { HttpRequest } from './http/HttpRequest';
export { HttpResponse } from './http/HttpResponse';
export * as input from './input';
export { InvocationContext } from './InvocationContext';
export * as output from './output';
export * as trigger from './trigger';
export { Disposable } from './utils/Disposable';
2 changes: 1 addition & 1 deletion test/InvocationModel.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import 'mocha';
import { RpcLogCategory, RpcLogLevel } from '@azure/functions-core';
import { expect } from 'chai';
import 'mocha';
import { InvocationContext } from '../src';
import { InvocationModel } from '../src/InvocationModel';

Expand Down
1 change: 0 additions & 1 deletion test/Types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import { expect } from 'chai';
import * as cp from 'child_process';
import 'mocha';
import { Context } from 'mocha';
import * as path from 'path';

Expand Down
2 changes: 1 addition & 1 deletion test/converters/fromRpcContext.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import { expect } from 'chai';
import 'mocha';
import { expect } from 'chai';
import { fromRpcRetryContext, fromRpcTraceContext } from '../../src/converters/fromRpcContext';

describe('fromRpcContext', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/converters/fromRpcTriggerMetadata.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import 'mocha';
import { RpcTypedData } from '@azure/functions-core';
import { expect } from 'chai';
import 'mocha';
import { fromRpcTriggerMetadata } from '../../src/converters/fromRpcTriggerMetadata';

interface RpcTypedDataExtended extends RpcTypedData {
Expand Down
2 changes: 1 addition & 1 deletion test/converters/fromRpcTypedData.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import 'mocha';
import { expect } from 'chai';
import { fromString } from 'long';
import 'mocha';
import { HttpRequest } from '../../src';
import { fromRpcTypedData } from '../../src/converters/fromRpcTypedData';
import Long = require('long');
Expand Down
2 changes: 1 addition & 1 deletion test/converters/toCamelCase.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import { expect } from 'chai';
import 'mocha';
import { expect } from 'chai';
import { toCamelCaseValue } from '../../src/converters/toCamelCase';

describe('toCamelCaseValue', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/converters/toRpcDuration.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import { expect } from 'chai';
import 'mocha';
import { expect } from 'chai';
import { toRpcDuration } from '../../src/converters/toRpcDuration';

describe('toRpcDuration', () => {
Expand Down
3 changes: 2 additions & 1 deletion test/converters/toRpcHttp.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import 'mocha';
import * as chai from 'chai';
import { expect } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import 'mocha';
import { Headers } from 'undici';
import { toRpcHttp } from '../../src/converters/toRpcHttp';
import { HttpResponse } from '../../src/http/HttpResponse';

chai.use(chaiAsPromised);

describe('toRpcHttp', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/converters/toRpcHttpCookie.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import 'mocha';
import { Cookie } from '@azure/functions';
import { expect } from 'chai';
import 'mocha';
import { toRpcHttpCookie } from '../../src/converters/toRpcHttpCookie';

describe('toRpcHttpCookie', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/converters/toRpcNullable.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import { expect } from 'chai';
import 'mocha';
import { expect } from 'chai';
import {
toNullableBool,
toNullableDouble,
Expand Down
2 changes: 1 addition & 1 deletion test/converters/toRpcTypedData.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import { expect } from 'chai';
import 'mocha';
import { expect } from 'chai';
import { toRpcTypedData } from '../../src/converters/toRpcTypedData';

describe('toRpcTypedData', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/errors.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import { expect } from 'chai';
import 'mocha';
import { expect } from 'chai';
import { ensureErrorType } from '../src/errors';

describe('ensureErrorType', () => {
Expand Down
4 changes: 2 additions & 2 deletions test/hooks.test.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import { expect } from 'chai';
import 'mocha';
import { expect } from 'chai';
import {
app,
AppStartContext,
AppTerminateContext,
HookContext,
InvocationContext,
InvocationHookContext,
PostInvocationContext,
PreInvocationContext,
app,
} from '../src/index';

describe('hooks', () => {
Expand Down
3 changes: 2 additions & 1 deletion test/http/HttpRequest.test.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import 'mocha';
import * as chai from 'chai';
import { expect } from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import 'mocha';
import { File } from 'undici';
import { HttpRequest } from '../../src/http/HttpRequest';

chai.use(chaiAsPromised);

describe('HttpRequest', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/http/extractHttpUserFromHeaders.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License.

import 'mocha';
import { HttpRequestUser } from '@azure/functions';
import { expect } from 'chai';
import 'mocha';
import { Headers } from 'undici';
import { extractHttpUserFromHeaders } from '../../src/http/extractHttpUserFromHeaders';

Expand Down
4 changes: 2 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@

import { InvocationContext } from './InvocationContext';

export * from './InvocationContext';
export * as app from './app';
export * from './cosmosDB';
export * from './cosmosDB.v3';
export * from './cosmosDB.v4';
export * from './eventGrid';
export * from './eventHub';
export * from './generic';
export * from './hooks/HookContext';
export * from './hooks/appHooks';
export * from './hooks/HookContext';
export * from './hooks/invocationHooks';
export * from './http';
export * as input from './input';
export * from './InvocationContext';
export * as output from './output';
export * from './serviceBus';
export * from './sql';
Expand Down

0 comments on commit 8edd622

Please sign in to comment.