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

Print Width is not respected #30

Closed
CyberMew opened this issue Feb 26, 2019 · 5 comments
Closed

Print Width is not respected #30

CyberMew opened this issue Feb 26, 2019 · 5 comments

Comments

@CyberMew
Copy link

Prettier in VSCode settings is set to 80. Tslint Integration has been set. tslint.json has "max-line-length": [true, 80]

I tried creating a .prettierrc.json file with "printWidth": 80 but it also doesn't work.

Is this a bug or am I missing something?

@aleclarson
Copy link
Collaborator

Can you reproduce with prettier-tslint in command line?

What is happening instead?

@ahmedkamalio

This comment has been minimized.

@aleclarson
Copy link
Collaborator

@AhmedMKamal That's not the same. You're looking for #25.

@CyberMew is claiming that neither Prettier's printWidth nor TSLint's max-line-length are being respected, even when they're equal.

@CyberMew
Copy link
Author

CyberMew commented Apr 4, 2019

Can you reproduce with prettier-tslint in command line?

What is happening instead?

Sorry for the late reply. Nothing happens to the file when I run the command, no output either. I wonder whose issue this belongs to.

mac:react-native username$ npx prettier-tslint fix ./src/Components/SelectionRow.ts 
./src/Components/SelectionRow.ts

There are several situations where it will just flatout exceed 80 characters even when I have formatted it manually nicely. You can also reproduce this easily by having a long line like this:

import { SelectionRow as Template } from "Some/Very/Long/Name/That/Just/Exceeds80/SelectionRow";

I think by right it should format it to:

import {
  SelectionRow as Template
 } from "Some/Very/Long/Name/That/Just/Exceeds80/SelectionRow";

@aleclarson
Copy link
Collaborator

Prettier leaves that import statement alone. See here.

Closing this until you provide a sample repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants