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

@virtualidentity/quality-gate

v1.0.2

Published

Coding quality and standards for VI projects

Downloads

304

Readme

virtualidentity-quality-gate

Coding quality and standards for biotope projects built on Stencil.

This package gives you default configurations for biotope projects for eslint and stylelint, which will enable you to lint .js, .jsx, .ts, .tsx, .css and .scss files by simply extending the configurations provided.

This package includes the necessary tools and plugins as dependencies for both configurations to run without a hassle, but it will require you to run both eslint and stylelint on your projects.

Installing

  • npm i -D @virtualidentity/quality-gate

Using the recommended configs

Eslint

Create an .eslintrc file and extend the default recommended config like so:

{
  "extends": "./node_modules/@virtualidentity/quality-gate/config/.eslintrc.js"
  // Add any other definition here. Example:
  // "globals": {
  //   "MY_GLOBAL_VARIABLE": true
  //   ...
  // }
}

Run eslint in a script like so:

{
  "scripts": {
    // ...
    "lint:code": "eslint \"./**/*.js\" \"./**/*.ts\""
  }
}

Since you're running eslint natively, check out their documentation on how to run or extend it [here][link-eslint-disable].

Stylelint

Create a .stylelintrc file and extend the default recommended config like so:

{
  "extends": "./node_modules/@virtualidentity/quality-gate/config/.stylelintrc.js"
  // Add any other definition here. Example:
  // "rules": {
  //   "unit-whitelist": ["em", "rem", "%", "s"]
  //   ...
  // }
}

Run stylelint in a script like so:

{
  "scripts": {
    // ...
    "lint:style": "stylelint \"./**/*.css\" \"./**/*.scss\""
  }
}

Since you're running stylelint natively, check out their documentation on how to run or extend it [here][link-stylelint-disable].

Commitlint

Create a .commitlintrc.json file and extend the default recommended config like so:

{
  "extends": ["@virtualidentity/quality-gate/config/.commitlintrc.js"]
  // Add any other definition here.
}

Recommended settings

Stencil

.eslintrc

{
  "extends": "./node_modules/@virtualidentity/quality-gate/config/.eslintrc.js",
  "rules": {
    "class-methods-use-this": 0,
    "no-script-url": 0,
    "react/prop-types": 0,
    "react/jsx-key": 0, // Otherwise eslint will force you to set keys for arrays, even if there aren't any arrays!
  },
}

.stylelintrc

{
  "extends": "./node_modules/@virtualidentity/quality-gate/config/.stylelintrc.js",
  "rules": {
    "selector-class-pattern": ".",
    "selector-no-qualifying-type": null,
    "no-descending-specificity": null
  }
}

Browser support

Create a .browserslistrc file with the following content:

last 2 years and >= 0.5%
not dead
ie 11
firefox esr
# Add any other definition here.

IDEs

To take advantage of the linters' strengths and to ensure no problems during merges, please consider installing the following plugins on your IDE.

If your IDE is not present on this list, please help us by making a PR to include proper plugins for it and ensure everyone shares this knowledge.

Hint: "on-save" linting can be a big help to save development time.

VSCode

  • dbaeumer.vscode-eslint
  • hex-ci.stylelint-plus