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-stratpoint

v3.0.0

Published

ESLint configs that support different environments and work with Prettier out of the box.

Downloads

963

Readme

eslint-config-stratpoint

ESLint configs that support different environments and work with Prettier out of the box.

Supported environments

  • Node.js
  • React
  • TypeScript
  • Jest
  • Mocha
  • Next.js

Using the base config

Note: The other configs below already extend this base config, so there is no reason to extend it directly unless creating a custom config for a new environment.

Installation

npm install --save-dev eslint eslint-config-stratpoint

Configuration

Extend the config by adding it to your .eslintrc.* file or in the eslintConfig property of your package.json. For example, for a .eslintrc.js file:

module.exports = {
  extends: 'stratpoint',
};

Using the Node.js-specific config

Installation

npm install --save-dev eslint eslint-config-stratpoint

Configuration

Extend the config by adding it to your .eslintrc.* file or in the eslintConfig property of your package.json. For example, for a .eslintrc.yml file:

extends: 'stratpoint/nodejs'

Using the React-specific config

Installation

npm install --save-dev eslint eslint-config-stratpoint eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y eslint-plugin-import

Configuration

Extend the config by adding it to your .eslintrc.* file or in the eslintConfig property of your package.json. For example, for a .eslintrc.json file:

{
  "extends": "stratpoint/react"
}

Using the TypeScript-specific config

Installation

npm install --save-dev eslint eslint-config-stratpoint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import eslint-import-resolver-typescript

Configuration

Extend the config by adding it to your .eslintrc.* file or in the eslintConfig property of your package.json. For example, for the eslintConfig property of a package.json:

{
  "eslintConfig": {
    "extends": "stratpoint/typescript"
  }
}

Using the Jest-specific config

Note: The Jest config should be extended in the overrides section of a config as suggested by eslint-plugin-jest's documentation:

The rules provided by this plugin assume that the files they are checking are test-related. This means it's generally not suitable to include them in your top-level configuration as that applies to all files being linted which can include source files.

Installation

npm install --save-dev eslint eslint-config-stratpoint eslint-plugin-jest eslint-plugin-jest-dom

Configuration

Extend the config by adding it to your .eslintrc.* file or in the eslintConfig property of your package.json. For example, for a .eslintrc.js file:

module.exports = {
  overrides: {
    files: ['test/**'],
    extends: 'stratpoint/jest',
  },
};

Using the Mocha-specific config

Installation

npm install --save-dev eslint eslint-config-stratpoint eslint-plugin-mocha

Configuration

Extend the config by adding it to your .eslintrc.* file or in the eslintConfig property of your package.json. For example, for a .eslintrc.yml file:

extends: 'stratpoint/mochajs'

Using the Next.js-specific config

Note: This config only includes rules specific to Next.js. To get other rules relevant to React and JSX, the React config should also be extended.

Installation

npm install --save-dev eslint eslint-config-stratpoint @next/eslint-plugin-next eslint-plugin-jsx-a11y

Configuration

Extend the config by adding it to your .eslintrc.* file or in the eslintConfig property of your package.json. For example, for a .eslintrc.json file:

{
  "extends": "stratpoint/next"
}

Using multiple configs

Note: When extending multiple configs together with the TypeScript config, it is important to put the TypeScript config last as it turns off built-in or plugin rules that may conflict with TypeScript which other configs may turn on.

To use multiple configs together, install all of the needed packages and extend them in your .eslintrc.* file or in the eslintConfig property of your package.json. For example, when using both React and TypeScript configs, install the depenencies of both:

npm install --save-dev eslint eslint-config-stratpoint eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import eslint-import-resolver-typescript

Then, extend them in your config. For example, in a .eslintrc.yml file:

extends:
  - 'stratpoint/react'
  - 'stratpoint/typescript'

Changelog

3.0.0 - September 16, 2022

  • TypeScript and React config
    • Add import rules
  • Add Next.js config with the following plugins
    • @next/eslint-plugin-next

2.0.0 - September 2, 2022

  • React config
    • Set version to detect
    • Integrate eslint-plugin-jsx-a11y and eslint-plugin-import
  • TypeScript config
    • Integrate eslint-plugin-import and eslint-import-resolver-typescript
    • Add rules
  • Add Jest config with the following plugins
    • eslint-plugin-jest
    • eslint-plugin-jest-dom
  • Add Mocha config with the following plugins
    • eslint-plugin-mocha

1.0.0 - August 17, 2022

  • Initial release