From 2a5350190faedfc1eb4bf3cdbcb6cb33e1d7fe19 Mon Sep 17 00:00:00 2001 From: viqueen Date: Wed, 24 May 2023 14:31:26 +1000 Subject: [PATCH] update docs --- CONTRIBUTING.md | 27 +++++++++++++++++++++++++++ README.md | 20 ++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e1a1bfe..c648f6c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,33 @@ brew install nvm brew install yarn ``` +### development + +- build it, this ensures the text templates are copied to the dist folder + +```bash +yarn build +``` + +- link it locally + +```bash +yarn link +``` + +- build it in watch mode + +```bash +yarn build --watch +``` + +- test your local changes on your other packages + +```bash +cd my-other-package +yarn link eslint-plugin-license-notice +``` + ### house-keeping - build it diff --git a/README.md b/README.md index 8c0ca5c..eac304a 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,23 @@ yarn add eslint-plugin-license-notice -D -W ``` ### use it + +- add the eslint plugin to your `.eslintrc.js` + +```javascript +module.exports = { + ..., + plugins: [ + 'license-notice', + ], + rules: { + 'license-notice/include': [ + 'error', { + license: 'Apache-2.0', + copyRightYear: '', + copyRightName: '' + } + ] + } +} +```