Gathering detailed insights and metrics for @zooshdigital/bitbucket-eslint-report
Gathering detailed insights and metrics for @zooshdigital/bitbucket-eslint-report
Gathering detailed insights and metrics for @zooshdigital/bitbucket-eslint-report
Gathering detailed insights and metrics for @zooshdigital/bitbucket-eslint-report
npm install @zooshdigital/bitbucket-eslint-report
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (59.48%)
TypeScript (40.52%)
Total Downloads
3,159
Last Day
11
Last Week
121
Last Month
499
Last Year
3,159
GPL-3.0 License
1 Stars
5 Commits
2 Watchers
3 Branches
3 Contributors
Updated on Dec 11, 2024
Minified
Minified + Gzipped
Latest Version
1.2.9
Package Id
@zooshdigital/bitbucket-eslint-report@1.2.9
Unpacked Size
45.43 kB
Size
15.62 kB
File Count
5
NPM Version
10.9.0
Node Version
22.11.0
Published on
Dec 09, 2024
Cumulative downloads
Total Downloads
Last Day
0%
11
Compared to previous day
Last Week
22.2%
121
Compared to previous week
Last Month
-14.4%
499
Compared to previous month
Last Year
0%
3,159
Compared to previous year
5
Zoosh bitbucket-eslint-report
is designed to facilitate the upload of eslint reports (including annotations) to Bitbucket Pull Requests. This package provides functions to automate the process of uploading reports generated during build processes.
To install Zoosh bitbucket-eslint-report, simply include it as a dependency in your project's package.json
file:
1npm install @zooshdigital/bitbucket-eslint-report
or
1yarn add @zooshdigital/bitbucket-eslint-report
This tool enables you to upload coverage reports to Bitbucket pipelines.
Eslint supports a JSON output by default. It can be enabled by a --format json
CLI option.
We recommend creating a separate script in package.json
(if you already had a lint script), for example:
1 ... 2 "lint:json": "eslint --format json --quiet --max-warnings=0 --ext .js,.ts ./", 3 ...
In this case, --quiet
removes any warnings, so that only errors are captured (to reduce noise in bitbucket). The output of this could be piped into a .json
file in your pipeline.
Simply run the tool using npx. Below is an example of how to execute the command-line utility @zooshdigital/bitbucket-eslint-report
directly from your terminal or a pipeline:
1npx @zooshdigital/bitbucket-eslint-report -n reportName -p ./path-to-the-eslint-report.json
or
1yarn bitbucket-eslint-report -n reportName -p ./path-to-the-eslint-report.json
If you prefer using yarn, ensure that the @zooshdigital/bitbucket-eslint-report is listed in the dependencies of the current workspace if you're using multiple workspaces.
It takes the following arguments:
-n [name]
or --name [name]
(required): The name of the report in Bitbucket.-p [path]
or --path [path]
(required): The path to the eslint report file.-a
or --add-build
(optional): Create a success/failed "build" as well besides the report.-s
or --strict
(optional): Strict mode, consider report/build failed in case of eslint warnings as well (by default, only fails in case of eslint errors)Ensure that the specified path leads to an eslint json report.
While some requests could be automatically authenticated running in a pipeline, Bitbucket doesn't allow that for all endpoints. Thus, for simplicity, the library expects an access token for all API calls. This can be a repository, project or workspace access token in the BITBUCKET_BUILD_TOKEN environment variable. Create a token and make it available as a repository or deployment variable to the pipeline.
Since information is attached to a commit (even in case of a pull request), the library needs the BITBUCKET_REPO_FULL_NAME and BITBUCKET_COMMIT environment variables to do that. These two are standard Bitbucket pipeline variables, so there is no need to set them explicitly if running the script in a pipeline.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
No vulnerabilities found.
No security vulnerabilities found.