Disable the naming-convention eslint rule for models#3584
Merged
JialinHuang803 merged 2 commits intoAzure:mainfrom Nov 7, 2025
Merged
Disable the naming-convention eslint rule for models#3584JialinHuang803 merged 2 commits intoAzure:mainfrom
JialinHuang803 merged 2 commits intoAzure:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the ESLint configuration comments in generated model files to suppress the @typescript-eslint/naming-convention rule. The changes address linting issues for internal models with underscore prefixes that would otherwise violate TypeScript naming conventions.
Key changes:
- Adds
/* eslint-disable @typescript-eslint/naming-convention */to all generated model files - Updates the comment description to clarify that the rule disables apply to both internal models with
_prefix and deserializers requiringany - Modifies the comment from "This file contains only generated model types and (de)serializers" to "This file contains only generated model types and their (de)serializers"
Reviewed Changes
Copilot reviewed 31 out of 58 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/typespec-ts/src/modular/emitModels.ts | Updates the model file header comment template to include the naming-convention eslint disable rule and clarifies the comment about what rules are being disabled |
| packages/typespec-ts/test/modularUnit/scenarios/**/*.md | Updates test snapshots to reflect the new header comment format in generated model files |
| packages/typespec-test/test/**/models.ts | Updates generated model files with the new header comment format including the naming-convention eslint disable |
MaryGao
approved these changes
Nov 7, 2025
Member
MaryGao
left a comment
There was a problem hiding this comment.
Approved. are we resolved all lint issues if yes please help enable the lint check in package.json?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is to fix the first error in #3452. It will disable the detection of the naming convention issues in the models.ts file because the internal interfaces that start with '_' should not be detected by this rule.