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

@ueno/eslint-plugin-internal

v1.0.5

Published

Ueno's custom eslint rules

Downloads

32

Readme

@ueno/eslint-plugin-internal

Ueno's custom eslint rules

npm

Why?

We needed some customs rules to add to our lint config, to align with our code style. This package is used in the @ueno/eslint-config to add two custom rules to our config.

Rules

  • @ueno/internal/decorator-line-break: Force a line break after the decorator statement
  • @ueno/internal/padded-blocks: Force a blank line after the class declaration

@ueno/internal/decorator-line-break

This rule has one option, which can be a string option.

String option:

  • "always" (default) requires a line break after a decorator statement
  • "never" disallows line break after a decorator statement

Example:

'@ueno/internal/decorator-line-break': 2 Will requires to add a line break after a decorator declaration

Wrong 👎

@observable myValue = true;

Good 👍

@observable
myValue = true;

@ueno/internal/padded-blocks

This rule has two options, which can be a string option or an object option.

String option:

  • "always" (default) requires empty lines at the beginning and ending of blocks, classes and switches statements
  • "never" disallows empty lines at the beginning and ending of blocks, classes and switches statements
  • "top" requires empty lines only at the beginning of blocks, classes and switches statements
  • "bottom" disallows empty lines only at the ending of blocks, classes and switches statements

Object option:

  • "blocks" require or disallow padding within blocks statements
  • "classes" require or disallow padding within classes statements
  • "switches" require or disallow padding within switch statements

Examples:

'@ueno/internal/padded-blocks': 2 Will requires empty lines only at the beginning and ending of blocks, classes and switches statements

Wrong 👎

class A {
  constructor() {
  }
}

Good 👍

class A {

  constructor() {
  }

}

'@ueno/internal/padded-blocks': ['error', { classes: 'top' }] Will requires empty lines only at the beginning of classes statements

Wrong 👎

class A {
  constructor() {
  }
}

Good 👍

class A {

  constructor() {
  }
}

License

MIT © ueno.