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

@typedigital/eslint-config

v7.4.1

Published

typedigital JavaScript style guide

Downloads

255

Readme

@typedigital/eslint-config

code style typedigital npm Conventional Commits

Installation

npm i @typedigital/eslint-config --save-dev

ESLint 8 support

Since version 7.0.0 we updated our used plugins and are supporting ESLint 8. Note that the peer-dependency eslint has to be greater or equal v8.0.0.

Configurations

@typedigital - the base config

To use our eslint coding guidelines add an .eslintrc to the project's root directory with following content:

{
    "extends": [
        // base rule set
        "@typedigital/eslint-config"
    ],
    "env": {
        // add the environment you use - refer to https://eslint.org/docs/user-guide/configuring/language-options#using-configuration-files
        "node": true
    },
    // ignore configs in other directories
    "root": true
}

This will tell eslint to use our basic configuration for JavaScript projects.

@typedigital/eslint-config/react

Additional rules for React development. To add them to your project adjust your .eslintrc like this:

{
    "extends": [
        "@typedigital/eslint-config",
        "@typedigital/eslint-config/react"
    ],
    "root": true
}

@typedigital/eslint-config/react-native

Additional rules for React Native development. Should be used with typedigital/react rules. To add them to your project adjust your .eslintrc like this:

{
    "extends": [
        "@typedigital/eslint-config",
        "@typedigital/eslint-config/react",
        "@typedigital/eslint-config/react-native"
    ],
    "root": true
}

@typedigital/eslint-config/typescript

Due to the fact that TypeScript has gained so much popularity in the last few years and most of our new developments are based on TypeScript, we decided to extend our code guidelines. To use our TypeScript configuration you just need to add the following to your .eslintrc:

{
    "extends": [
        "@typedigital/eslint-config",
        "@typedigital/eslint-config/typescript",
    ],
    "parserOptions": {
      "project": ["./tsconfig.json"]
    },
    "parser": "@typescript-eslint/parser",
    "root": true
}

Note that you can use the React and React Native configuration with this configuration, too. Just add the other configurations after "@typedigital/eslint-config/typescript".

@typedigital/eslint-config/styled-components

Additional rules for Styled Components development. To add them to your project adjust your .eslintrc like this:

{
    "extends": [
        "@typedigital/eslint-config",
        "@typedigital/eslint-config/styled-components",
    ],
    "root": true
}

Recommendations

Sometimes, there is a legitimate use-case to disable a specific rule. You can disable a rule for the current line like this

// eslint-disable-line rule-code

where rule-code is the code that is displayed along the error message.

You can also override specific rules in your .eslintrc, this will then override it for the whole project. If you don't agree with a rule, please don't just disable the rule - create an issue and let us discuss the pros and cons.

License

Unlicense