Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 1.5 KB

CONTRIBUTING.md

File metadata and controls

57 lines (38 loc) · 1.5 KB

Contribution Guidelines

Index


Conventions

  • Case
    • PascalCase for components, interfaces, types
    • camelCase for objects, enums, utility functions
    • UPPERCASE for constants
  • Never use var for declaring variables. Use const or let.
  • Add semicolons
  • For all other things, refer the Google JavaScript Style Guide.

Local Setup

To run the project in a local environment where you can see your changes live, fork the project, and run the below commands:

# create a local clone of the repository
git clone https://github.com/YOUR-USERNAME/hazel-ui.git
# switch to the created directory
cd hazel-ui
# install required packages
npm i
# start local server
npm run storybook

This will start the storybook server at http://localhost:6006/


Maintenance

  • Icons: If you want to add any new icons to the package, check if the icon you're looking for is already present in the @styled-icons packages that we use. If you want to use a custom SVG, use the hazel-ui/svg-to-tsx utility to generate React components from SVG files.

Dependency check

Dependencies are updated regularly through Dependabot. For manually checking which dependencies are out of date, use depcheck.


Testing

We use jest and @testing-library/react to test the components.