ds300 / ds300/patch-package

prettier conflicts with tslint

Open
#259 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Description

Running prettier via `yarn format` results in this diff in src/makePatch.ts
(Note: prettier needs to be run twice)
```diff
- // copy .npmrc/.yarnrc in case packages are hosted in private registry
- [".npmrc", ".yarnrc"].forEach(rcFile => {
+ // copy .npmrc/.yarnrc in case packages are hosted in private registry
+ ;[".npmrc", ".yarnrc"].forEach(rcFile => {
```
Comment is *indented* and a semi-colon is *inserted* before the tuple. This causes tslint to flag
```
ERROR: src/makePatch.ts:106:6 - statements are not aligned
```
After update prettier to 2.1.1 the *comment indentation* is fixed to
```diff
// copy .npmrc/.yarnrc in case packages are hosted in private registry
- [".npmrc", ".yarnrc"].forEach(rcFile => {
+ ;[".npmrc", ".yarnrc"].forEach((rcFile) => {
```
but the tslint error pertains. Updating tslint to 6.1.3 seems to fix it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.