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 🙏

© 2025 – Pkg Stats / Ryan Hefner

eslint-config-oats

v1.1.0

Published

An eslint config that nourishes and gets you ready for the day.

Downloads

15

Readme

A note before using

Due to some existing dependencies on ESLint 6 this config doesn't get to use the shiniest new rules or plugins. There are a handful that we've needed to downgrade. Although the rules are still extensive and provide a lot of feedback there may be some that we're not able to support, yet. The following are the plugins that this config uses. Due to this bug they'll all need to be downloaded as devDependencies, too. @typescript-eslint/eslint-plugin is only needed for Typescript projects.

Installation

To install all this config and all its associated plugins enter the following command into your terminal:

npm i -D eslint-config-oats eslint@^6.0.0 typescript@^4.0.0 @typescript-eslint/eslint-plugin@^4.0.0\
 @typescript-eslint/parser@^4.0.0 eslint-plugin-unicorn@^19.0.0 eslint-plugin-testing-library@^3.0.0\
 eslint-plugin-sonarjs eslint-plugin-react-hooks eslint-plugin-import eslint-plugin-react eslint-plugin-jest\
 eslint-plugin-jest-dom eslint-plugin-jsx-a11y eslint-plugin-cypress

Usage

The base config is generic and can be used to lint either Browser or NodeJS files. When using this in a React app, ESM modules, or Cypress. The config should be extended.

//.eslintrc.cjs
module.exports{
  extends: [
    'oats',
    'oats/import',
    'oats/react',
    'oats/jest',
    'oats/cypress'
  ]
}

Typescript

This config supports TypeScript out of the box but, when using the oats/cypress config you may run into issues, if you're using Typescript with your Cypress files, too. In this scenario it's best to create a separate tsconfig.json just for linting and include all of the relevant types in it. Having a separate tsconfig.json for linting is a good practice whenever you have files that may not end up in your build(s), but you still want type safety around. Here's an example:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "strict": true,
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "jsx": "react",
    "types": ["cypress"]
  },
  "include": ["**/*.ts", "**/*.tsx"]
}

Cypress

Using two different testing frameworks with two different assertions, such as Jest and Cypress, can sometimes lead to trouble. The oats/jest config, by default, is looking for every file that has a suffix of .test or .spec, or that is in a __tests__ directory. If this naming convention is followed with Cypress tests, there can end up being conflicts between the Cypress-specific rules and the Jest-specific rules. An easy solution is to just nix the .spec or .test from the Cypress file name (cypress/integration/homepage.ts), otherwise the conflicting Jest rules can be overridden in the lint config.

  "eslintConfig": {
    "extends": [
      "oats",
      "oats/react",
      "oats/import",
      "oats/jest",
      "oats/cypress"
+    ],
+    "overrides": [
+      {
+        "files": ["**/cypress/**/*.+(ts|js)?(x)"],
+        "rules": {
+          "jest/some-rule": "off"
+        }
+      }
+    ]
+  }

Another option is to enable/disable rules for specific files.

  "eslintConfig": {
    "extends": [
      "oats",
      "oats/react",
      "oats/import"
+    ],
+    "overrides": [
+      {
+        "files": ["**/!(cypress)/**/*.{spec,test}.+(ts|js)?(x)"],
+        "extends": ["oats/jest"]
+      },
+      {
+         "files": ["/**/cypress/**/*.+(ts|js)?(x)"],
+         "extends": ["oats/cypress"]
+       }
+    ]
+  }