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

[instrumentation] Precise Typechecking #32145

Merged
merged 1 commit into from
Dec 10, 2024
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
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"],
},
},
},
]);
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"generate:client": "autorest --typescript ./swagger/README.md",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"integration-test:browser": "echo skipped",
"integration-test:node": "dev-tool run test:vitest --no-test-proxy",
"integration-test:node": "dev-tool run test:vitest --no-test-proxy --esm",
"lint": "eslint package.json api-extractor.json README.md src test",
"lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
"pack": "npm pack 2>&1",
Expand Down Expand Up @@ -96,6 +96,7 @@
"requiredResources": {}
},
"tshy": {
"project": "./tsconfig.src.json",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
{
"extends": "./.tshy/build.json",
"include": [
"./src/**/*.ts",
"./src/**/*.cts",
"./src/**/*.mts",
"./test/**/*.mts",
"./test/**/*.cts",
"./test/**/*.ts"
],
"exclude": ["./test/**/node/**/*.ts", "./test/snippets.spec.ts"],
"compilerOptions": {
"outDir": "./dist-test/browser",
"rootDir": ".",
"skipLibCheck": true
}
"extends": ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"]
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"rootDir": ".",
"paths": {
"@azure/opentelemetry-instrumentation-azure-sdk": ["./src/index"]
}
},
"include": [
"src/**/*.ts",
"src/**/*.cts",
"src/**/*.mts",
"test/**/*.ts",
"test/**/*.cts",
"test/**/*.mts",
"samples-dev/**/*.ts"
]
"references": [
{ "path": "./tsconfig.src.json" },
{ "path": "./tsconfig.samples.json" },
{ "path": "./tsconfig.test.json" }
],
"files": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.samples.base.json",
"compilerOptions": {
"paths": {
"@azure/opentelemetry-instrumentation-azure-sdk": ["./dist/esm"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../../tsconfig.lib.json"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["./tsconfig.src.json", "../../../tsconfig.test.base.json"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ export default mergeConfig(
test: {
include: ["test/**/*.spec.ts"],
exclude: ["test/snippets.spec.ts"],
typecheck: {
enabled: true,
tsconfig: "tsconfig.test.json",
include: ["test/**/*.ts", "test/**/*.mts", "test/**/*.cts"],
},
},
}),
);
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
);
Loading