Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyVault-Certificates] Updating eslint #8520

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions sdk/keyvault/keyvault-certificates/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"plugins": ["@azure/azure-sdk"],
"extends": ["../../.eslintrc.old.json", "plugin:@azure/azure-sdk/recommended"],
"parserOptions": {
"project": "tsconfig.eslint.json"
},
"extends": ["plugin:@azure/azure-sdk/azure-sdk-base"],
"ignorePatterns": ["src/core"],
"rules": {
"@typescript-eslint/no-this-alias": "off",
"no-invalid-this": "off",
"@azure/azure-sdk/ts-package-json-files-required": "off"
"no-invalid-this": "off"
}
}
8 changes: 4 additions & 4 deletions sdk/keyvault/keyvault-certificates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/test/*.test.js",
"integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/test/*.test.js",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json \"src/**/*.ts\" --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json \"src/**/*.ts\" samples --ext .ts -f html -o keyvault-certificates-lintReport.html",
"lint:terminal": "eslint package.json \"src/**/*.ts\" samples --ext .ts",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o search-lintReport.html || exit 0",
"lint:terminal": "eslint package.json api-extractor.json src test --ext .ts",
"pack": "npm pack 2>&1",
"prebuild": "npm run clean",
"regenerate": "npx autorest swagger/README.md --typescript",
Expand Down Expand Up @@ -93,7 +93,7 @@
"tslib": "^1.10.0"
},
"devDependencies": {
"@azure/eslint-plugin-azure-sdk": "^2.0.1",
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
"@azure/identity": "^1.1.0-preview",
"@azure/keyvault-keys": "^4.1.0-preview.1",
"@azure/keyvault-secrets": "^4.1.0-preview.1",
Expand Down
2 changes: 1 addition & 1 deletion sdk/keyvault/keyvault-certificates/test/CRUD.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ describe("Certificates client - create, read, update and delete", () => {
certificateName,
testPollerProperties
);
let deletedCertificate = await deletePoller.pollUntilDone();
const deletedCertificate = await deletePoller.pollUntilDone();
assert.equal(
deletedCertificate.name,
certificateName,
Expand Down
8 changes: 6 additions & 2 deletions sdk/keyvault/keyvault-certificates/test/list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,16 @@ describe("Certificates client - list certificates in various ways", () => {
})) {
try {
await testClient.flushCertificate(certificate.name!);
} catch (e) {}
} catch (e) {
// Nothing to do here
}
}
for await (const certificate of client.listDeletedCertificates({ includePending: true })) {
try {
await testClient.purgeCertificate(certificate.name!);
} catch (e) {}
} catch (e) {
// Nothing to do here
}
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ describe("Certificates client - restore certificates and recover backups", () =>
);
const backup = await client.backupCertificate(certificateName);
await testClient.flushCertificate(certificateName);
// eslint-disable-next-line no-constant-condition
while (true) {
try {
await client.restoreCertificateBackup(backup as Uint8Array);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { isNode } from "@azure/core-http";
import * as dotenv from "dotenv";
import * as path from "path";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { ClientSecretCredential } from "@azure/identity";
import { getKeyvaultName } from "./utils.common";
import { CertificateClient } from "../../src";
Expand Down
3 changes: 3 additions & 0 deletions sdk/keyvault/keyvault-certificates/test/utils/testClient.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { CertificateClient } from "../../src";

export default class TestClient {
Expand Down
5 changes: 0 additions & 5 deletions sdk/keyvault/keyvault-certificates/tsconfig.eslint.json

This file was deleted.