Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prettier conflicts with tslint #259

Open
gomain opened this issue Sep 9, 2020 · 0 comments · May be fixed by #261
Open

prettier conflicts with tslint #259

gomain opened this issue Sep 9, 2020 · 0 comments · May be fixed by #261

Comments

@gomain
Copy link
Contributor

gomain commented Sep 9, 2020

Running prettier via yarn format results in this diff in src/makePatch.ts
(Note: prettier needs to be run twice)

-    // 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

     // 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.

This was referenced Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant