Skip to content

fix(@angular/cli): ignore unknown files when formatting schematic changes#32595

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
cexbrayat:fix/cli-prettier-ignore-unknown
Feb 26, 2026
Merged

fix(@angular/cli): ignore unknown files when formatting schematic changes#32595
alan-agius4 merged 1 commit intoangular:mainfrom
cexbrayat:fix/cli-prettier-ignore-unknown

Conversation

@cexbrayat
Copy link
Member

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

When schematics modify files such as .gitignore, Prettier cannot infer a parser and formatting fails.

npx prettier --check .gitignore
[error] No parser could be inferred for file ".gitignore".

What is the new behavior?

With ignore-unknown enabled, Prettier does not throw this parser error

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

…nges

When schematics modify files such as .gitignore, Prettier cannot infer a parser and formatting fails.

```
npx prettier --check .gitignore
[error] No parser could be inferred for file ".gitignore".
```

With ignore-unknown enabled, Prettier does not throw this parser error
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Feb 26, 2026
@alan-agius4 alan-agius4 merged commit 4bbd8dc into angular:main Feb 26, 2026
37 checks passed
@alan-agius4
Copy link
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants