forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[monitor] Precise Typechecking (Azure#32153)
### Packages impacted by this PR - @azure/monitor-opentelemetry-exporter - @azure/monitor-ingestion - @azure/monitor-query ### Issues associated with this PR N/A ### Describe the problem that is addressed by this PR Tests are not being typechecked and linting isn't configured correctly. This PR migrates those libraries to precise typechecking setup introduced in Azure#31786 ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ N/A ### Provide a list of related PRs _(if any)_ Azure#31786 ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
- Loading branch information
1 parent
bf29f9d
commit df390f9
Showing
44 changed files
with
138 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; | ||
|
||
export default azsdkEslint.config([ | ||
{ | ||
files: ["**/*.ts", "**/*.cts", "**/*.mts"], | ||
languageOptions: { | ||
parserOptions: { | ||
project: ["./tsconfig.test.json"], | ||
}, | ||
}, | ||
}, | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
{ | ||
"extends": "./.tshy/build.json", | ||
"include": ["./src/**/*.ts", "./src/**/*.mts", "./test/**/*.spec.ts", "./test/**/*.mts"], | ||
"exclude": ["./test/**/node/**/*.ts", "./test/snippets.spec.ts"], | ||
"compilerOptions": { | ||
"outDir": "./dist-test/browser", | ||
"rootDir": ".", | ||
"skipLibCheck": true | ||
} | ||
"extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
{ | ||
"extends": "../../../tsconfig", | ||
"compilerOptions": { | ||
"paths": { | ||
"@azure/monitor-ingestion": ["./src/index"] | ||
}, | ||
"lib": ["DOM"], | ||
"module": "NodeNext", | ||
"moduleResolution": "NodeNext", | ||
"rootDir": "." | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.mts", "src/**/*.cts", "samples-dev/**/*.ts", "test/**/*.ts"] | ||
"references": [ | ||
{ "path": "./tsconfig.src.json" }, | ||
{ "path": "./tsconfig.samples.json" }, | ||
{ "path": "./tsconfig.test.json" } | ||
], | ||
"files": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../../tsconfig.samples.base.json", | ||
"compilerOptions": { | ||
"paths": { | ||
"@azure/monitor-ingestion": ["./dist/esm"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../../../tsconfig.lib.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { mergeConfig } from "vitest/config"; | ||
import vitestConfig from "./vitest.config.ts"; | ||
import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; | ||
|
||
export default mergeConfig( | ||
vitestConfig, | ||
vitestEsmConfig | ||
); |
32 changes: 8 additions & 24 deletions
32
sdk/monitor/monitor-opentelemetry-exporter/eslint.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,12 @@ | ||
import azsdkEslint from "@azure/eslint-plugin-azure-sdk"; | ||
|
||
export default [ | ||
{ ignores: ["src/Declarations"] }, | ||
...azsdkEslint.configs.recommendedTypeChecked, | ||
export default azsdkEslint.config([ | ||
{ | ||
"rules": { | ||
"@typescript-eslint/no-unsafe-member-access": "warn", | ||
"@typescript-eslint/no-unsafe-assignment": "warn", | ||
"@typescript-eslint/no-unsafe-call": "warn", | ||
"@typescript-eslint/no-unsafe-argument": "warn", | ||
"@typescript-eslint/restrict-template-expressions": "warn", | ||
"@typescript-eslint/no-floating-promises": "warn", | ||
"no-underscore-dangle": [ | ||
"error", | ||
{ | ||
"allowAfterThis": true | ||
} | ||
], | ||
"n/no-unsupported-features/es-syntax": [ | ||
"error", | ||
{ | ||
"ignores": ["modules"] | ||
} | ||
] | ||
} | ||
files: ["**/*.ts", "**/*.cts", "**/*.mts"], | ||
languageOptions: { | ||
parserOptions: { | ||
project: ["./tsconfig.test.json"], | ||
}, | ||
}, | ||
}, | ||
]; | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
sdk/monitor/monitor-opentelemetry-exporter/tsconfig.browser.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"] | ||
} |
Oops, something went wrong.