npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jmlweb/tsconfig-astro

v2.0.1

Published

TypeScript configuration for Astro projects with JSX support and modern defaults

Readme

@jmlweb/tsconfig-astro

npm version License: MIT Node.js TypeScript Astro

TypeScript configuration for Astro projects with JSX preserve mode and bundler resolution. Extends @jmlweb/tsconfig-base.

✨ Features

  • 🚀 Astro Ready: jsx: "preserve" for Astro and framework components
  • 🌐 DOM Types: DOM and DOM.Iterable libs
  • 📦 Bundler Resolution: module: "ESNext" with moduleResolution: "bundler"
  • 🔒 Strict Mode: inherits every strict flag from the base config

📦 Installation

npm install --save-dev @jmlweb/tsconfig-astro @jmlweb/tsconfig-base astro typescript

🚀 Quick Start

{
  "extends": "@jmlweb/tsconfig-astro",
  "include": ["src", ".astro/types.d.ts"],
  "exclude": ["node_modules", "dist"]
}

💡 Examples

Path aliases

{
  "extends": "@jmlweb/tsconfig-astro",
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["src", ".astro/types.d.ts"]
}

React islands

{
  "extends": "@jmlweb/tsconfig-astro",
  "compilerOptions": {
    "jsx": "react-jsx",
    "jsxImportSource": "react"
  },
  "include": ["src", ".astro/types.d.ts"]
}

📋 Configuration Details

Extends @jmlweb/tsconfig-base and overrides:

| Option | Value | Description | | ------------------ | ----------------------------------- | ------------------------------------ | | jsx | preserve | Leave JSX to Astro and its renderers | | module | ESNext | ES modules for bundlers | | moduleResolution | bundler | Bundler-style resolution | | lib | ["ES2022", "DOM", "DOM.Iterable"] | ES2022 plus browser APIs |

Everything else (strict, target: ES2022, verbatimModuleSyntax, …) comes from the base config.

🎯 When to Use

  • ✅ Astro sites and content-driven projects
  • ✅ Astro with React, Preact or Solid islands

Use @jmlweb/tsconfig-react for React-only apps and @jmlweb/tsconfig-node for Node.js code.

🔧 Extending the Configuration

{
  "extends": "@jmlweb/tsconfig-astro",
  "compilerOptions": {
    "noEmit": true,
    "types": ["astro/client"]
  }
}

📝 Usage with Scripts

{
  "scripts": {
    "dev": "astro dev",
    "build": "astro check && astro build",
    "typecheck": "astro check"
  }
}
npm run typecheck

astro check requires @astrojs/check.

📋 Requirements

  • Node.js >= 22.12.0
  • TypeScript >= 5.0.0
  • Astro >= 4.0.0

📦 Peer Dependencies

  • @jmlweb/tsconfig-base (^2.0.0)
  • astro (>=4.0.0)
  • typescript (>=5.0.0)

🔗 Related Packages

🔄 Migration Guide

1.x → 2.0.0

Breaking: Node.js >=22.12.0 is now required (Node.js 18 and 20 are end-of-life).

  1. Upgrade Node.js to 22.12.0 or later.
  2. Update the package: npm install --save-dev @jmlweb/tsconfig-astro@^2.0.0.

The compilerOptions are unchanged. See the Changelog.

📄 License

MIT