tsx
prettier
tsx | prettier | |
---|---|---|
23 | 441 | |
7,702 | 48,301 | |
3.5% | 0.6% | |
9.2 | 9.8 | |
8 days ago | 5 days ago | |
TypeScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
tsx
-
Finally, a guide for Node.js and TypeScript and ESM that works
I really enjoy frontend/node/typescript development. I roll my eyes whenever the HN-types complain about CSS or frontend development being a hellhole. Mostly the comments I see seem ignorant or impatient ("Why doesn't this thing work without be bothering to learn it?")
However, the intersection of typescript, nodejs, and ES modules is consistently the most frustrating experience I ever have. Trying to figure out which magic incantation of tsconfig/esbuild/tsc/node options will let me just write code and run it is a fools errand. You might figure something out, and then you try to use Jest and then you descend into madness again.
The biggest tip I can give people is to ditch ts-node and just use (the awkwardly named) tsx https://github.com/privatenumber/tsx, which pretty much just "mostly works" for running Typescript during dev for node.
The problem mostly seems to stem for all the stakeholders being pretty dogmatic to whatever their goals are, rather than the pragmatic option of just meeting people where they are. I really wish the Node, Typescript, Deno/Bun, and maybe some bundler people would come together and figure out how to make this easier for people.
-
ERDIA: TypeORM entity specification documentation tool
If your TypeORM entity is written in TypeScript, you have to run ERDIA using ts-node or tsx as follows.
-
xtsz - a TS / JS file runner with support for HTTP/S imports
Want to import a package / file conveniently from esm.sh or unpkg or directly from a GitHub repo for a one-off script (for example). To do this I created a custom ESBuild plugin to handle HTTP imports - that worked for ,js files. To support running both ESM and CJS, I use tsx.
-
What is your must have npm package on any given project?
I prefer tsx honestly. Nodemon will detect that your using TypeScript and switch from node to ts-node but tsx is a no config necessary version of ts-node that also runs faster. Of course you can configure ts-node to use swc to be faster but then you're playing with config files to get things working.
-
Question about debugging TypeScript
I highly recommend you give this a shot over ts-node
-
Jsx as a general templating language?
Dude I just worked on a PoC a few hours ago. What I did was use ReactDOM's renderToStaticMarkup and tsx to execute the script so I get jsx transpilation on the fly.
-
Thoughts about Deno?
I’ve been trying to adopt Deno into new projects, but I find Node through tsx good enough.
-
Will nodeJs ever have out of the box typescript support?
try tsx. it has support for watch mode and works great with esm module projects.
-
Why is this so hard to do? Help
This is the answer: https://github.com/esbuild-kit/tsx
-
<3 Deno
Have a look at https://github.com/esbuild-kit/tsx
_tsx is a CLI command (alternative to node) for seamlessly running TypeScript & ESM, in both commonjs & module package types.
It's powered by esbuild so it's insanely fast._
prettier
-
My opinion about opinionated Prettier: 👎
From my point of view, Prettier doesn't work well for styling with utility classes. For a discussion see Prettier#7863 or Prettier#5948.
-
Shared Data-Layer Setup For Micro Frontend Application with Nx Workspace
Prettier: An opinionated code formatter that enforces a consistent code style.
-
To Review or Not to Review: The Debate on Mandatory Code Reviews
Automating code checks with static code analysis allows us to enforce code styling effectively. By integrating tools into our workflow, we can identify errors at an early stage, while coding instead of blocking us at the end. For instance, flake8 checks Python code for style and errors, eslint performs similar checks for JavaScript, and prettier automatically formats code to maintain consistency.
-
Setting up Doom Emacs for Astro Development
So anyways, I wanted to hook up Emacs with Astro support. For now, I've just been roughing it out there and running Prettier by itself and turning off save on format and auto-complete. It's been scary.
-
Biome.js : Prettier+ESLint killer ?
If you're a developer, you're surely familiar with Prettier and ESLint. With over 8 years of existence, they have established themselves as references in the JavaScript ecosystem.
-
Most basic code formatting
prettier is used to format you text
-
How to use Lefthooks in your node project?
No formatting inconsistencies: The committed code should follow the organization's code formatting standards(prettier or pretty-quick).
-
Git Project Configuration With Husky and ESLint
Let’s walk through the steps for a one-time setup to configure husky pre-commit and pre-push hooks, ESLint with code styles conventions, prettier code formatter, and lint-staged. Husky automatically runs a script on each commit or push. This is useful for linting files to enforce code styles that keeps the entire code base following conventions.
-
What is an Abstract Syntax Tree in Programming?
GitHub | Website
-
Shared Tailwind Setup For Micro Frontend Application with Nx Workspace
Prettier: An opinionated code formatter that enforces a consistent code style.
What are some alternatives?
esbuild-runner - ⚡️ Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild
black - The uncompromising Python code formatter
ts-node - TypeScript execution and REPL for node.js
JS-Beautifier - Beautifier for javascript
ts-runtime-comparison - Comparison of Node.js TypeScript runtimes
dprint - Pluggable and configurable code formatting platform written in Rust.
esno - Alias to `tsx`
ESLint - Find and fix problems in your JavaScript code.
esbuild-node-tsc - Build your Typescript Node.js projects using blazing fast esbuild
prettier-plugin-organize-imports - Make Prettier organize your imports using the TypeScript language service API.
vite - Next generation frontend tooling. It's fast!
Standard - 🌟 JavaScript Style Guide, with linter & automatic code fixer