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

setup-airbnb-config

v1.1.0

Published

Bootstraps your VSCode project with Airbnb's eslint configuration together with Prettier through a CLI.

Downloads

10

Readme

setup-airbnb-config

Bootstraps your VSCode project with Airbnb's eslint configuration together with Prettier through a CLI.

This CLI will will try to automatically detect wether you're using yarn or npm in your project before installing the dependencies and Airbnb peer dependencies. It will also create a .vscode/settings.json file and enable formatOnSave which is useful for overriding your global settings for this local project. If this file already exist in your project, the setting will be added to it.

Installation

  1. Install Eslint and Prettier extensions in VSCode.
  2. Now simply run the CLI followed by the project path to bootstrap:
  npx setup-airbnb-config .
  1. Select the desired project type (Javascript or React).

Usage

npx setup-airbnb-config <path> [--options]

Options

| Flag | Description | | :----------------- | :---------------------------------------------------- | | -j, --javascript | Generates a JS configuration. | | -r, --react | Generates a React configuration. | | --npm | Enforce npm to be used when installing dependencies. | | --yarn | Enforce yarn to be used when installing dependencies. |

Examples

npx setup-airbnb-config ./myProject -r --yarn

Creates a react configuration and enforce yarn to be used when installing dependencies.

npx setup-airbnb-config . --javascript --npm

Creates a vanilla JS configuration and enforce npm to be used when installing dependencies.

npx setup-airbnb-config ~/myProject

Runs the CLI and asks you the required questions such as project type and preferred package manager if automatic detection fails.

FAQ

I'm seeing an error "Missing package.json"

Your project needs at least a package.json at the same level as npx setup-airbnb-config is run in order to install the required dependencies.

What package manager is used for installing required dependencies?

The CLI will try to automatically detect which package manager you're using. If it cannot be determined, the CLI will ask you which package manager you want to use.

Contributing

Contributions are always welcome!

File an issue or create a pull request if you find something that can be enhanced.

Related

  • ESLint Rules - https://eslint.org/docs/rules/
  • Prettier Options - https://prettier.io/docs/en/options.html
  • Airbnb Style Guide - https://github.com/airbnb/javascript

License

MIT License