@envdoctor/envdoctor-config-essentials
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

@envdoctor/envdoctor-config-essentials

This configuration holds an essential check of version

Utils

  • Helper object defining possible comparators
const { COMPARATORS } = require("@envdoctor/envdoctor-config-essentials");

Possible comparators:

  • COMPARATORS.EQ
  • COMPARATORS.GT
  • COMPARATORS.GTE
  • COMPARATORS.LT
  • COMPARATORS.LTE
  • COMPARATORS.SATISFIES

Rules

node-version

Configuration

interface INodeVersion {
  file?: string;
  comparator?: string;
  version?: string;
}

Usage

{
  "node-version": [2, { comparator: COMPARATORS.GT, version: "9" ]
}

⚠️ There is also experimental API which takes the name of the file: { file: ".nvmrc"} for instance. This will look for .nvmrc file for the version and then ensure that user uses the same major version.

yarn-version

Configuration

interface INodeVersion {
  comparator?: string;
  version?: string;
}

Usage

{
  "yarn-version": [2, { comparator: COMPARATORS.GT, version: "9" }]
}

Install

yarn add @envdoctor/core @envdoctor/envdoctor-config-essentials -D

Usage

In your .envdoctorrc file

const { COMPARATORS } = require("@envdoctor/envdoctor-config-essentials");

module.exports = {
  extends: ["@envdoctor/essentials"],
  rules: {
    "node-version": [2, { comparator: COMPARATORS.GT, version: "9" }],
    "yarn-version": [2, { comparator: COMPARATORS.EQ, version: "1.12.3" }]
  }
};

Readme

Keywords

none

Package Sidebar

Install

npm i @envdoctor/envdoctor-config-essentials

Weekly Downloads

9

Version

2.0.1

License

MIT

Unpacked Size

10.7 kB

Total Files

11

Last publish

Collaborators

  • jukben