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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@cabify/eslint-config

v3.0.1

Published

ESLint config for Cabify Javascript projects

Readme

@cabify/eslint-config

npm (scoped)

All Contributors

ESLint config for both TS and JS, Cabify way.

Installation

npm i -D @cabify/eslint-config eslint prettier

or

yarn add --dev @cabify/eslint-config eslint prettier

Usage

  1. Create a .eslint.config.js file at the root of your project:
import recommended from '@cabify/eslint-config';
/* Define an object for local configuration. 
/ You can add your custom configuration and override existing rules here before exporting it.
const localConfig = {};
export default [...recommended, localConfig];
*/
export default [...recommended];
  1. Add the lint task into your package.json:
...
"scripts": {
  ...
  "lint:fix": "eslint ./ --fix",
  "lint": "eslint ./",
  ...
}
  1. Add a .globalIgnores in your eslint.config.js to avoid checking unwanted files:
// https://eslint.org/docs/latest/use/configure/configuration-files#globally-ignoring-files-with-ignores
const globalIgnores = {
  ignores: [
    'dist',
    'node_modules/*',
    'storybook-static/*',
    'test/*',
    'build',
    'scripts',
    'webpack',
  ],
};
export default [...recommended, globalIgnores];

Formatting

The recomended configuration does not include formatting rules, as using the Prettier binary is quicker and brings more benefits. To format the files from your app a and checking them are properly formatted you can add the following scripts to your package.json file:

...
"scripts": {
  ...
  "format": "prettier --write .",
  "format:check": "prettier --check .",
  ...
}

Setup for TypeScript

const localConfigs = {
  languageOptions: {
    parserOptions: {
      project: './tsconfig.json',
      ecmaVersion: 2020,
    },
  },
  settings: {
    'import/resolver': {
      typescript: {
        alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
        project: '<root>/tsconfig.json',
      },
    },
  },
};

export default [...recommended, localConfigs];
  1. Add a ./tsconfig.eslint.json to the root of your project. NOTE: it is important that your tsconfig.eslint.json file includes the same files that you are going to lint, or it will fail and make linting so slow.
{
  "extends": "./tsconfig.json",
  "include": ["src/**/*", "test/**/*"] // remember to import also your test files if you want to lint them
}

A note on performance in TS projects

There is an known issue that may affect linting times in projects with TS. If you note that your linting time is not acceptable, there is a workaround to improve it a lot, but it implies to disable some rules. If you can live without them, just make these changes in your .eslintrc config:

{
  ...
  // remove the "project" field (if you don't have any other parserOptions you can remove the full section)
  "parserOptions": {},
  "rules": {
    // this rules depend on project field, so they must be disabled to make linting much faster
    "@typescript-eslint/await-thenable": "off",
    "@typescript-eslint/no-misused-promises": "off",
    "@typescript-eslint/no-unnecessary-type-assertion": "off",
    "@typescript-eslint/prefer-includes": "off",
    "@typescript-eslint/prefer-regexp-exec": "off",
    "@typescript-eslint/prefer-string-starts-ends-with": "off",
    "@typescript-eslint/require-await": "off",
    "@typescript-eslint/unbound-method": "off"
  }
}

Publish a new version

  • Update CHANGELOG with new features, breaking changes, etc
  • Check you're in main branch and everything is up-to-date.
  • Run yarn publish:<major|minor|patch> or yarn publish:canary for canary versions.
  • Run git push && git push --tags
  • Check all test actions triggered after previous push are ✔️.
  • Go to create a new release, select previously pushed tag and write a Title.
  • Check the action for publish the npm has finished with success.
  • Check on npm package webpage, the version has been published successfully under latest tag.

This will trigger a workflow on Github which will publish to npm eventually.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!