-
Notifications
You must be signed in to change notification settings - Fork 219
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
http-client-java, eng, configure deprecation lint rule #4670
base: main
Are you sure you want to change the base?
http-client-java, eng, configure deprecation lint rule #4670
Conversation
No changes needing a change description found. |
You can try these changes here
|
4cc5af6
to
82cfd66
Compare
eslint.config.js
Outdated
@@ -72,10 +72,10 @@ const allFilesConfig = tsEslint.config({ | |||
*/ | |||
export function getTypeScriptProjectRules(root) { | |||
return tsEslint.config({ | |||
files: ["**/packages/*/src/**/*.ts", "**/packages/*/src/**/*.tsx"], | |||
files: ["**/packages/*/src/**/*.ts", "**/packages/*/src/**/*.tsx", "**/packages/http-client-java/emitter/src/**/*.ts"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint job throws below error when running pnpm run lint
:
https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206
Run pnpm run lint
> @typespec/[email protected] lint /home/runner/work/typespec/typespec
> eslint . --max-warnings=0
Oops! Something went wrong! :(
ESLint: 9.11.1
RangeError: Maximum call stack size exceeded
Occurred while linting /home/runner/work/typespec/typespec/packages/http-client-java/emitter/src/common/client.ts:31
Rule: "@typescript-eslint/no-deprecated"
at findBaseOfDeclaration (/home/runner/work/typespec/typespec/node_modules/.pnpm/typescript@5.[6](https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206#step:6:7).2/node_modules/typescript/lib/typescript.js:149319:31)
at getJsDocTagsOfDeclarations (/home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:149282:29)
at SymbolObject.getContextualJsDocTags (/home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:149109:44)
at /home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:14928[7](https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206#step:6:8):27
at /home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:14932[8](https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206#step:6:9):21
at firstDefined (/home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:2307:20)
at findBaseOfDeclaration (/home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:14[9](https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206#step:6:10)324:[10](https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206#step:6:11))
at getJsDocTagsOfDeclarations (/home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:[14](https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206#step:6:15)9282:29)
at SymbolObject.getContextualJsDocTags (/home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:149109:44)
at /home/runner/work/typespec/typespec/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:149287:27
ELIFECYCLE Command failed with exit code 2.v
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But if we only include files under src/
folder, lint will pass. I guess it's because eslint can't handle too much levels of folder hierarchy.
see this commit: 82cfd66
and lint job: https://github.com/microsoft/typespec/actions/runs/11267081108/job/31331611206
This lint job passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @timotheeguerin May I know your suggestion on this? Basically we want to add deprecation lint rules for all ts files under http-client-java/emitter/
, but when we include those ts files to eslint.config.js, pnpm run lint
will throw Maximum call stack size exceeded
error, seems due to eslint can't handle too much levels of folder hierarchy. If I only include files directly under http-client-java/emitter
, pnpm run lint
is able to run.
/cc @srnagar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah the typescript eslint dependency is struggling with large projects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timotheeguerin for reply! Do you have suggestions on how to add deprecation lint rules for http-client-java
's files (I guess other language's emitters also need this)?
Hi @haolingdong-msft. Your PR has had no update for 30 days and it is marked as a stale PR. If it is not updated within 30 days, the PR will automatically be closed. If you want to refresh the PR, please remove the |
No description provided.