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

eureka-init

v1.1.6

Published

Shared configuration for Husky, Commitlint, Prettier, ESLint, and Jest for Eureka Group

Readme

eureka-init

Modul untuk menyeragamkan format commit, linting, dan formatting di seluruh project frontend Eureka Group.

🎯 Tujuan

  • Menyeragamkan format commit (Conventional Commits).
  • Konsistensi antar tim (15+ developer).
  • Memudahkan tracking bug & fitur.
  • Siap untuk CI/CD dan audit sistem.

🚀 Cara Penggunaan

1. Install Dependency

Jalankan di root project Anda:

npm install --save-dev eureka-init

2. Inisialisasi Konfigurasi

Jalankan perintah berikut untuk mengcopy file konfigurasi dan setup husky:

npx eureka-init

Perintah ini akan:

  1. Membuat file commitlint.config.js.
  2. Membuat file .prettierrc.
  3. Membuat file .eslintrc.js (dilengkapi dengan eslint-plugin-react).
  4. Membuat file lint-staged.config.js.
  5. Membuat file jest.config.js dan jest.setup.js.
  6. Menjalankan npx husky install.
  7. Membuat hook .husky/commit-msg dan .husky/pre-commit (terintegrasi dengan lint-staged).
  8. Menambahkan script prepare, lint, format, test, dan lint-staged di package.json.

🧱 Format Commit

Gunakan format: <type>: <subject>

Allowed Types:

  • feat: Fitur baru
  • fix: Perbaikan bug
  • refactor: Perbaikan struktur kode tanpa ubah fungsi
  • chore: Maintenance (dependency, config, cleanup)
  • docs: Dokumentasi
  • test: Testing

Rules:

  • Huruf kecil semua.
  • Maksimal 100 karakter.
  • Minimal 10 karakter untuk subject.
  • Tidak boleh ada titik di akhir.

🛠️ Script yang Tersedia

Setelah instalasi, Anda bisa menggunakan:

  • npm run lint: Menjalankan eslint.
  • npm run format: Menjalankan prettier untuk merapikan kode.
  • npm run test: Menjalankan unit test menggunakan Jest.
  • npm run lint-staged: Menjalankan linting dan formatting otomatis pada file yang di-stage sebelum commit.

📢 Rangkuman Update Terbaru (v1.0.6 - v1.1.4)

Modul ini telah mendapatkan peningkatan signifikan untuk mendukung ekosistem pengembangan modern (khususnya React dan Next.js) secara out-of-the-box:

🌟 v1.1.0: Integrasi lint-staged & Linter React

  • lint-staged & Hook Pre-commit Super Cepat: Hook pre-commit kini otomatis menjalankan npx lint-staged. Proses linting dan formatting hanya dilakukan pada file yang mengalami perubahan (di-stage), bukan keseluruhan project, sehingga commit menjadi jauh lebih cepat.
  • Optimasi Tanpa Redundansi: Konfigurasi lint-staged.config.js dirancang cerdas untuk menghindari kerja dua kali. Eksekusi eslint --fix pada file JS/TS/JSX/TSX sudah otomatis mencakup formatting Prettier (melalui plugin:prettier/recommended), sedangkan file non-JS (.json, .css, .md) tetap dirapikan dengan prettier --write.
  • Dukungan Penuh Aturan React: Konfigurasi ESLint (.eslintrc.js) kini sudah terbundel dengan eslint-plugin-react (plugin:react/recommended). Aturan usang pada React modern seperti react-in-jsx-scope dan prop-types telah dinonaktifkan secara otomatis.

🧪 v1.0.6: Standarisasi Unit Testing dengan Jest

  • Environment Testing Siap Pakai: Konfigurasi jest.config.js dan jest.setup.js telah disesuaikan untuk pengujian komponen UI React/Next.js menggunakan @testing-library/react, @testing-library/jest-dom, @testing-library/user-event, dan jest-environment-jsdom.
  • Mocking & Modul Alias: Sudah dilengkapi konfigurasi penanganan aset statis serta pemetaan CSS Modules (identity-obj-proxy) agar test tidak gagal saat mengimpor file styling.
  • Contoh Test Otomatis: Saat inisialisasi (npx eureka-init), sistem otomatis membuat struktur folder src/__tests__ beserta file example.test.js sebagai acuan dan panduan standar penulisan test bagi tim developer.