Comments (5)
Can you reproduce with prettier-tslint
in command line?
What is happening instead?
from prettier-tslint.
Hi, @aleclarson I'm facing the same issue here, this is the rule in tslint.json
"max-line-length": [
true,
{
"limit": 100,
"ignore-pattern": "^import |^export {(.*?)}"
}
]
using npm "pretty": "prettier-tslint fix **/*.ts"
the rule seems to be ignored and lines wrap at 80 columns, but for me adding .prettierrc
file with "printWidth": 100
fixed the issue.
@CyberMew please try to rename .prettierrc.json
to .prettierrc
and check if it's going to solve the problem.
from prettier-tslint.
@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.
from prettier-tslint.
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";
from prettier-tslint.
Prettier leaves that import
statement alone. See here.
Closing this until you provide a sample repository.
from prettier-tslint.
Related Issues (20)
- VSCode integration HOT 2
- tslint HOT 1
- [prettier-vscode] max-line-length does not work HOT 9
- [prettier-vscode] semicolon does not work HOT 5
- linterOptions in tslint.json is ignored HOT 1
- Support typescript 3.0
- prettier-tslint mangles imports when reordering HOT 5
- Cannot run prettier-tslint on a file in a path with the name "node_modules" HOT 3
- Translate TSLint max-line-length into Prettier printWidth automatically HOT 1
- Imports are mangled when using "ordered-imports" with prettier-vscode HOT 3
- [Bug] .editorconfig ignored HOT 1
- Usage of `.prettierrc` breaks the tslint rules like single quote HOT 2
- What exactly this combo does that prettier can't? HOT 1
- The file needs to be modified only once.
- Allow to specify tslint.json
- Using with typescript-tslint-plugin
- Low security vulnerability from yargs > yargs-parser
- Support TypeScript 4.x HOT 5
- high and moderate security vulns in 0.4.2 via globby and yargs dependencies
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prettier-tslint.