mirror of
https://github.com/grafana/grafana.git
synced 2026-08-19 01:34:54 -05:00
* Build: Upgrade TypeScript to 6.0 beta Update typescript from 5.9.2 to 6.0.0-beta across all packages. Configure tsconfig to handle TS 6.0 breaking changes: add `ignoreDeprecations: "6.0"` to suppress warnings for deprecated options, disable `noUncheckedSideEffectImports` to allow CSS side-effect imports, explicitly configure `types` field since TS 6.0 no longer auto-includes all @types packages, set appropriate `rootDir` in packages that include files outside their directory, and update `@ts-ignore` comment placement in Table utils to match where TS 6.0 now reports the type error. All typecheck tests pass with 0 errors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add explicit rootDir to root tsconfig for ts-jest compatibility TS 6.0 requires rootDir to be explicitly set when it differs from the inferred common source directory. Without this, ts-jest fails with TS5011 when running unit tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix package builds: add rootDir and jquery types for TS 6.0 TS 6.0 requires explicit rootDir in tsconfigs that emit output. Add rootDir to all package build configs that were missing it. Also add jquery to the base types array since @types/jquery is no longer auto-included. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix TS 6.0 errors in e2e and plugin tsconfigs - e2e/tsconfig.json: Add moduleResolution: "bundler" to fix TS5098 (customConditions requires bundler/node16/nodenext moduleResolution) - packages/grafana-plugin-configs/tsconfig.json: Add ignoreDeprecations: "6.0" to fix TS5101 (downlevelIteration deprecated) inherited from @grafana/tsconfig, cascading to all 15 datasource plugins and 3 e2e-playwright test plugins Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix package build output: use rootDir: "./src" instead of "." rootDir: "." caused type declarations to emit to dist/types/src/ instead of dist/types/, breaking the published package types paths. Using rootDir: "./src" preserves the correct output structure while satisfying TS 6.0's requirement for an explicit rootDir. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Align TS 6.0 changes with tsgo PR (#114643) - Remove baseUrl in favor of path mapping ("*": ["./public/*"]) - Add rootDir: "./src" to grafana-sql and grafana-test-utils tsconfigs - Add explicit Size type annotations to AutoSizer callbacks - Add explicit type params to MultiSelect<string> in LokiContextUi - Update @ts-ignore comments for TS5/TS6/TS7 compatibility - Switch JS files to @ts-nocheck (eslint.config.js, env-util.js) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Build: Upgrade TypeScript from 6.0.0-beta to 6.0.1-rc Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Build: Upgrade TypeScript from 6.0.1-rc to 6.0.2 stable Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix o11y-ds-frontend package build: add rootDir to build config Same fix as other packages — the build config was inheriting rootDir: "../../" from tsconfig.json, causing type declarations to emit to the wrong path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
868 B
JSON
30 lines
868 B
JSON
// Base config file for all Typescript prjects in the Grafana monorepo
|
|
{
|
|
"compilerOptions": {
|
|
"alwaysStrict": true,
|
|
"strict": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"customConditions": ["@grafana-app/source"],
|
|
"ignoreDeprecations": "6.0",
|
|
"noUncheckedSideEffectImports": false,
|
|
"types": ["jest", "jquery", "mdx", "node", "systemjs"],
|
|
"esModuleInterop": true,
|
|
"experimentalDecorators": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"importHelpers": true,
|
|
"jsx": "react",
|
|
"lib": ["dom", "dom.iterable", "es2022"],
|
|
"module": "esnext",
|
|
"moduleResolution": "node",
|
|
"noEmitHelpers": true,
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"noImplicitThis": true,
|
|
"noUnusedLocals": true,
|
|
"pretty": true,
|
|
"skipLibCheck": true,
|
|
"sourceMap": true,
|
|
"target": "es2018"
|
|
}
|
|
}
|