I’m curious about the value of eslint for TypeScript. I’ve not really found myself wanting from the coverage provided by tsc.
Have you tried some of the type info based rules in typescript-eslint? They're fantastic. No floating promises, no bad templating, etc.
Starting a TypeScript Project in 2021
51–60 of 190 posts
Re: Starting a TypeScript Project in 2021
#52At what point does the complexity outweigh the benefits? Just because someone wants to control a UI element to the nth pixel doesn't mean we should let them do that. At this point I'm thinking it might be less bandwidth, complexity, and easier to maintain to just present a web page as a giant imagemap. SVG, so it scales. With screen-ratio-based media queries rather than guessing DPI based on inaccurate factors like t…
Re: Starting a TypeScript Project in 2021
#53I don't see the `node --watch bundle.ts` ? That's why most of boilerplate FAILED instead of just using Next.js. Hot reloading for both server and browser is what's important.
And by being inflexible, this is one of the reasons there a bazillion tools and steps required just to have a basic project setup.
They're not using the Unix tools anyway. It's not like they're using entr and make to watch and build, but let's reinvent the wheel and use nodemon and gulp/bower/webpack/esbuild/snowpack/...
Re: Starting a TypeScript Project in 2021
#54Re: Starting a TypeScript Project in 2021
#55At what point does the complexity outweigh the benefits? Just because someone wants to control a UI element to the nth pixel doesn't mean we should let them do that. At this point I'm thinking it might be less bandwidth, complexity, and easier to maintain to just present a web page as a giant imagemap. SVG, so it scales. With screen-ratio-based media queries rather than guessing DPI based on inaccurate factors like t…
Re: Starting a TypeScript Project in 2021
#56Nice step by step, explaining what each tool does and how things work together.
I’m still leaning towards just learning Elm and give up on the JavaScript ecosystem, but an article like this gives me a little hope that at least it seem realistic to get started with TypeScript.
Re: Starting a TypeScript Project in 2021
#57In 2021, I think it's safe to start a TypeScript project with Deno.
After working with node.js for more than eight years I decided to give deno a try (https://github.com/bermi/genetic) and I’ve been gratefully surprised by the development experience.
I’m just missing a simple way to include deno code on my existing node.js and browser projects.
Re: Starting a TypeScript Project in 2021
#58That is a lot of boilerplate and reliance on external tooling that could probably be a single bash or PowerShell script. My preferred approach is to let thy primary modules be thy commands. That way everything is tidy, documented, and clear for your users. Example: // module commandName is a module to parse a command, exclusion list, and options apart from other arguments of process.argv import commandName from "./li…
The fact that it could be either bash or PowerShell is a primary reason why this tooling is there. Bash scripts work great (I use them) if everyone coding on the project shares an operating system. Not so much once you cross that boundary.
To give a sense of the lengths the JS community goes to address these compatibility issues, consider that Yarn 2 actually implements its own shell for running `package.json` scripts in a cross-platform way.
Re: Starting a TypeScript Project in 2021
#59Ava ( https://github.com/avajs/ava ) gets too little love from the blogging machinery. It's a breeze to use with TS, faster than Jest (YMMV of course), and I love the snapshot output over any other snapshot producing unit test tool. Use with NYC for coverage is a breeze.
Re: Starting a TypeScript Project in 2021
#60Maybe overkill, but it's saved me from having to remember which recent project to reference to remember exactly how I like eslint set up, etc. Been a very smooth experience!