Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
saranshk
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
69 ms
·
331.
▲
How to Estimate What You Can’t Predict: Web App Development Cost
(hackernoon.com)
2 points
by
saranshk
8y ago
|
0 comments
332.
▲
Now and GitHub
(zeit.co)
2 points
by
saranshk
8y ago
|
0 comments
333.
▲
Using Prettier to format your JavaScript code
(medium.com)
1 points
by
saranshk
8y ago
|
0 comments
334.
▲
11 JavaScript Resources for Every Level of Expertise
(fullstackacademy.com)
2 points
by
saranshk
8y ago
|
0 comments
335.
▲
by
saranshk
8y ago
Not always though. The context is important as well.
336.
▲
Meet Instagram's YouTube Clone: IGTV
(gizmodo.com)
1 points
by
saranshk
8y ago
|
0 comments
337.
▲
IBM is offering a free blockchain course for students in India
(thenextweb.com)
2 points
by
saranshk
8y ago
|
0 comments
338.
▲
How to import/export ES6 modules in Node.js
(wisdomgeek.com)
1 points
by
saranshk
8y ago
|
0 comments
339.
▲
Great login screen animations
(codepen.io)
2 points
by
saranshk
9y ago
|
0 comments
340.
▲
How React, Relay, and GraphQL Fit Together
(wisdomgeek.com)
2 points
by
saranshk
9y ago
|
0 comments
341.
▲
by
saranshk
9y ago
Since prettier formats using the javascript AST, it should not introduce any bugs.
342.
▲
by
saranshk
9y ago
The opinionated formatting is what makes prettier great. A lot of configuration can be confusing for people to go through and pick a standard
343.
▲
by
saranshk
9y ago
As mentioned in the post, I have set my configuration in VS Code's settings itself.
344.
▲
by
saranshk
9y ago
Javascript modules were created for this purpose only. Have them as separate files while developing, have it readable and then you can always bundle them in a single file while deploying
345.
▲
by
saranshk
9y ago
They are working on adding support for more languages
346.
▲
by
saranshk
9y ago
Prettier docs mention that support for Java is WIP
347.
▲
by
saranshk
9y ago
If you have 10k LOC in a single file, you have bigger problems to worry about
348.
▲
by
saranshk
9y ago
https://prettier.io/docs/en/precommit.html This should help you get setup
349.
▲
by
saranshk
9y ago
Just curious, does VS format files based on max length and break them if it exceeds? I have never seen a setting for that
350.
▲
by
saranshk
9y ago
None that I know of
351.
▲
by
saranshk
9y ago
Agreed. Formatted code does not allow you to write stuff that is difficult to understand/reason about
352.
▲
by
saranshk
9y ago
Formatting per file/directory is a feasible solution. Another approach could be that you integrate it in your editor, and on every file that you work, on pressing save, it gets formatted. Thus you can convert it file by file. If you do
353.
▲
by
saranshk
9y ago
I don't think they will add them. They are very opinionated and skeptical about adding configuration options. If there is more of those, then again everyone will try and have an opinion of their own and it will end up being like ESLint
354.
▲
by
saranshk
9y ago
Thanks! I also have the extension installed in code.
355.
▲
by
saranshk
9y ago
I remember reading that gofmt was one of the inspirations for prettier
356.
▲
by
saranshk
9y ago
I think the authors include people from React team and fb open source team has been innovating at scale since some time now
357.
▲
by
saranshk
9y ago
Yes, TS support was baked in recent versions
358.
▲
by
saranshk
9y ago
It's great to have reviews that do not involve discussions regarding formatting
359.
▲
by
saranshk
9y ago
I have kind of stopped indenting my files while editing. I know prettier will do that when I hit save (I have it as an extension in code)
360.
▲
by
saranshk
9y ago
Totally agreed. The pre-commmit hooks do tend to have a lot of tests and enabling in feature branches will be a pain but these tools are needed in order to have stricter checks and ensuring that people of all experience levels continue work
More ›