UNPKG

@apolitical/mrlint

Version:

Node.js library to mantain GitLab MRs linted within a set of rules

34 lines (21 loc) 792 B
# Apolitical MRLint Node.js module to expose Apolitical's GitLab MR linter ## Requirements Requires the following to run: - [node.js][node] 16.13.0+ - [yarn][yarn] [node]: https://nodejs.org/en/download/ [yarn]: https://classic.yarnpkg.com/en/docs/install ## Installation Install with `yarn`: ```sh yarn add apolitical-mrlint ``` ## Usage The `@apolitical/mrlint` module is meant to be used from pipelines (CI/CD), doesn't matter if the repo is a UI or API. After installing the package, just run: ```sh yarn run danger ci -d $CI_PROJECT_DIR/node_modules/@apolitical/mrlint/index.js ``` NB: `$CI_PROJECT_DIR` is needed in order to fetch the exported `index.js` file correctly, as we're running in a VM from GitLab And that is it, the MR suggestions should be appearing in GitLab!