clearlineui
v0.10.2
Published
Component collection for Clearline HMO
Downloads
33
Readme
Setting Up
Clone the repo and install dependencies by running;
yarn
After installation, serve storybook to view components and their documentation by running;
yarn storybook
To test components, run;
yarn test
Installing the latest version
To install this package in your React or NextJs project, run
yarn add clearlineui
Contributing
New components are created at src/components/{component}/index.tsx
and styles are created at src/components/{component}/{component}.css
. Expose the new component and its type at src/components/index.ts
as this will be the entry point for the package.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level
parserOptions
property like this:
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
- Replace
plugin:@typescript-eslint/recommended
toplugin:@typescript-eslint/recommended-type-checked
orplugin:@typescript-eslint/strict-type-checked
- Optionally add
plugin:@typescript-eslint/stylistic-type-checked
- Install eslint-plugin-react and add
plugin:react/recommended
&plugin:react/jsx-runtime
to theextends
list