🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@rambler-digital-solutions/licenselint

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@rambler-digital-solutions/licenselint

A linter for NPM package licenses to avoid dependencies that not compatible with license of your software

unpublished
latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

License Lint

A linter for NPM package licenses to avoid dependencies that not compatible with license of your software. It can check licenses automatically on CI or on NPM postinstall.

Install

npm install -D @rambler-digital-solutions/licenselint

or

yarn add -D @rambler-digital-solutions/licenselint

Usage

licenselint --help

  Lint NPM package licenses

  Usage
    licenselint [dirname]

  Options
    --production    Only lint production dependencies
    --development   Only lint development dependencies
    --summary       Output a summary of the license usage
    --deny          Fail on an occurrence of the licenses of the deny list
    --allow         Fail on an occurrence of the licenses not in the allow list
    --exclude       Exclude modules which licenses are in the list
    --extends       Use custom configuration file

  Examples
    licenselint
    licenselint packages/foo
    licenselint --production
    licenselint --deny LGPL
    licenselint --allow MIT --allow ISC
    licenselint --extends shared/licenserc.json

Then use it for automatically check in CI

...
lint deps:
  stage: test
  script:
    - npm install
    - licenselint
...

Or on NPM postinstall

{
  "name": "app",
  "description": "...",
  "version": "0.1.2",
  "scripts": {
    "...": "...",
    "postinstall": "licenselint"
  },
  "...": "..."
}

Configuration

Create .licenserc.json configuration file:

{
  "production": true,
  "deny": [
    "GPL",
    "LGPL"
  ]
}

Configuration file supports all CLI flags.

Also you can extends your local setup with shared configuration:

{
  "extends": "@shared/licenserc",
  "summary": true
}

License

MIT

FAQs

Package last updated on 01 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts