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

@trackunit/eslint-plugin-trackunit

v0.4.31

Published

A shared ESLint plugin and configuration preset for Trackunit projects. It bundles Trackunit-specific custom rules alongside curated third-party plugin configurations into ready-to-use flat-config presets for ESLint 9+.

Downloads

5,551

Readme

@trackunit/eslint-plugin-trackunit

A shared ESLint plugin and configuration preset for Trackunit projects. It bundles Trackunit-specific custom rules alongside curated third-party plugin configurations into ready-to-use flat-config presets for ESLint 9+.

Quick Start

This plugin ships flat-config presets for common and client-side code. Compose them in your ESLint config:

// eslint.config.cjs
const { configs } = require("@trackunit/eslint-plugin-trackunit");

// Pick the presets that match your project:
module.exports = [...configs.base, ...configs.react];

For server, public API, and E2E presets see @trackunit/eslint-plugin-trackunit-internal (internal, not published to npm).

Presets

| Preset | Purpose | Includes | |--------|---------|----------| | configs.base | Foundation for every project | TypeScript, import, module-boundary, JSDoc, and custom Trackunit rules | | configs.react | React / browser applications | React, React Hooks, Storybook, Jest + Testing Library overrides |

Combining Presets

Presets are arrays of flat-config objects — spread them in the order you need:

// React application
module.exports = [...configs.base, ...configs.react];

configs.base should always come first.

Custom Rules

All custom rules are enabled automatically through the presets under the @trackunit/ prefix. Below is a summary of every rule shipped with the plugin.

Code Quality

| Rule | Severity | Auto-fix | Description | |------|----------|----------|-------------| | @trackunit/no-typescript-assertion | warn | — | Disallows as, angle-bracket, and ! type assertions. as const and as unknown are allowed. | | @trackunit/no-internal-barrel-files | error | — | Prevents internal index.ts barrel files that are not at the library root. | | @trackunit/prefer-destructured-imports | — | yes | Converts namespace imports (import * as Foo) to named imports for configured packages. |

React & JSX

| Rule | Severity | Auto-fix | Description | |------|----------|----------|-------------| | @trackunit/no-template-strings-in-classname-prop | — | — | Disallows template literals in className. Use twMerge() or cvaMerge() instead. | | @trackunit/require-classname-alternatives | — | yes | Replaces banned class names with approved alternatives. | | @trackunit/cva-merge-base-classes-as-array | — | yes | Enforces array syntax for cvaMerge base classes when more than one class is used. | | @trackunit/design-guideline-button-icon-size-match | — | yes | Ensures Icon inside Button uses the correct size prop. | | @trackunit/prefer-field-components | — | yes | Prefers SelectField/TextField over manually combining Label + base input components. | | @trackunit/prefer-mouse-event-handler-in-react-props | — | — | Enforces MouseEventHandler<T> typing for onClick* props. | | @trackunit/prefer-event-specific-callback-naming | — | — | Enforces event-specific naming (e.g. onClickClose over onClose) for click handlers. | | @trackunit/require-optional-prop-initialization | — | — | Requires optional component props to be initialized inside the component. | | @trackunit/require-list-item-virtualization-props | — | — | Requires VirtualizationListItemProps on list items inside <List>. |

Testing

| Rule | Severity | Auto-fix | Description | |------|----------|----------|-------------| | @trackunit/no-jest-mock-trackunit-react-core-hooks | — | — | Disallows jest.mock("@trackunit/react-core-hooks"). Use trackunitProviders() mock builders instead. |

NX / Monorepo

| Rule | Severity | Auto-fix | Description | |------|----------|----------|-------------| | @trackunit/no-internal-graphql-when-tagged-with-gql-public | error | — | Prevents internal GraphQL usage in projects tagged with gql-public. Applied to project.json files. |

Utilities

createSkipWhen

Wraps rules so they are skipped for projects matching NX workspace criteria (e.g. specific tags):

const { createSkipWhen } = require("@trackunit/eslint-plugin-trackunit");

createSkipWhen({
  when: { tags: ["scope:tool"] },
  plugins: {
    "import-x": importXPlugin,
  },
  rules: {
    "import-x/no-extraneous-dependencies": ["error", { /* ... */ }],
  },
});

findMonorepoRoot

Resolves the NX monorepo root by walking up from the plugin directory until nx.json is found. Useful when rule options need an absolute path to the workspace root.

const { findMonorepoRoot } = require("@trackunit/eslint-plugin-trackunit");

const root = findMonorepoRoot();

Requirements

  • Node.js >= 24
  • ESLint 9+
  • TypeScript 5.9+

For more info and a full guide on Iris App SDK Development, please visit our Developer Hub.

Trackunit

This package was developed by Trackunit ApS. Trackunit is the leading SaaS-based IoT solution for the construction industry, offering an ecosystem of hardware, fleet management software & telematics.

The Trackunit logo