Skip to content

Commit

Permalink
docs: add readme to public packages (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
olehan committed Mar 2, 2021
1 parent 998dc8e commit 985b04d
Show file tree
Hide file tree
Showing 11 changed files with 701 additions and 8 deletions.
125 changes: 125 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# 👋 Welcome and thanks for contributing!

## 🔌 Prerequisites
| **Tool** | **Version** |
| -------- | ----------- |
| `node` | `=14` |
| `yarn` | `>=2` |

## Getting Started

#### Installation
Update pnp.js, build binaries, and link workspace together.
```shell
$ yarn
```

## PnP and Yarn Berry
We use yarn **berry** (2) with Zero-Installs enabled, so dependencies are committed.

## 💅 Code style
is fully controlled by our [`eslint` configurations][eslint-configurations].

[eslint-configurations]: https://github.com/azimutlabs/eslint

## 📚 History
We prefer to use liner history and because of that
you need to know how to work with
[`git rebase`](https://git-scm.com/docs/git-rebase).

#### Hooks
We use [`🐶husky`](https://github.com/typicode/husky) to lint your changes and commit messages to save you
from common mistakes.

#### Helpful links about `git rebase`
+ [Merging vs. Rebasing documentation from **Atlassian**](https://www.atlassian.com/git/tutorials/merging-vs-rebasing)
+ [`git rebase` tutorial from **Atlassian**](https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase)
+ [Official documentation](https://git-scm.com/docs/git-rebase)

#### Versioning
[Semantic Versioning 2.0.0](https://semver.org/)

Summary from **semver.org**:
> Given a version number MAJOR.MINOR.PATCH, increment the:
>
> + MAJOR version when you make incompatible API changes,
> + MINOR version when you add functionality in a backward-compatible manner, and
> + PATCH version when you make backward-compatible bug fixes.
>
> Additional labels for pre-release and build metadata are available as extensions to
> the MAJOR.MINOR.PATCH format.
#### Commit messages
[Conventional Commits 1.0.0](https://www.conventionalcommits.org/en/v1.0.0/)

Summary from **conventionalcommits.org**:
> The Conventional Commits specification is a lightweight convention on top of commit messages.
> It provides an easy set of rules for creating an explicit commit history; which makes it easier
> to write automated tools on top of. This convention dovetails with SemVer, by describing
> the features, fixes, and breaking changes made in commit messages.
**Message structure**:
```
<type>[optional scope]: <description> [task code if exists]
[optional body]
[optional footer(s)]
```

**Type**:

Must be one of the following:

+ **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
+ **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
+ **docs**: Documentation only changes
+ **feat**: A new feature
+ **fix**: A bug fix
+ **perf**: A code change that improves performance
+ **refactor**: A code change that neither fixes a bug nor adds a feature
+ **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
+ **test**: Adding missing tests or correcting existing tests
+ **revert**: MR/Commit reverts

**Description**
+ must be written using irregular verbs.
+ must describe what does YOUR CODE, but not what YOU DID

The Best way to understand if your commit message's good is to create sentence like:
`If applied, will [optional type] <description> [in <scope>]`.

**If applied, will...**
+ add jsdoc in `card`
+ `fix` typo in property name in `theme`
+ display columns in reverse order in `table`

**Examples**:
```
feat: add component Card
docs(card): add jsdoc (#7)
fix(theme): typo in property name (#12)
style(table): add semi colon (#2)
```

#### Branch naming
The branch name should consist of the squashed commit type and a quick summary.

**Examples**:
```
feat/card
fix/interactive-element
docs/readme
```

#### Merge Requests
**MR** is rejected when:
+ pipeline fails (lint/test error).
+ contains unrelated changes.
+ request is behind the default branch.
+ contains merge commits.


+ **If MR contains only one commit:** title should be the commit message.
+ **If MR contains multiple commits:** title should the overall summary.
+ **If MR contains the issue code:** description should contain `Closes %{issue_code}` automation command, e.g. `Closes #7`
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,30 @@ All you have to do is to extend the config you want, and we'll take it from ther
All configurations were made and tested with care. We tried to match our needs, but maybe you
could find them useful as well.

[![azimutlabs eslint config npm package version](https://img.shields.io/npm/v/@azimutlabs/eslint-config.svg?label=@azimutlabs/eslint-config)](packages/eslint-config)
[![azimutlabs eslint config core npm package version](https://img.shields.io/npm/v/@azimutlabs/eslint-config-core.svg?label=@azimutlabs/eslint-config-core)](packages/eslint-config-core)
[![azimutlabs eslint config prettier npm package version](https://img.shields.io/npm/v/@azimutlabs/eslint-config-prettier.svg?label=@azimutlabs/eslint-config-prettier)](packages/eslint-config-prettier)
[![azimutlabs eslint config typescript npm package version](https://img.shields.io/npm/v/@azimutlabs/eslint-config-typescript.svg?label=@azimutlabs/eslint-config-typescript)](packages/eslint-config-typescript)
[![azimutlabs eslint config react npm package version](https://img.shields.io/npm/v/@azimutlabs/eslint-config-react.svg?label=@azimutlabs/eslint-config-react)](packages/eslint-config-react)
[![azimutlabs eslint config jsx a11y npm package version](https://img.shields.io/npm/v/@azimutlabs/eslint-config-jsx-a11y.svg?label=@azimutlabs/eslint-config-jsx-a11y)](packages/eslint-config-jsx-a11y)
[![azimutlabs eslint config import npm package version](https://img.shields.io/npm/v/@azimutlabs/eslint-config-import.svg?label=@azimutlabs/eslint-config-import)](packages/eslint-config-import)
| | |
| --- | --- |
| [![azimutlabs eslint config npm package version][config]](packages/eslint-config) | Collection of all `@azimutlabs/eslint-config-*` packages |
| [![azimutlabs eslint config core npm package version][config-core]](packages/eslint-config-core) | ESLint configuration core rules |
| [![azimutlabs eslint config prettier npm package version][config-prettier]](packages/eslint-config-prettier) | ESLint configuration for Prettier |
| [![azimutlabs eslint config import npm package version][config-import]](packages/eslint-config-import) | ESLint configuration for ES6 Imports and Exports |
| [![azimutlabs eslint config typescript npm package version][config-typescript]](packages/eslint-config-typescript) | ESLint configuration for TypeScript |
| [![azimutlabs eslint config react npm package version][config-react]](packages/eslint-config-react) | ESLint configuration for React/ReactHooks |
| [![azimutlabs eslint config jsx a11y npm package version][config-jsx-a11y]](packages/eslint-config-jsx-a11y) | ESLint configuration for JSX Accessibility |
| [![azimutlabs eslint config functional npm package version][config-functional]](packages/eslint-config-functional) | ESLint configuration for Functional Programming |
| | |

[config]: https://img.shields.io/npm/v/@azimutlabs/eslint-config.svg?label=@azimutlabs/eslint-config&color
[config-core]: https://img.shields.io/npm/v/@azimutlabs/eslint-config-core.svg?label=@azimutlabs/eslint-config-core&color
[config-prettier]: https://img.shields.io/npm/v/@azimutlabs/eslint-config-prettier.svg?label=@azimutlabs/eslint-config-prettier&color
[config-typescript]: https://img.shields.io/npm/v/@azimutlabs/eslint-config-typescript.svg?label=@azimutlabs/eslint-config-typescript&color
[config-react]: https://img.shields.io/npm/v/@azimutlabs/eslint-config-react.svg?label=@azimutlabs/eslint-config-react&color
[config-jsx-a11y]: https://img.shields.io/npm/v/@azimutlabs/eslint-config-jsx-a11y.svg?label=@azimutlabs/eslint-config-jsx-a11y&color
[config-import]: https://img.shields.io/npm/v/@azimutlabs/eslint-config-import.svg?label=@azimutlabs/eslint-config-import&color
[config-functional]: https://img.shields.io/npm/v/@azimutlabs/eslint-config-functional.svg?label=@azimutlabs/eslint-config-functional&color

## Contributing
Any PR is welcomed by our **@js-opensource** team.
There are no specific guidelines yet, so just roll with our Issue templates.
Check out our [contributing](CONTRIBUTING.md) guidelines for more info.

## License
[![azimutlabs eslint config license](https://img.shields.io/github/license/azimutlabs/eslint?label=as%20always&color=informational)](LICENSE)
63 changes: 63 additions & 0 deletions packages/eslint-config-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<h1 align="center">
<a target="_blank" href="https://alabs.team">
<img
height="22.5"
src="https://raw.githubusercontent.com/azimutlabs/logos/master/little_logo.png"
alt="azimutlabs logo"
/>
/eslint-config-core
</a>
</h1>

<p align="center">ESLint configuration core rules</p>

<p align="center">
<a href="https://github.com/azimutlabs/eslint/actions?query=workflow%3A%22Lint+and+Test%22">
<img
src="https://github.com/azimutlabs/eslint/workflows/Lint%20and%20Test/badge.svg"
alt="azimutlabs/eslint repository github workflow status"
/>
</a>
<a href="https://github.com/azimutlabs/eslint/blob/master/LICENSE">
<img
src="https://img.shields.io/github/license/azimutlabs/eslint?label=License"
alt="azimutlabs/eslint repository license"
/>
</a>
<a href="https://www.npmjs.com/package/@azimutlabs/rollup">
<img
src="https://img.shields.io/npm/v/@azimutlabs/eslint-config-core?color=blue&logo=npm&label="
alt="@azimutlabs/eslint-config-core"
/>
</a>
</p>

## Installation
Add peer dependencies:
```shell
$ yarn add -D eslint
```
...then install config packages:
```shell
$ yarn add -D @azimutlabs/eslint-config-core
```

## Usage
```json5
{
// package.json
"eslintConfig": {
"extends": [
"@azimutlabs/eslint-config-core"
]
}
}
```

## Contributing
Any PR is welcomed by our **@js-opensource** team.
Check out our [contributing](../../CONTRIBUTING.md) guidelines for more info.

## License
[![azimutlabs rollup config license](https://img.shields.io/github/license/azimutlabs/rollup?label=as%20always&color=informational)](../../LICENSE)
63 changes: 63 additions & 0 deletions packages/eslint-config-functional/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<h1 align="center">
<a target="_blank" href="https://alabs.team">
<img
height="22.5"
src="https://raw.githubusercontent.com/azimutlabs/logos/master/little_logo.png"
alt="azimutlabs logo"
/>
/eslint-config-functional
</a>
</h1>

<p align="center">ESLint configuration for Functional Programming</p>

<p align="center">
<a href="https://github.com/azimutlabs/eslint/actions?query=workflow%3A%22Lint+and+Test%22">
<img
src="https://github.com/azimutlabs/eslint/workflows/Lint%20and%20Test/badge.svg"
alt="azimutlabs/eslint repository github workflow status"
/>
</a>
<a href="https://github.com/azimutlabs/eslint/blob/master/LICENSE">
<img
src="https://img.shields.io/github/license/azimutlabs/eslint?label=License"
alt="azimutlabs/eslint repository license"
/>
</a>
<a href="https://www.npmjs.com/package/@azimutlabs/rollup">
<img
src="https://img.shields.io/npm/v/@azimutlabs/eslint-config-functional?color=blue&logo=npm&label="
alt="@azimutlabs/eslint-config-functional"
/>
</a>
</p>

## Installation
Add peer dependencies:
```shell
$ yarn add -D eslint eslint-plugin-functional
```
...then install config packages:
```shell
$ yarn add -D @azimutlabs/eslint-config-functional
```

## Usage
```json5
{
// package.json
"eslintConfig": {
"extends": [
"@azimutlabs/eslint-config-functional"
]
}
}
```

## Contributing
Any PR is welcomed by our **@js-opensource** team.
Check out our [contributing](../../CONTRIBUTING.md) guidelines for more info.

## License
[![azimutlabs rollup config license](https://img.shields.io/github/license/azimutlabs/rollup?label=as%20always&color=informational)](../../LICENSE)
63 changes: 63 additions & 0 deletions packages/eslint-config-import/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<h1 align="center">
<a target="_blank" href="https://alabs.team">
<img
height="22.5"
src="https://raw.githubusercontent.com/azimutlabs/logos/master/little_logo.png"
alt="azimutlabs logo"
/>
/eslint-config-import
</a>
</h1>

<p align="center">ESLint configuration for ES6 Imports and Exports</p>

<p align="center">
<a href="https://github.com/azimutlabs/eslint/actions?query=workflow%3A%22Lint+and+Test%22">
<img
src="https://github.com/azimutlabs/eslint/workflows/Lint%20and%20Test/badge.svg"
alt="azimutlabs/eslint repository github workflow status"
/>
</a>
<a href="https://github.com/azimutlabs/eslint/blob/master/LICENSE">
<img
src="https://img.shields.io/github/license/azimutlabs/eslint?label=License"
alt="azimutlabs/eslint repository license"
/>
</a>
<a href="https://www.npmjs.com/package/@azimutlabs/rollup">
<img
src="https://img.shields.io/npm/v/@azimutlabs/eslint-config-import?color=blue&logo=npm&label="
alt="@azimutlabs/eslint-config-import"
/>
</a>
</p>

## Installation
Add peer dependencies:
```shell
$ yarn add -D eslint eslint-plugin-import eslint-plugin-simple-import-sort
```
...then install config packages:
```shell
$ yarn add -D @azimutlabs/eslint-config-import
```

## Usage
```json5
{
// package.json
"eslintConfig": {
"extends": [
"@azimutlabs/eslint-config-import"
]
}
}
```

## Contributing
Any PR is welcomed by our **@js-opensource** team.
Check out our [contributing](../../CONTRIBUTING.md) guidelines for more info.

## License
[![azimutlabs rollup config license](https://img.shields.io/github/license/azimutlabs/rollup?label=as%20always&color=informational)](../../LICENSE)
Loading

0 comments on commit 985b04d

Please sign in to comment.