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

v0.0.32

Published

This repository contains ESLint configurations for various JavaScript environments under the `yscope` namespace. Our configurations are designed to enforce a consistent coding style and catch common bugs, making your codebase more maintainable and error-f

Downloads

3,888

Readme

eslint-config-yscope

This repository contains ESLint configurations for various JavaScript environments under the yscope namespace. Our configurations are designed to enforce a consistent coding style and catch common bugs, making your codebase more maintainable and error-free.

Installation

To get started with eslint-config-yscope, you can install the package:

npm install --save-dev eslint-config-yscope
# or
yarn add --dev eslint-config-yscope

For Older Node.js Versions

If you are using npm version >= 3 or < 7, you need to install the peerDependencies specified in https://github.com/y-scope/eslint-config-yscope/blob/e0dc97bd6f738b06ee692bd52f0fceb6996c1625/package.json#L14-L26

Alternatively, you can upgrade your npm to the latest version compatible with your Node.js version.

  • Node.js verions below v16: npm i -g npm@9
  • Node.js v16 or above: npm i -g npm@latest

Usage

After installation, you can use one of the configurations by adding it to the extends section in your .eslintrc (or .eslintrc.js, .eslintrc.json, etc.) file, or in an attribute named eslintConfig in your package.json file.

ESLint config example

{
  "extends": ["yscope/common"]
}

Available Configurations

The available configs are:

  • yscope/common: A general ESLint configuration suitable for a wide range of JavaScript projects.
  • yscope/react: Tailored ESLint configuration for React applications.
  • yscope/meteor: A specialized ESLint configuration for Meteor projects.
  • yscope/typescipt: Designed specifically for TypeScript applications.
  • yscope/jest: A Jest-specific ESLint configuration intended to override other configurations for Jest test files.

Jest-Specific Configuration

The Jest configuration is not standalone and should be used alongside other configurations. It is intended to override rules for Jest test files, so it should appear last in your overrides array.

Example Usage

If your project uses Jest, you can add an override for your test files as follows:

{
  "overrides": [
    // ...
    {
      "files": ["test/**/*"],
      "extends": ["yscope/jest"]
    }
  ]
}

For TypeScript Configuration

TypeScript-related dependencies are not automatically installed because not every configuration requires them. Before you can use this configuration, you need to install the dependencies manually.

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

Then in your ESLint configuration:

{
  "extends": [
    "yscope/common",
    "yscope/typescript"
  ]
}

Customization

Each configuration can be further customized and extended as per your project's needs. You can override specific rules by adding them to your ESLint configuration file.

Contributing

We welcome contributions to the eslint-config-yscope! If you have suggestions or improvements, feel free to open an issue or a pull request.

License

This project is licensed under Apache License 2.0. Please see the LICENSE file for more details.