Yuhei Yasudaデザインエンジニア。2023年入社。Developer Experience & Performanceチーム所属。

最近、色々なライブラリをCommonJS(CJS)からECMAScript Module(ESM)へとマイグレーションしています。 その際に、ESMでは__dirnameやrequireなどCommonJS特有の機能は使えなくなっています。 また、TypeScriptやBabelなど多くのツールはCJSではimport時に拡張子はなくても大丈夫ですが、ESMの場合はimport時に拡張子が必要になります。 import url from "node:url"; - import { mdEscape } from "./mdEscape"; + import { mdEscape } from "./mdEscape.js"; // ESMでは相対パスに拡張子は省略できない + const __filename = url.fileURLToPath(import.meta.url); /
PackemonScaffold, build, and maintain npm packages using standardized configurations and practices. Supports JavaScript and TypeScript. 📦 Zero-config packagesNo longer fiddle with Babel, Rollup, Webpack or other tooling configurations. Packemon configures packages automatically using sane and common defaults. 🧩 Multiple platformsSupport either or both Node.js and Web based platforms on a per-pro
import { createTheme, style } from '@vanilla-extract/css'; export const [themeClass, vars] = createTheme({ color: { brand: 'blue', white: '#fff' }, space: { small: '4px', medium: '8px', } }); export const hero = style({ backgroundColor: vars.color.brandd, color: vars.color.white, padding: vars.space.large });
ts-migrate is a tool for helping migrate code to TypeScript. It takes a JavaScript, or a partial TypeScript, project in and gives a compiling TypeScript project out. ts-migrate is intended to accelerate the TypeScript migration process. The resulting code will pass the build, but a followup is required to improve type safety. There will be lots of // @ts-expect-error, and any that will need to be
Small utility that I wrote to script converting a JS codebase to TypeScript, while trying to solve some of the common TypeScript errors that will be received upon such a conversion. The utility performs the following transformations: Renames .js files to .ts Adds property declarations to ES6 classes so that they are compilable by the TypeScript compiler (see below). Any function calls that provide
A zero config JavaScript linter with support for React, Flow, and Typescript. Lynt has two main philosophies: Zero configuration by default. Out of the box, Lynt is a working linter and does not need any configuration. However, if you would like to add or remove rules from the default Lynt config, you have the option to do so. No style rules. Lynt is completely unopinionated when it comes to code
I’m a big fan of TypeScript. The first time I heard about it was around 2013 (release 0.8), but back then, it wasn’t very mature: after trying it out in one or two smaller projects, I abandoned it. I started using it again around release 1.6 (2015) along with Angular 2, and have had such a great experience with it that I’ve slowly started migrating most of my existing projects to it. I also use it
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く