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

@gpa-lab/eslint-config

v1.6.1

Published

An ESLint configuration conforming to the GPA/LAB style guide

Downloads

6

Readme

GPA/LAB ESLint Config

This package provides an opinionated but extensible ESLint configuration that enforces the JavaScript coding preferences defined by the GPA/LAB style guide.

Installation

Run the following command from the root of your project to install the config.

npm install @gpa-lab/eslint-config --save-dev

There are a number of peer dependencies listened for this project. Namely:

Please note that several of these peer dependencies pertain only to the optional React and Cypress configurations available as sub-packages (see more details below).

To install the minimum dependencies required for the base configuration run the command:

npm i -D @gpa-lab/eslint-config eslint eslint-plugin-import eslint-plugin-jest eslint-plugin-node

If you intend to also use the React sub-package, run the following install the React-specific plugins as well:

npm i -D @gpa-lab/eslint-config eslint eslint-plugin-import eslint-plugin-jest eslint-plugin-jsx-a11y eslint-plugin-node eslint-plugin-react eslint-plugin-react-hooks

Usage

Basic

Once installed, add an .eslintrc file to your project root and extend the GPA/LAB eslint-config as such:

{
  "extends": ["@gpa-lab/eslint-config"]
}

This will apply the base ruleset to your project.

Note: More details on configuring ESLint for you project can be found in ESLint's official documentation.

Sub-packages

React

This optional package includes an additional set of rules pertaining to React applications. To enable the React sub-package, add @gpa-lab/eslint-config/react to the extends array as such:

{
  "extends": ["@gpa-lab/eslint-config", "@gpa-lab/eslint-config/react"]
}

The React sub-package depends on some ESLint plugins not needed by the base configuration. If you did not install them during the initial setup, you will need to run the following command to install these required peer dependencies.

  npm i -D eslint-plugin-jsx-a11y eslint-plugin-react eslint-plugin-react-hooks

CommonJS Scripts

The default configuration supports Node.js out of the box, however, it assumes that ES6 modules are supported. This configuration can be used when ES6 import syntax is not desired.

{
  "extends": ["@gpa-lab/eslint-config/script"]
}

Cypress

This optional package extends the base ESLint rules from this package, adding a ruleset for the Cypress end-to-end testing tool and removing the Jest ruleset (which can conflict with Cypress rules). As such, it should be used in lieu of, rather than in addition to the base configuration. We recommend putting a distinct .eslintrc in the cypress directory and setting it to root so that it does not conflict with your project-wide .eslintrc. The result should look something like:

{
  "extends": ["@gpa-lab/eslint-config/cypress"],
  "root": true
}

The Cypress sub-package depends on the Cypress ESLint plugin which can be installed by running the following command:

  npm i -D eslint-plugin-cypress