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

@rindo/eslint-plugin

v0.4.0

Published

ESLint rules specific to Rindo JS projects.

Downloads

4

Readme

@rindo/eslint-plugin

ESLint rules specific to Rindo JS projects.

Installation

If you're using npm v7+, you only need to install this package. Its peer dependencies will be automatically installed.

npm i --save-dev @rindo/eslint-plugin

If you're using npm v6 or lower, you will need to install this package and its peer dependencies in your rindo project:

npm i --save-dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-react @rindo/eslint-plugin typescript

Usage

.eslintrc.json configuration file:

{
  "parserOptions": {
    "project": "./tsconfig.json"
  },
  "extends": [
    "plugin:@rindo/recommended"
  ]
}

Add a new lint script to the package.json:

{
  "scripts": {
    "lint": "eslint src/**/*{.ts,.tsx}"
  }
}

By default, ESLint will ignore your node_modules/ directory. Consider adding a .eslintignore file at the root of your project with any output target directories to avoid false positive errors from ESLint.

# place any directories created by the Rindo compilation process here
dist
loader
www

Lint all your project:

npm run lint

Supported Rules

This rule catches Rindo public methods that are not async.

This rule catches Rindo Component banned tag name prefix.

This rule catches Rindo Component class name not matching configurable pattern.

This rule catches Rindo decorators in bad locations.

This rule catches Rindo decorators style usage.

This rule catches Rindo Element decorator have the correct type.

This rule catches Rindo method hostData.

This rule catches Rindo Methods marked as private or protected.

This rule catches Rindo Watchs with non existing Props or States.

This rule catches own class methods marked as public.

This rule catches own class properties marked as public.

This rule catches Rindo Listen with vdom events.

This rule catches Rindo Props marked as private or protected.

This rule catches Rindo Props marked as non readonly, excluding mutable ones.

This rule catches Rindo Render returning array instead of Host tag.

This rule catches Rindo Props, Methods and Events to define jsdoc.

This rule catches Rindo Component required tag name prefix.

This rule catches Rindo Prop names that share names of Global HTML Attributes.

This rule catches modules that expose more than just the Rindo Component itself.

This rule catches Rindo Prop marked as mutable but not changing value in code.

Recommended rules

{
  "@rindo/async-methods": "error",
  "@rindo/ban-prefix": ["error", ["rindo"]],
  "@rindo/decorators-context": "error",
  "@rindo/decorators-style": [
    "error", {
      "prop": "inline",
      "state": "inline",
      "element": "inline",
      "event": "inline",
      "method": "multiline",
      "watch": "multiline",
      "listen": "multiline"
    }],
  "@rindo/element-type": "error",
  "@rindo/host-data-deprecated": "error",
  "@rindo/methods-must-be-public": "error",
  "@rindo/no-unused-watch": "error",
  "@rindo/own-methods-must-be-private": "error",
  "@rindo/own-props-must-be-private": "error",
  "@rindo/prefer-vdom-listener": "error",
  "@rindo/props-must-be-public": "error",
  "@rindo/props-must-be-readonly": "error",
  "@rindo/render-returns-host": "error",
  "@rindo/required-jsdoc": "error",
  "@rindo/reserved-member-names": "error",
  "@rindo/single-export": "error",
  "@rindo/strict-mutable": "error"
}

Licence