Codacy ui-components is a component library and design guide built to help us create the best experience for the Codacy platform.
Visit our Storybook documentation to learn more.
- .aws / .circleci - Deployment scripts and configurations
- .storybook - Storybook configurations
- src - Components library and emotion
- stories - Storybook specific stories and components
Run storybook locally
To run storybook locally as a development environment use the following command:
npm run storybook
Build components library and styling
To build the components library for publishing run the following:
npm run build
npm run test
You can also run the tests in watch mode by running:
npm run test:watch
Running storybook locally doesn't type-check. You can run the type-checking with the following command:
npm run check-types
You can also run the type-checking in watch mode by running:
npm run check-types:watch
Create a new component
There's a template for new components. You can create the base structure for a new component just by running:
./make_component.sh [your component name here]
We use babel for the build process using the react-app preset as well as the typescript compiler for the declarations output.
However take note that storybook uses its own webpack and babel configurations, even though they match the react-app preset, any other configurations might need adding in both .storybook/webpack.config.js and .babelrc
If using VSCode
You might want these extensions for linting, code style, MDX support, and styled-components highlighting:
VSCode by default uses its own version of typescript for typechecking instead of the workspace's. The ESLint Visual Studio Code extension currently doesn't have TypeScript support enabled by default. You can also run Prettier to format your code on save.
For these reasons here's an example settings file for vscode. Add the following to your project's Visual Studio Code settings file, located at .vscode/settings.json (you can create this file if it doesn't already exist):
What is Codacy
Codacy is an Automated Code Review Tool that monitors your technical debt, helps you improve your code quality, teaches best practices to your developers, and helps you save time in Code Reviews.
Among Codacy features
- Identify new Static Analysis issues
- Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories)
- Auto-comments on Commits and Pull Requests
- Integrations with Slack, Jira, YouTrack
- Track issues Code Style, Security, Error Proneness, Performance, Unused Code and other categories
Codacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity.
Free for Open Source
Codacy is free for Open Source projects.