Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add contributing pages #2869

Draft
wants to merge 11 commits into
base: next
Choose a base branch
from
34 changes: 26 additions & 8 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,31 @@ function getSideBarWithExpandedEntry(entryToExpand: string): SidebarItem[] {
text: 'API',
items: apiPages,
},
{
text: 'Contributing',
items: [
{
text: 'Code of Conduct',
link: '/contributing/code-of-conduct',
},
{
text: 'Report Bugs',
xDivisionByZerox marked this conversation as resolved.
Show resolved Hide resolved
link: '/contributing/report-bugs',
},
{
text: 'Propose a Feature',
xDivisionByZerox marked this conversation as resolved.
Show resolved Hide resolved
link: '/contributing/propose-a-feature',
},
{
text: 'Set up a Development Environment',
xDivisionByZerox marked this conversation as resolved.
Show resolved Hide resolved
link: '/contributing/set-up-a-development-environment',
},
{
text: 'Submit a Pull Request',
xDivisionByZerox marked this conversation as resolved.
Show resolved Hide resolved
link: '/contributing/submit-a-pull-request',
},
],
},
{
text: 'About',
items: [
Expand Down Expand Up @@ -84,10 +109,6 @@ function getSideBarWithExpandedEntry(entryToExpand: string): SidebarItem[] {
text: 'Team',
link: '/about/team',
},
{
text: 'Contributing',
link: '/about/contributing',
},
],
},
];
Expand Down Expand Up @@ -212,10 +233,6 @@ const config: UserConfig<DefaultTheme.Config> = {
text: 'Team',
link: '/about/team',
},
{
text: 'Contributing',
link: '/about/contributing',
},
],
},
{
Expand All @@ -236,6 +253,7 @@ const config: UserConfig<DefaultTheme.Config> = {
sidebar: {
'/guide/': getSideBarWithExpandedEntry('Guide'),
'/api/': getSideBarWithExpandedEntry('API'),
'/contributing/': getSideBarWithExpandedEntry('Contributing'),
'/about/': getSideBarWithExpandedEntry('About'),
},
},
Expand Down
7 changes: 0 additions & 7 deletions docs/about/contributing.md

This file was deleted.

9 changes: 9 additions & 0 deletions docs/contributing/code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
editLink: false
---

# Code of Conduct

We welcome new contributors!
We appreciate your interest in making Faker a better library.
Please note that all contributors are expected to follow the [Code of Conduct](https://github.com/faker-js/faker/blob/next/CODE_OF_CONDUCT.md).
51 changes: 51 additions & 0 deletions docs/contributing/propose-a-feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Propose a Feature

If you want to propose a new feature in Faker, please create a new issue using the [Feature Request Template](https://github.com/faker-js/faker/issues/new?labels=s%3A+pending+triage%2Cc%3A+feature%2Cs%3A+waiting+for+user+interest&projects=&template=feature_request.yml).

`@faker-js/faker` is all about enhancing the developer experience with realistic fake data.
As our library grows, we welcome contributions that introduce new features and maintain the cohesive functionality of our existing codebase.
To ensure quality and consistency, we have established guidelines for contributing new features.

## General Feature Guideline

General criteria for new features are as follows:

- **Relevance**: Must be widely applicable and not specific to a particular niche.
- **Deterministic**: Functions must be based on Fakers internal [Randomizer](/api/randomizer).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention that transient usages of the Randomizer are allowed as well?

- **Conflict free**: Should not conflict with or duplicate existing features.
- **Utility**: Provides significant value to a broad user base.
Shinigami92 marked this conversation as resolved.
Show resolved Hide resolved
- **Library agnostic**: Implementations must be based solely on JavaScript runtime environments and not on specific libraries or frameworks.

## Accepting a Feature

In order for a rule to be accepted in Faker, it must fulfill all the criteria listed in [General Feature Guideline](#general-feature-guideline).
xDivisionByZerox marked this conversation as resolved.
Show resolved Hide resolved
Additionally, depending on the type of feature, there might be additionally requirements.

::: tip Note
Using thumb-up emotes ( :+1: ) on issues gives the faker team a general idea of the community interest in a feature.
If you see a feature request that you like, leave an up vote to increase interest.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention comments to explain their requirements as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add an additional section next to New Locale Criteria? Something like New Method Criteria, where we request acceptance critera from the issuer?

You can obviously also up vote you own feature requests.
:::

### New Locale Criteria

Faker already contains [over 60 different locales](/guide/localization#available-locales).

If you want to propose a new locale that does not already exist, make sure to read our guide on [locale code names](/guide/localization#locale-codes).
You should be able to name your locale using the provided systematic way.
Ideally you use this name in the issues title and description.
xDivisionByZerox marked this conversation as resolved.
Show resolved Hide resolved

## Considerations

Our goal is to maintain the library efficiently, ensuring that new features are indispensable.
Each addition to Faker comes with associated costs.
This encompasses initial expenses like design, implementation, review, and documentation of the feature.
Ideally, these tasks can be delegated to the requester or another member of the community.
Hopefully, these can be outsourced to the person requesting the feature or another person from the community.
xDivisionByZerox marked this conversation as resolved.
Show resolved Hide resolved

Moreover, ongoing maintenance of Faker incurs further costs, including awareness of the feature, a more intricate module structure, increased bundle size, and additional effort during refactoring.

If your feature isn't accepted into the library, you can still create it using Faker's Helper methods.
Our goal is to empower developers, not limit possibilities.

For more details on creating custom features, refer to our documentation on [Create Complex Objects](/guide/usage#create-complex-objects).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether the Create Complex Objects page is the best page to refer to here, but I don't know any better either.

12 changes: 12 additions & 0 deletions docs/contributing/report-bugs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Report Bugs

If you think you’ve found a bug in Faker, please create a new issue using the [Bug Report Template](https://github.com/faker-js/faker/issues/new?labels=s%3A+pending+triage%2Cc%3A+bug&template=bug_report.yml).
This allows you to provide steps to reproduce, and allows other users to confirm this is actually a bug.

Please include as much detail as possible to help us properly address your issue.
By including comprehensive information upfront, you assist us in efficiently addressing your concerns.
This approach minimizes the need for follow-up questions and allows us to focus on resolving the issue promptly.

::: info Note
If you just have a question that won’t necessarily result in a change to Faker, such as asking how something works or how to contribute, please open a [discussion](https://github.com/faker-js/faker/discussions) or stop by our [Discord server](https://chat.fakerjs.dev) instead of filing an issue.
:::
Empty file.
Empty file.