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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@crometrics/eslint-config-crometrics-typescript

v3.2.1

Published

<h1 align="center">eslint-config-crometrics-typescript</h1>

Downloads

383

Readme

Contains the Cro Metrics' TypeScript linting rules for ESLint.

The intent of our ESLint configs is to provide a common set of rules for coding within the Cro Metrics' codebase. Having installable ESLint configs will streamline and simplify using our style guide across various projects/repos easier.

Installation and Usage Instructions

  1. Run npx install-peerdeps @crometrics/eslint-config-crometrics-typescript@latest
  2. Add the package to the extends array/string in your .eslintrc.*.

Example

An example bare bones .eslintrc.* config with no other rules, plugins, extended configs, etc. would look like:

// .eslintrc.cjs

module.exports = {
  extends: ['@crometrics/eslint-config-crometrics-typescript'],
  overrides: [],
};

Override specific settings by specifying them in the rules object as normal. See http://eslint.org/docs/developer-guide/shareable-configs for more details.

You can add additional extended configs, plugins, rules, globals, parser options, env options, etc. the same as you normally would.

Example

// eslintrc.cjs

module.exports = {
  extends: [
    '@crometrics/eslint-config-crometrics-typescript',
    'plugin:react/recommended',
  ],
  plugins: ['react'],
  rules: {
    // Any project specific rules or rules for plugins/additional configs here
    'react/no-unescaped-entities': ['off'],
  },
  globals: {
    // Add any project globals here
    PJS: true,
  },
};

Available Configs

See eslint-config-crometrics/packages/ to view all available configs.

Of note, there is a base configuration for projects that only use JavaScript.

  • If your project contains any TypeScript:
    • Install only this module
  • If your project is only JavaScript:
    • Install only eslint-config-crometrics-base (Link)

IMPORTANT NOTE:

There is no reason to install both eslint-config-crometrics-base and eslint-config-crometrics-typescript in the same project and doing so will give you problems.

Making Changes and Publishing Updates

  1. Make the changes you want to make in /packages/eslint-config-crometrics-typescript/index.js or /packages/eslint-config-crometrics-typescript/rules/[filename].js.
  2. Increment version in package.json.
  3. Commit and push changes to the repo
  4. From the root directory of this repo, run npm publish to publish from the repo to npm
  5. Run npm update @crometrics/eslint-config-crometrics-typescript (or simply npm update to update all npm packages) in the projects where the config is installed
  6. Make a post in the #-engineering Slack channel informing others to run npm update @crometrics/eslint-config-crometrics-typescript or npm update as well