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

@roq/eslint-plugin

v1.1.3

Published

roq-linter aims to make sure that our code abides by the coding conventions defined in our rulebook. The aim is to achieve a higher degree of review automation.

Downloads

122

Readme

roq-linter

​ The purpose of roq-linter is to ensure that code adheres to the coding convention rulebook; the goal is to perform automated checks. Clearly, we are not attempting to validate logical workflows that require human interaction or technical expertise. However, anything that can be caught prior to a PR review should be caught to minimize reviewer effort and control swaps between the PR owner/opener/raiser and the reviewer. ​

How to configure this plugin to work with your roq project?

We expose three distinct configurations, one for each resource type (backend/frontend and a general one): ​

  • Common Configuration (Contains general conventions that are useful for the entire project)
  • Backend Configuration (Contains backend-related conventions that are useful for the directory in which the backend code is located).
  • Frontend Configuration (Contains frontend-related conventions that are useful for the directory in which the frontend code is located). ​

Step 1: Add the roq-linter plugin as a dependency to your project: ​

npm install -D @roq/eslint-plugin ​

Step 2: Add required configurations to eslint configuration file(.eslintrc): ​

  1. Configure the plugin:

plugins: ['@roq'],

  1. Extend the desired config (as per project needs):

extends: ['plugin:@roq/backendConfig','plugin:@roq/commonConfig'], ​

  1. Add the settings for this plugin: ​ The settings anticipates the following information (the path separator to use when defining these values should be a nix-styled '/') in the settings object under the 'roq-linter' key:
  • backendBasePath (default:'backend/src') => 'The base relative path (from project's root) of backend related code' ​
  • frontendBasePath (default:'frontend/src') => 'The base relative path (from project's root) of frontend related code' ​
  • backendTestsBasePath (default:'backend/tests') => 'The relative path (from project's root) of backend related tests' ​ A sample settings object looks like =>
"settings": {
    "roq-linter":{
      "backendBasePath": "backend/src",
      "frontendBasePath": "frontend/src",
      "backendTestsBasePath": "backend/tests"
    }
  }

Step 3: Some rules of this plugin need to be manually configured in your eslint configuration file(.eslintrc): ​

no-invalid-dirname

The configuration defines the naming criteria for your directory names, including the characters to use, the case to use, and whether or not to allow numbers. By default, lowercase alphanumeric strings with dots and hyphens are used. ​

no-use-deprecated-modules

The configuration specifies which node modules should not be used by your project. This rule is useful in situations where modules are popular among developers but have been deprecated. ​

no-use-global-module

The configuration declares which nestjs modules are global and thus also aims to prevent other modules to import them. ​

To know all the roq-conventions, have a look at our entire documentation here.