Skip to content

Disable the naming-convention eslint rule for models#3584

Merged
JialinHuang803 merged 2 commits intoAzure:mainfrom
JialinHuang803:fixlinterror1
Nov 7, 2025
Merged

Disable the naming-convention eslint rule for models#3584
JialinHuang803 merged 2 commits intoAzure:mainfrom
JialinHuang803:fixlinterror1

Conversation

@JialinHuang803
Copy link
Copy Markdown
Member

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.

@JialinHuang803 JialinHuang803 requested review from Copilot and removed request for MaryGao, joheredi and qiaozha November 7, 2025 01:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 requiring any
  • 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

Copy link
Copy Markdown
Member

@MaryGao MaryGao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. are we resolved all lint issues if yes please help enable the lint check in package.json?

@JialinHuang803 JialinHuang803 merged commit 3e1d66d into Azure:main Nov 7, 2025
16 checks passed
@JialinHuang803 JialinHuang803 deleted the fixlinterror1 branch November 7, 2025 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants