stylelint-formatter-bitbucket
v1.0.1
Published
Create a report and annotations for BitBucket Cloud Pull Requests from stylelint results.
Downloads
16
Readme
stylelint-formatter-bitbucket
A stylelint formatter that uploads results as a report to Bitbucket.
Inspired by https://github.com/Sleavely/eslint-formatter-bitbucket
Usage
[npm|pnpm] install -D stylelint-formatter-bitbucketAdd a linting step bitbucket-piplines.yml:
pipelines:
pull-requests:
'**':
- step:
name: stylelint
script:
- npx stylelint --custom-formatter node_modules/stylelint-formatter-bitbucket **/*.cssOutside of Bitbucket Pipelines
If you are running the formatter in a context outside of Bitbucket Pipelines, for example from a local environment or in a custom CI provider, you'll need to set some environment variables manually:
BITBUCKET_API_AUTH- the value for the "Authorization" header when communicating with the Bitbucket API, e.g.Bearer my_access_tokenBITBUCKET_COMMIT- commit SHA for the current run, e.g.a624d1419b98BITBUCKET_WORKSPACE- e.g.mghdotdevBITBUCKET_REPO_SLUG- URL-friendly repo name, e.g.stylelint-formatter-bitbucket
License
See LICENSE
