From c030afd929cbf641ff60c760dc367172d8e47fab Mon Sep 17 00:00:00 2001 From: PaulBredenberg Date: Thu, 10 Aug 2023 09:57:43 -0400 Subject: [PATCH] docs: usage notes for license compliance check tool --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 1f30d9e..2f52813 100644 --- a/README.md +++ b/README.md @@ -158,6 +158,42 @@ possible that some processes in some projects could fail when the wrong version is enabled in the developer's environment. This helps eliminate one factor from the equation when troubleshooting. +### License Compliance Checker Tool + +This project contains a tool to verify that the licenses used by libraries in our +projects that contain NPM dependencies are among our list of accepted licenses. To +view the list of accepted licenses, see the `ALLOWED_LICENSES` list in: +[check-license-compliance.js](scripts/check-license-compliance.js) + +To use this tool, `@silvermine/standardization` must be installed in your project: + +`npm i -DE @silvermine/standardization` + +You should then be able to run the tool in a NPM script: + +```json +{ + "scripts": { + "check-license-compliance": "check-license-compliance" + } +} +``` + +The tool also allows you to configure exceptions for license types using a configuration +file. To configure these exceptions, add a file called `.license-checker.cjs` to the root +of your project with the following contents: + +```cjs +'use strict'; + +module.exports = { + + exclusions: [ 'My-Custom-License' ] + +}; + +``` + ### Executing ESLint When ESLint is needed for a project, add an `eslint` task to package.json, and execute it