Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.46 KB

CONTRIBUTING.md

File metadata and controls

56 lines (38 loc) · 1.46 KB

Contributing

Thanks for contributing!

Installation

git clone https://github.com/prettier/stylelint-prettier.git
cd stylelint-prettier
yarn install

Running the tests

yarn run test

This is a Stylelint plugin. Documentation for the APIs that it uses can be found on Stylelint's Writing Plugins page.

Linting is ran as part of yarn run test. The build will fail if there are any linting errors. You can run yarn run lint --fix to fix some linting errors (including formatting to match prettier's expectations). To run the tests without linting run node --test test/*.test.js.

End to end tests

e2e test fixtures are in test/fixtures.

Running the e2e tests while trying to debug a problem can be annoying. To check stylelint's output of a single fixture, run stylelint from within the fixtures directory:

cd test/fixtures
../../node_modules/.bin/stylelint 'check*'

Publishing

  • Ensure you are on the main branch locally.

  • Update CHANGELOG.md and commit.

  • Run the following:

    yarn publish
    git push --follow-tags

    Running yarn publish shall:

    • Bump the version in package.json (asking you for the new version number)
    • Create a new commit containing that version bump in package.json
    • Create a tag for that commit
    • Publish to the npm repository

    Running git push --follow-tags shall:

    • Push the commit and tag to GitHub