Skip to content

Commit 07a98c6

Browse files
authored
[eslint] enable allowDeclarations option for typescript-eslint/no-namespace rule (Azure#21212)
* Updating ESLint to fix errors * Reverting tsconfig change
1 parent dc5671f commit 07a98c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+168
-171
lines changed

common/tools/eslint-plugin-azure-sdk/.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"@typescript-eslint/indent": "off",
2424
"@typescript-eslint/no-magic-numbers": ["error", { "ignore": [0], "ignoreArrayIndexes": true }],
2525
"@typescript-eslint/no-explicit-any": "off",
26+
"@typescript-eslint/no-namespace": ["error", { "allowDeclarations": true }],
2627
"@typescript-eslint/no-non-null-assertion": "off",
2728
"arrow-body-style": ["error", "as-needed"],
2829
"curly": "error",
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
// eslint-disable-next-line @typescript-eslint/no-namespace
54
declare module 'jsrsasign';

sdk/containerregistry/container-registry/src/utils/base64.browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
// eslint-disable-next-line @typescript-eslint/no-namespace
54
declare global {
65
function atob(input: string): string;
76
}

sdk/core/core-client/src/base64.browser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT license.
33

4-
// eslint-disable-next-line @typescript-eslint/no-namespace
54
declare global {
65
// stub these out for the browser
76
function btoa(input: string): string;

sdk/core/core-http/src/httpOperationResponse.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export interface HttpResponse {
2424
headers: HttpHeadersLike;
2525
}
2626

27-
// eslint-disable-next-line @typescript-eslint/no-namespace
2827
declare global {
2928
/**
3029
* Stub declaration of the browser-only Blob type.

sdk/keyvault/keyvault-keys/src/cryptography/aesCryptographyProvider.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@
44
import { OperationOptions } from "@azure/core-http";
55
import * as crypto from "crypto";
66
import {
7-
EncryptOptions,
8-
EncryptResult,
7+
AesCbcEncryptParameters,
98
DecryptOptions,
109
DecryptResult,
10+
EncryptOptions,
11+
EncryptResult,
12+
JsonWebKey,
1113
KeyWrapAlgorithm,
12-
WrapKeyOptions,
13-
WrapResult,
14-
UnwrapKeyOptions,
15-
UnwrapResult,
1614
SignOptions,
1715
SignResult,
16+
UnwrapKeyOptions,
17+
UnwrapResult,
1818
VerifyOptions,
1919
VerifyResult,
20-
AesCbcEncryptParameters,
21-
JsonWebKey,
20+
WrapKeyOptions,
21+
WrapResult,
2222
} from "..";
2323
import { AesCbcDecryptParameters } from "../cryptographyClientModels";
2424
import {

sdk/keyvault/keyvault-keys/src/cryptography/crypto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Licensed under the MIT license.
33

44
import {
5+
Verify,
56
createHash as cryptoCreateHash,
67
createVerify as cryptoCreateVerify,
7-
Verify,
88
randomBytes as cryptoRandomBytes,
99
} from "crypto";
1010

sdk/keyvault/keyvault-keys/src/cryptography/models.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import {
1010
EncryptParameters,
1111
EncryptResult,
1212
KeyWrapAlgorithm,
13-
SignatureAlgorithm,
1413
SignOptions,
1514
SignResult,
15+
SignatureAlgorithm,
1616
UnwrapKeyOptions,
1717
UnwrapResult,
1818
VerifyOptions,

sdk/keyvault/keyvault-keys/src/cryptography/remoteCryptographyProvider.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
// Licensed under the MIT license.
33

44
import {
5+
TokenCredential,
56
createPipelineFromOptions,
67
isTokenCredential,
7-
TokenCredential,
88
signingPolicy,
99
} from "@azure/core-http";
1010
import {
11-
EncryptParameters,
11+
DecryptOptions,
12+
DecryptParameters,
13+
DecryptResult,
1214
EncryptOptions,
15+
EncryptParameters,
1316
EncryptResult,
1417
KeyWrapAlgorithm,
15-
WrapKeyOptions,
16-
WrapResult,
17-
VerifyOptions,
18-
VerifyResult,
19-
DecryptParameters,
20-
DecryptOptions,
21-
DecryptResult,
22-
UnwrapKeyOptions,
2318
SignOptions,
2419
SignResult,
20+
UnwrapKeyOptions,
21+
VerifyOptions,
22+
VerifyResult,
23+
WrapKeyOptions,
24+
WrapResult,
2525
} from "../cryptographyClientModels";
2626
import { SDK_VERSION } from "../constants";
2727
import { UnwrapResult } from "../cryptographyClientModels";

sdk/keyvault/keyvault-keys/src/cryptography/rsaCryptographyProvider.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ import { RSA_PKCS1_OAEP_PADDING, RSA_PKCS1_PADDING } from "constants";
55
import { publicEncrypt } from "crypto";
66
import { createVerify } from "./crypto";
77
import {
8-
JsonWebKey,
98
DecryptOptions,
9+
DecryptParameters,
10+
DecryptResult,
1011
EncryptOptions,
1112
EncryptParameters,
1213
EncryptResult,
14+
JsonWebKey,
1315
KeyWrapAlgorithm,
16+
SignOptions,
17+
SignResult,
18+
SignatureAlgorithm,
1419
UnwrapKeyOptions,
20+
UnwrapResult,
1521
VerifyOptions,
1622
VerifyResult,
1723
WrapKeyOptions,
18-
DecryptParameters,
19-
DecryptResult,
20-
SignatureAlgorithm,
21-
SignOptions,
22-
SignResult,
23-
UnwrapResult,
2424
WrapResult,
2525
} from "..";
2626
import { convertJWKtoPEM } from "./conversions";

0 commit comments

Comments
 (0)