JoshuaKGoldberg / JoshuaKGoldberg/TypeStat

🐛 Bug: Using file-level changes and suppressTypeErrors together does not work

Open
#1,546 0 comments 0 reactions 0 assignees View on GitHub
status: accepting prs type: bug
Dominant language
TypeScript
Stars
2.3k
Forks
47
Avg merge
15h 55m
Merged PRs (30d)
21

Description

### Bug Report Checklist

- [X] I have tried restarting my IDE and the issue persists.
- [X] I have pulled the latest `main` branch of the repository.
- [X] I have [searched for related issues](https://github.com/JoshuaKGoldberg/TypeStat/issues?q=is%3Aissue) and found none that matched my issue.

### Expected

When using these options together, they should work.

```ts
/* Above file */
(function () {
let text: string | number;
text = 1;
})();
```

### Actual

Additional comments added with below or above, are not added to file.

```ts
(function () {
let text: string | number;
text = 1;
})();
```

### Additional Info

Enabled `suppressTypeErrors` on all tests inside `test/cases/files` -> All test outputs are missing the comments that were supposed to be added.

For example, typestat.json
```json
{
"cleanups": {
"suppressTypeErrors": true
},
"files": {
"above": "/* Above file */"
},
"fixes": {
"incompleteTypes": true
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.