From 47b0de33194b33e74e7492d6685955e2f3abbdd4 Mon Sep 17 00:00:00 2001 From: bzhang0 Date: Wed, 17 Nov 2021 16:45:43 -0800 Subject: [PATCH 1/3] add rules --- common/tools/eslint-plugin-azure-sdk/.eslintrc.json | 3 ++- .../eslint-plugin-azure-sdk/src/configs/azure-sdk-base.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/common/tools/eslint-plugin-azure-sdk/.eslintrc.json b/common/tools/eslint-plugin-azure-sdk/.eslintrc.json index dfae6b14fee3..1f274af2ebd0 100644 --- a/common/tools/eslint-plugin-azure-sdk/.eslintrc.json +++ b/common/tools/eslint-plugin-azure-sdk/.eslintrc.json @@ -33,6 +33,7 @@ "no-multi-spaces": "error", "no-redeclare": "error", "no-useless-escape": "off", - "prefer-template": "error" + "prefer-template": "error", + "sort-imports": 1 } } diff --git a/common/tools/eslint-plugin-azure-sdk/src/configs/azure-sdk-base.ts b/common/tools/eslint-plugin-azure-sdk/src/configs/azure-sdk-base.ts index 04e0253a360b..cd20699967bf 100644 --- a/common/tools/eslint-plugin-azure-sdk/src/configs/azure-sdk-base.ts +++ b/common/tools/eslint-plugin-azure-sdk/src/configs/azure-sdk-base.ts @@ -56,6 +56,7 @@ export default { "no-var": "error", "one-var-declaration-per-line": "error", "prefer-const": "error", + "sort-imports": "warn", "spaced-comment": ["error", "always", { markers: ["/"] }], "space-infix-ops": ["error", { int32Hint: false }], "use-isnan": "error", From cd4f1057861f3dea4f87e268e2b8941f27598175 Mon Sep 17 00:00:00 2001 From: bzhang0 Date: Fri, 19 Nov 2021 13:00:42 -0800 Subject: [PATCH 2/3] delete sdk/monitor/ monitor-query max-warnings --- sdk/monitor/monitor-query/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/monitor/monitor-query/package.json b/sdk/monitor/monitor-query/package.json index 5d4cd1fe9126..c31f5cf92514 100644 --- a/sdk/monitor/monitor-query/package.json +++ b/sdk/monitor/monitor-query/package.json @@ -62,7 +62,7 @@ "integration-test:node": "nyc mocha -r esm --require source-map-support/register --slow 5000 --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 5000000 --full-trace \"dist-esm/test/{,!(browser)/**/}/*.spec.js\"", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "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 --format unix --ext .ts --max-warnings 0", + "lint": "eslint package.json api-extractor.json src test --format unix --ext .ts", "pack": "npm pack 2>&1", "test:browser": "npm run build:test && npm run integration-test:browser", "test:node": "npm run build:test && npm run integration-test:node", From 4a54c9b62ab18a49ae320be877fb7d38533fc0d8 Mon Sep 17 00:00:00 2001 From: bzhang0 Date: Fri, 19 Nov 2021 14:03:40 -0800 Subject: [PATCH 3/3] fix wording of sort-imports rule output --- common/tools/eslint-plugin-azure-sdk/.eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/tools/eslint-plugin-azure-sdk/.eslintrc.json b/common/tools/eslint-plugin-azure-sdk/.eslintrc.json index 1f274af2ebd0..adbbaefa9d32 100644 --- a/common/tools/eslint-plugin-azure-sdk/.eslintrc.json +++ b/common/tools/eslint-plugin-azure-sdk/.eslintrc.json @@ -34,6 +34,6 @@ "no-redeclare": "error", "no-useless-escape": "off", "prefer-template": "error", - "sort-imports": 1 + "sort-imports": "warn" } }