stylelint-formatter-bitbucket
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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-bitbucket

Add a linting step bitbucket-piplines.yml:

pipelines:
  pull-requests:
    '**':
      - step:
          name: stylelint
          script:
            - npx stylelint --custom-formatter node_modules/stylelint-formatter-bitbucket **/*.css

Outside 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_token
  • BITBUCKET_COMMIT - commit SHA for the current run, e.g. a624d1419b98
  • BITBUCKET_WORKSPACE - e.g. mghdotdev
  • BITBUCKET_REPO_SLUG - URL-friendly repo name, e.g. stylelint-formatter-bitbucket

License

See LICENSE

Readme

Keywords

none

Package Sidebar

Install

npm i stylelint-formatter-bitbucket

Weekly Downloads

4

Version

1.0.1

License

MIT

Unpacked Size

28 kB

Total Files

23

Last publish

Collaborators

  • mghweb