Closed orblazer closed 5 years ago
Hi, Thanks for doing that.
We would have to keep in mind that typescript
files are processed by eslint (eslint config files) currently.
Nice work - let's get prettier-tslint
shipped!
Ok, this PR is ready to merge ! Thanks @azz for the merge.
ah, been waiting for this! 😻
Could you also update:
Add a test. You can duplicate testEslint
and start from there.
This implementation makes tslint a higher priority than eslint. Having both enabled would break previous behavior where eslint was trying to read typescript files (assuming it had the right parser).
Any updates on this?
no i dont have times this days for make that, if an people can make the test, i am so happy :)
This PR fixes the tslint test. ~Its working fine with tslint.json
, which is the standard name for such a file, but it doesn't seem to work with .yml
files. Maybe this is not part of this PR, I'll have to take a look to make sure when I have time.~ Working fine for YAML
as well.
No idea why this test is failing, its working fine on local. Perhaps there's some missing prettier/tslint config on CI that I am unaware of? I'm open to suggestions to resolve this and get it merged asap.
For Context: I'm running this on a windows machine. Perhaps its a linux issue? if anyone can reproduce it would be great!
Friendly nudge: can anyone reproduce tests on a linux/osx environment? and/or help with this obscure CI test failure. On windows the error is not reproduceable.
I'm able to reproduce it on Mac OS
@Faultless seems to be working now 😃
travis job for my commit: https://travis-ci.org/ColCh/prettier-vscode/jobs/385907251
commit itself https://github.com/ColCh/prettier-vscode/commit/3f1f3feb5e4be37558c27985e350778662e1c8b1
waiting for @orblazer to review PR https://github.com/orblazer/prettier-vscode/pull/5
Thanks for merging. What now ?
Fixed a small nit here, but apart from that there should be no reason not to merge this asap
@CiGit is this good to go for you? or is there something blocking still?
@azz deserves to review this one :-)
it seems "This branch has conflicts that must be resolved"
Hi @CiGit,
Is there any chance to have merged soon?
Or at least point me the way of how can I setup this updates manually for my local prettier-vscode
Thanks!
@azz we are waiting for your review 😄
Can we merge this first since @azz had approved this before and what came after were just test code. So if the idea works, the test works, why not let any possible potential issues to be tested by users? @CiGit
Ah ah ah ah cool
Coming here every day to check if PR was merged :D @CiGit @azz sorry for bothering, but merge will be highly appreciated!
hi, just want to know if the prettier tslint
is already integrated into the prettier so that we don't need to install it every time via the npm and just need to turn it on in user's setting, like what we do for the prettier eslint
?
*crickets*
So I ran into an issue when testing this out where import statements would get mangled when the file was formatted with the given tslint.json:
{ "rules": { "quotemark": [true, "single"], "ordered-imports": true } }
I was able to recreate the issue with a simple .ts file that has the following lines:
import Buttons from '../components/Buttons'; import { newText } from '../actions/actions';
Formatting the file swaps the lines as intended but it also mangles the imports and adds random characters. Must have something to do with the single quote rule.
Nothing yet? :(
Thanks for your contribution.
@cjbassi AFAIK Errors should be corrected in dependencies.
Hey @CiGit
Thank you for merging this—glad it'll be arriving. Do you have an estimate on when you'll be rolling out the new version containing this update?
Thanks.
@chiefGui Faster than it took to merge it :-) (under 24h if everything goes as I want)
Hi @orblazer I tried to use tslint-prettier in vscode, but it looks like the max-line-length tslint rule is not taken into account for formatting line length, and neither is the print-width rule of prettier. Is this something I am doing wrong ?
I am experiencing the same issue as @sveyret. With the following tslint.json setup:
{
"extends": ["tslint:recommended"],
"rules": {
"max-line-length": [true, { "limit": 140 }]
}
}
I tried to use tslint-prettier in vscode, but it looks like the max-line-length tslint rule is not taken into account for formatting line length, and neither is the print-width rule of prettier. Is this something I am doing wrong ?
This should probably go into its own issue for tracking/visibility since this PR has already been merged. Just my 2 cents.
It seems that prettier is ignoring tslint "Indent" setting. Was that supposed to be fixed in ths PR?
If prettier.tslintIntegration
is true,
prettier ignores both its own tab settings (prettier.useTabs
& prettier.tabWidth
) and tslint's indent
.
I haven't experienced (yet) the problem raised by @aNickzz, but created 2 issues for max-line-length and also a problem of semicolon: https://github.com/prettier/prettier-vscode/issues/557 https://github.com/prettier/prettier-vscode/issues/558
@sveyret could you move those issues to the prettier-tslint
repo?
Hello, I have implement
prettier-tslint
. This read and format correctly typescript (from tslint file)Thanks.