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

eslint-config-vinta

v2.0.0

Published

Vinta's ESLint and Prettier Shareable Configs

Downloads

98

Readme

eslint-config-vinta

Vinta's ESLint and Prettier shareable configs.

This repository is under development and both ESLint and Prettier rules applied here are subject to change.

Install

npm install eslint-config-vinta --save-dev

Peer dependencies

Depending on the configurations you choose to use, you may not need to install every dependency listed here.

npm install \
  @babel/eslint-parser@~7.16.5 \
  @babel/eslint-plugin@~7.16.5 \
  eslint@~8.8.0 \
  eslint-config-prettier@~8.3.0 \
  eslint-plugin-import@~2.20.1 \
  eslint-plugin-jest@~26.0.0 \
  eslint-plugin-jsx-a11y@~6.5.1 \
  eslint-plugin-prettier@~4.0.0 \
  eslint-plugin-promise@~6.0.0 \
  eslint-plugin-react@~7.28.0 \
  eslint-plugin-react-hooks@~4.3.0 \
  eslint-plugin-sonarjs@~0.11.0 \
  eslint-plugin-unicorn@~40.1.0 \
  prettier@~2.5.1 \
  --save-dev

Usage

This repository contains the configurations for both ESLint and Prettier, and each one of them handles shareable configurations differently.

ESLint

For ESLint, your .eslintrc file should look (at least) like this:

Keep in mind that ESLint ignores the eslint-config- prefix, so all you need to write is vinta.

module.exports = {
  extends: ['vinta'],
};

If you're already using ESLint on your project, just add 'vinta' to the extends property.

We also have a recommended configuration. It extends all plugins from the plugins folder and all the rules defined in the rules folder.

module.exports = {
  extends: ['vinta/recommended'],
};

Selecting Plugins

If you're not using the recommended configuration (which includes all plugins), you can easily select your desired plugins:

module.exports = {
  extends: ['vinta', 'vinta/plugins/react', 'vinta/plugins/jest'],
};

The base vinta configuration includes all ESLint rules, but no plugins.

Possible plugin options:

You can learn more about ESLint's shareable configs here.

Prettier

For Prettier, add the following line to your package.json file:

"prettier": "eslint-config-vinta/prettier",

And be sure to have the following packages installed:

npm install \
  eslint-config-prettier@~8.3.0 \
  eslint-plugin-prettier@~4.0.0 \
  prettier@~2.5.1 \
  --save-dev

If you already have a working configuration for your project, you can either ignore this step or extend our config in your .prettierrc file:

{
  ...require('eslint-config-vinta/prettier'),
  semi: false,
  bracketSpacing: false,
};

You can learn more about Prettier's shareable configs here.

Versioning

See the VERSIONING.md file.