Skip to content

Commit

Permalink
chore(js_formatter): ignore files with only bogus nodes for generatin…
Browse files Browse the repository at this point in the history
…g prettier compat reports (#3553)
  • Loading branch information
Conaclos authored Jul 31, 2024
1 parent 79c3bdd commit 52175f2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 76 deletions.
4 changes: 4 additions & 0 deletions crates/biome_formatter_test/src/diff_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ impl DiffReport {
"js/v8_intrinsic",
// Babel plugins (mostly experimental syntaxes)
"js/babel-plugins/",
// Bogus nodes
"js/optional-chaining-assignment/valid-parenthesized.js",
"typescript/conformance/classes/constructorDeclarations/constructorParameters/readonlyReadonly.ts",
"typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts",
// Experimental syntax: `do {}`
"js/async-do-expressions/",
"js/do/",
Expand Down
40 changes: 2 additions & 38 deletions crates/biome_js_formatter/report.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Overall Metrics

**Average compatibility**: 96.88
**Average compatibility**: 97.04

<details>
<summary>Definition</summary>

$$average = \frac\{\sum_{file}^\{files}compatibility_\{file}}\{files}$$
</details>

**Compatible lines**: 98.07
**Compatible lines**: 98.09

<details>
<summary>Definition</summary>
Expand Down Expand Up @@ -4168,16 +4168,6 @@
**Prettier Similarity**: 100.00%


### js/optional-chaining-assignment/valid-parenthesized.js
```diff
-a?.b = c;
+(a?.b) = c;

```

**Prettier Similarity**: 0.00%


### js/optional-chaining/chaining.js

**Prettier Similarity**: 100.00%
Expand Down Expand Up @@ -7261,20 +7251,6 @@
**Prettier Similarity**: 92.31%


### typescript/conformance/classes/constructorDeclarations/constructorParameters/readonlyReadonly.ts
```diff
class C {
- readonly x: number;
- constructor(readonly y: number) {}
+ readonly readonly x: number;
+ constructor(readonly readonly y: number) {}
}

```

**Prettier Similarity**: 50.00%


### typescript/conformance/classes/mixinAccessModifiers.ts

**Prettier Similarity**: 100.00%
Expand Down Expand Up @@ -7370,18 +7346,6 @@
**Prettier Similarity**: 100.00%


### typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts
```diff
//@target: ES5
-for (var of of) {
-}
+for (var of of) { }

```

**Prettier Similarity**: 33.33%


### typescript/conformance/parser/ecmascript5/Statements/parserForInStatement2.ts

**Prettier Similarity**: 100.00%
Expand Down
40 changes: 2 additions & 38 deletions crates/biome_js_formatter/report_incompatible.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
## Overall Metrics

**Average compatibility**: 96.88
**Average compatibility**: 97.04

<details>
<summary>Definition</summary>

$$average = \frac\{\sum_{file}^\{files}compatibility_\{file}}\{files}$$
</details>

**Compatible lines**: 98.07
**Compatible lines**: 98.09

<details>
<summary>Definition</summary>
Expand Down Expand Up @@ -1533,16 +1533,6 @@
**Prettier Similarity**: 66.67%


### js/optional-chaining-assignment/valid-parenthesized.js
```diff
-a?.b = c;
+(a?.b) = c;

```

**Prettier Similarity**: 0.00%


### js/preserve-line/member-chain.js
```diff
fooBar
Expand Down Expand Up @@ -2996,32 +2986,6 @@
**Prettier Similarity**: 92.31%


### typescript/conformance/classes/constructorDeclarations/constructorParameters/readonlyReadonly.ts
```diff
class C {
- readonly x: number;
- constructor(readonly y: number) {}
+ readonly readonly x: number;
+ constructor(readonly readonly y: number) {}
}

```

**Prettier Similarity**: 50.00%


### typescript/conformance/parser/ecmascript5/Statements/parserES5ForOfStatement21.ts
```diff
//@target: ES5
-for (var of of) {
-}
+for (var of of) { }

```

**Prettier Similarity**: 33.33%


### typescript/custom/abstract/abstractProperties.ts
```diff
abstract class Foo {
Expand Down

0 comments on commit 52175f2

Please sign in to comment.