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

@thoughtbot/eslint-config

v1.0.2

Published

Batteries-included sharable [ESLint][eslint] configurations for React, React Native, TypeScript, and Node.js that enforce [thoughtbot’s JavaScript guides][thoughtbot-js-guides]. These configurations are largely based off of and compatible with [AirBnb’s E

Downloads

4,613

Readme

thoughtbot ESLint Config

Batteries-included sharable ESLint configurations for React, React Native, TypeScript, and Node.js that enforce thoughtbot’s JavaScript guides. These configurations are largely based off of and compatible with AirBnb’s ESLint config.

Installation

If using npm, run:

npm install @thoughtbot/eslint-config --save-dev

If using Yarn, run:

yarn add @thoughtbot/eslint-config --dev

Usage

This package includes configurations for most common tech stacks. Update your ESLint configuration to extend the appropriate setup:

  • @thoughtbot/eslint-config - React web, Jest, Testing Library, Prettier
  • @thoughtbot/eslint-config/react - React web (same as above)
  • @thoughtbot/eslint-config/base - base web config, no React or Prettier
  • @thoughtbot/eslint-config/native - React Native, Jest, RN Testing Library, Prettier
  • @thoughtbot/eslint-config/prettier - Prettier, automatically used when using React or Native config
  • @thoughtbot/eslint-config/typescript - TypeScript config, add this if using Typescript

The configurations that include Prettier turn off all formatting rules that are also handled by Prettier to reduce conflicts between the two tools. It is recommended to add Prettier to your project and ensure that your CI environment also runs Prettier to verify code formatting.

Example usage:

Following are some example usages of this config (eg. in .eslintrc.js).

React with TypeScript:

{
  "extends": [
    "@thoughtbot/eslint-config",
    "@thoughtbot/eslint-config/typescript"
  ]
}

React Native with TypeScript:

{
  "extends": [
    "@thoughtbot/eslint-config/native",
    "@thoughtbot/eslint-config/typescript"
  ]
}

Base web without React or TypeScript

{
  "extends": ["@thoughtbot/eslint-config/base"]
}

You can override rules from the shared configuration, by setting your own values within the rules property:

{
  "extends": "@thoughtbot/eslint-config",
  "rules": {
    "react/jsx-newline": "warn"
  }
}

You might also need to add the following to your ESLint config if you get an error about Jest not being able to detect the version:

{
  "settings": {
    "jest": { "version": "detect" }
  }
}

Consult the ESLint documentation for more information about configuring ESLint, and take a look at the config files in this repo for more information about the rules and plugins they include.

License

thoughtbot ESLint Config is copyright (c) 2023 thoughtbot, inc. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About

thoughtbot

thoughtbot ESLint Config is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software! See our other projects or hire us to help build your product.