Fix config/script gaps between JS emitter and SDK libraries#4006
Conversation
… add tsconfig.lint.json, update eslint config, cleanup vitest.esm.config.ts
|
@copilot fix ci failures |
…fig.yml snapshots
Fixed in the latest commit. There were two root causes:
|
| }, | ||
| }, | ||
| }, | ||
| ]; |
There was a problem hiding this comment.
@copilot I believe both the old and new configurations should be retained here, with the new version used when model.options?.azureSdkForJs is true, and the old version otherwise?
The file /config/tsconfig.lint.json exists only in the azureSdkForJs repository. Therefore, if the current changes are applied, this configuration will be missing when azureSdkForJs is set to false
There was a problem hiding this comment.
Already addressed in 1e895cd — both configs are now retained: esLintConfigEsm (without parserOptions) is used when azureSdkForJs is falsy, and esLintConfigEsmAzureSdk (with parserOptions pointing to ./config/tsconfig.lint.json) is used only when azureSdkForJs is true.
|
@copilot fix ci failure |
Fixed in the latest commit. The |
There was a problem hiding this comment.
Should the changes in https://github.com/Azure/autorest.typescript/pull/3938/changes#diff-28dacad79715ee077ac87c4e8ad5365e7738bf356163ae2fd8f50f894dfb79ad be reverted as well?
Several codegen gaps were identified after the
config/migration in azure-sdk-for-js, causing newly generated packages to have stale/incorrect scripts and missing lint config files.Changes
packages/typespec-ts/src/rlc-common/metadata/packageJson/buildAzureMonorepoPackage.tstest:node:esmscript (vitest.esm.config.tsno longer exists)build-test &&fromtest:browser— newvitest.browser.config.tsruns directly against sourcetestscript withtsc -b --noEmit &&for early type-checking against project referencespackages/typespec-ts/src/rlc-common/metadata/buildTsConfig.tsbuildTsLintConfig()emittingconfig/tsconfig.lint.json:{ "extends": "../../../../tsconfig.json", "include": ["../src", "../test"] }packages/typespec-ts/src/rlc-common/metadata/buildESLintConfig.tsesLintConfigEsmtemplate to spread the azure-sdk config and append aparserOptionsblock pointing to./config/tsconfig.lint.jsonfor type-aware linting:packages/typespec-ts/src/index.tsbuildTsLintConfiginto the generation pipeline (Azure flavor +azureSdkForJsonly)vitest.esm.config.tsis no longer emitted by the generator —buildVitestConfigonly producesvitest.config.tsandvitest.browser.config.ts