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

@gintrick/eslint-config

v3.5.0

Published

GinTrickのプロダクトで使うための共通eslint-config

Readme

eslint-config

GinTrickのプロダクトで使うための共通eslint-config

インストール方法

npm i -D @gintrick/eslint-config eslint-plugin-import

環境に応じて追加で以下をインストールをする。

TypeScript: @typescript-eslint/eslint-plugin , @typescript-eslint/parser , eslint-import-resolver-typescript

React: eslint-plugin-react , eslint-plugin-react-hooks , eslint-plugin-react-refresh

Usage

一般的な eslint-config パッケージと同様に使う。

.eslintrc.js の例

module.exports = {
  // ...
  extends: ['@gintrick/eslint-config/typescript-react'], // // <- TypeScript + React の場合
  plugins: ['@typescript-eslint', 'react', 'react-hooks', 'import'], // <- TypeScript + React の場合
  rules: {
    // ... プロジェクト固有の追加ルール
  },
  settings: {
    react: { // <- React を使う場合
      version: 'detect',
    },
    'import/resolver': { // TypeScriptを使う場合
      typescript: {},
    },
  },

その他の parserOptions などのプロパティについては詳しくはESLint や @typescript-eslint のドキュメントを参照して良い感じに設定する必要がある。

extends に指定できるルールは以下の通り。

  • @gintrick
    • 基本の設定。ReactもJavaScriptも使わないときに使う
  • @gintrick/eslint-config/typescript
    • TypeScriptを使うときに使う。基本の設定が含まれている
  • @gintrick/eslint-config/react
    • Reactを使うときに使う。基本の設定が含まれている
  • @gintrick/eslint-config/typescript-react
    • TypeScriptとReactを使うときに使う。基本の設定が含まれている

このパッケージの開発方法

ESLint には eslint-config-ほげほげ というパッケージ名でESLintの設定ファイルをパッケージとして公開する慣習・仕組みがある。

この @gintrick/eslint-config も eslint-configの仕組みに則って作成した。ここに書いてあるeslint-configのハウツーを参考にした。

ruleSets ディレクトリ以下にルールが書かれている。例えば ruleSets/react.js には React用のeslintルールが書いてある。

ruleSetsのルールをルート直下のファイル (inde.js や typescript-react.js など) から参照している。ルート直下のjsファイル名はそのまま extends されるときの名前に使われている(そいういうEslint の仕様となっている)。

publish 手順

  • PRをマージしたりmasterに直接pushするなどしてmasterを更新する。
  • 以下のコマンドを叩く
npm version minor  # package.json の versionを更新し、タグ付きのコミットを生成するコマンド。更新内容に応じて major, minor, patch のいずれかを選択
npm publish # パッケージをpublish する。package.json の versionを見るので、同じバージョンが既にpublishされていたらエラーになる。 
  • 必要であればリリースノートを書く
    • 破壊的変更や大きめな機能をつけたときに書こう