Repository: biomejs/biome (language: rust)

Issue:
🐛 tsconfig.*.json not recognised, breaks formatting
### Environment information

```block
CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.17.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         unset

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0
```


### What happened?

Biome breaks on tsconfig.node.json files when it contains comments.

Prettier gets this correctly.



### Expected result

It should format it correctly, like prettier does.
As per the docs, it should recognise common config file formats and format accordingly.

### Code of Conduct

- [X] I agree to follow Biome's Code of Conduct


Discussion / hints:
Related issue: https://github.com/biomejs/biome/issues/4769

I also paste this here:

Prettier also gets this one perfectly.

Basically prettier really gets JSON/JSONC formatting, without any config it just works. Both on comments in JSON, both on commas in JSONC, etc. Please take it as a reference implementation for JSON formatting and follow their defaults.

Fix patch:
diff --git a/.changeset/tsconfigjson_files_will_now_be_treated_the_same_as_tsconfigjson_files.md b/.changeset/tsconfigjson_files_will_now_be_treated_the_same_as_tsconfigjson_files.md
new file mode 100644
index 000000000000..aa463a7b6423
--- /dev/null
+++ b/.changeset/tsconfigjson_files_will_now_be_treated_the_same_as_tsconfigjson_files.md
@@ -0,0 +1,6 @@
+---
+cli: patch
+biome_json_syntax: patch
+---
+
+# `tsconfig.*.json` files will now be treated the same as `tsconfig.json` files.
diff --git a/crates/biome_json_syntax/src/file_source.rs b/crates/biome_json_syntax/src/file_source.rs
index 1a50fc459e3e..c8b6ac056272 100644
--- a/crates/biome_json_syntax/src/file_source.rs
+++ b/crates/biome_json_syntax/src/file_source.rs
@@ -200,6 +200,14 @@ impl JsonFileSource {
     }
 
     pub fn is_well_known_json_allow_comments_and_trailing_commas_file(filename: &OsStr) -> bool {
+        // handle all `tsconfig.*.json` files
+        // this is a common naming convention for projects that have multiple tsconfig files
+        if filename.as_encoded_bytes().starts_with(b"tsconfig.")
+            && filename.as_encoded_bytes().ends_with(b".json")
+        {
+            return true;
+        }
+
         Self::WELL_KNOWN_JSON_ALLOW_COMMENTS_AND_TRAILING_COMMAS_FILES
             .binary_search(&filename.as_encoded_bytes())
             .is_ok()


Test patch: