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

@brickblock/eslint-config-base-ts

v2.3.3

Published

Base eslint config for all our TypeScript projects

Downloads

2

Readme

Base ESLint Config for TypeScript

Shareable ESLint config for all Brickblock TypeScript projects. Based one TypeScript ESLint using the @typescript-eslint/parser for parsing TypeScript and @typescript-eslint/eslint-plugin for TypeScript-specific linting rules.

How to use this package

  1. Install Package

    yarn add --dev @brickblock/eslint-config-base-ts
  2. Install required ESLint plugins from peer dependencies

    npx install-peerdeps --yarn --dev @brickblock/eslint-config-base-ts

    This is using install-peerdeps to automatically install all plugins used by this package. Plugins used by this ESLint config are defined as peerDependencies as outlined in the ESLint docs:

    If your shareable config depends on a plugin, you should also specify it as a peerDependency (plugins will be loaded relative to the end user’s project, so the end user is required to install the plugins they need). However, if your shareable config depends on a third-party parser or another shareable config, you can specify these packages as dependencies.

    Source

  3. Use Package

Once @brickblock/eslint-config-base-ts is installed, you can use it by adding it to the extends section of your ESLint configuration.

/* .eslintrc.js */

module.exports = {
  extends: ['@brickblock/eslint-config-base-ts', 'other-eslint-configs']
}

NOTE: As the order in the extends block matters, we recommend making this package the first config because it contains all our base-level rules that may be overridden in more specific configs such as @brickblock/eslint-config-react

How to develop this package

  1. Change, add, or delete rules

    All rules are to be found under ./src/rules. Make sure to comment your rules and also link to the full docs to help colleagues reading your code understand what a particular rule does and why it's useful to us.

  2. Test your rules locally

    To save you a ginormous amount of time, please do not directly push to CI or *gasp*, even push directly to npm without testing. Because testing locally is really easy.

    a) Make a build

    # To compile TypeScript into a ready-to-use build
    yarn build

    b) Register your package locally

    # Register your package for local use
    yarn link

    c) Link it into another local repo

    # `cd` into a local repo that will be using this eslint config
    cd some-package-using-this-config
    yarn link @brickblock/eslint-config-base-ts

    d) Try out your new rules

    cd some-package-using-this-config
    yarn lint:ts # this should now use your updated rules
  3. Commit your changes

    Please adhere strictly to the Conventional Commits Spec so standard-version can auto-update the version number according to semver and produce a nice CHANGELOG for your fellow developers.

  4. Push your branch

    Business as usual from here:

    • Push your branch
    • Open MR
    • Get your code reviewed
    • Merge it in
    • A new npm release will be produced automatically by CI including semver-adhering version bump plus updated CHANGELOG (given you've adhered to the Conventional Commits Spec)