Skip to content

Commit

Permalink
style: integrated Eslint and Prettier (anitab-org#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
jalajcodes authored Mar 14, 2021
1 parent ecff8f9 commit a1a1f58
Show file tree
Hide file tree
Showing 76 changed files with 6,670 additions and 6,118 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github
28 changes: 28 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
"jest": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2018
},
"settings": {
"react": {
"version": "detect"
}
},
"plugins": ["react", "react-hooks", "prettier"],
"rules": {
"prettier/prettier": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/no-unescaped-entities": "off",
"react/prop-types": "off"
}
}
29 changes: 29 additions & 0 deletions .github/workflows/qa-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: OSP Web QA Checks

on: [push, pull_request]

jobs:
run-linters:
name: Linters and Formatters
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
run: npm install

- name: Linters and Formatters Check
uses: wearerequired/lint-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Enable linters
eslint: true
prettier: true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"endOfLine": "auto"
}
38 changes: 18 additions & 20 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ If you see someone who is making an extra effort to ensure our community is welc

The following behaviors are expected and requested of all community members:

* Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* Exercise consideration and respect in your speech and actions.
* Attempt collaboration before conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
* Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.
- Participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
- Exercise consideration and respect in your speech and actions.
- Attempt collaboration before conflict.
- Refrain from demeaning, discriminatory, or harassing behavior and speech.
- Be mindful of your surroundings and of your fellow participants. Alert community leaders if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.
- Remember that community event venues may be shared with members of the public; please be respectful to all patrons of these locations.

## 4. Unacceptable Behavior

The following behaviors are considered harassment and are unacceptable within our community:

* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other people’s personally identifying information ("doxing").
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Inappropriate physical contact. You should have someone’s consent before touching them.
* Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behavior.
* Sustained disruption of community events, including talks and presentations.
- Violence, threats of violence or violent language directed against another person.
- Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
- Posting or displaying sexually explicit or violent material.
- Posting or threatening to post other people’s personally identifying information ("doxing").
- Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
- Inappropriate photography or recording.
- Inappropriate physical contact. You should have someone’s consent before touching them.
- Unwelcome sexual attention. This includes, sexualized comments or jokes; inappropriate touching, groping, and unwelcomed sexual advances.
- Deliberate intimidation, stalking or following (online or in person).
- Advocating for, or encouraging, any of the above behavior.
- Sustained disruption of community events, including talks and presentations.

## 5. Consequences of Unacceptable Behavior

Expand All @@ -52,17 +52,15 @@ Anyone asked to stop unacceptable behavior is expected to comply immediately.
If a community member engages in unacceptable behavior, the community admins may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).

## 6. Reporting Guidelines
If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community admin as soon as possible by emailing [email protected]. Please read [Reporting Guidelines](REPORTING_GUIDELINES.md) for details.


If you are subject to or witness unacceptable behavior, or have any other concerns, please notify a community admin as soon as possible by emailing [email protected]. Please read [Reporting Guidelines](REPORTING_GUIDELINES.md) for details.

Additionally, community admins are available to help community members engage with local law enforcement or to otherwise help those experiencing unacceptable behavior feel safe. In the context of in-person events, community admins (or event managers) will also provide escorts as desired by the person experiencing distress.

## 7. Addressing Grievances

Only permanent resolutions (such as bans) may be appealed. To appeal a decision of the working group, contact AnitaB.org staff at [email protected] with your appeal and we will review the case.


## 8. Scope

We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues–online and in-person–as well as in all one-on-one communications pertaining to community business.
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@
Open Source Programs (OSP) is an application that simplifies the processing and selection procedure of Open Source Programs of AnitaB.org Open Source or other third-party programs. This is the Front-end repo for OSP.

## Tech Stack
- ReactJS
- Redux

- ReactJS
- Redux

## Documentation

Documentation for the project is hosted [here](https://osp-web-docs.surge.sh/). We use `Docusaurus` for maintaining the documentation of the project.

## Setup
## Setup

- To setup the project locally go through [this wiki page](https://github.com/anitab-org/open-source-programs-web/wiki/Fork,-Clone,-Remote-and-Pull-Request).
- Here's a [video](https://youtu.be/_b2RQGbYN9w) tutorial which will help to setup the project locally.

Expand All @@ -36,6 +39,20 @@ npm start

Please read the [Contributing guidelines](.github/CONTRIBUTING.md), [Code of Conduct](https://github.com/anitab-org/open-source-programs-web/blob/develop/CODE_OF_CONDUCT.md) and [Reporting Guidelines](https://github.com/anitab-org/open-source-programs-web/blob/develop/REPORTING_GUIDELINES.md)

Remember to run eslint and prettier before pushing the changes.

### To run eslint

```
npm run lint:fix
```

### To format files

```
npm run format
```

## Contact

You can reach the admins, maintainers, and our community on [AnitaB.org Open Source Zulip](https://anitab-org.zulipchat.com/). If you are interested in contributing to the OSP project, you may join the stream [#open-source-progs](https://anitab-org.zulipchat.com/#narrow/stream/237907-open-source-progs) and ask questions or interact with the community. Join Us!
Expand Down
42 changes: 19 additions & 23 deletions REPORTING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,47 +8,43 @@ If you believe anyone is in physical danger, please notify appropriate emergency

In your report please include:

* Your contact info for follow-up contact.
* Names (legal, nicknames, or pseudonyms) of any individuals involved.
* If there were other witnesses besides you, please try to include them as well.
* When and where the incident occurred. Please be as specific as possible.
* Your account of what occurred.
* If there is a publicly available record (e.g. a mailing list archive or a public IRC logger) please include a link.
* Any extra context you believe existed for the incident.
* If you believe this incident is ongoing.
* Any other information you believe we should have.


- Your contact info for follow-up contact.
- Names (legal, nicknames, or pseudonyms) of any individuals involved.
- If there were other witnesses besides you, please try to include them as well.
- When and where the incident occurred. Please be as specific as possible.
- Your account of what occurred.
- If there is a publicly available record (e.g. a mailing list archive or a public IRC logger) please include a link.
- Any extra context you believe existed for the incident.
- If you believe this incident is ongoing.
- Any other information you believe we should have.

## What happens after you file a report?

You will receive an email from the AnitaB.org Open Source's Code of Conduct response team acknowledging receipt as soon as possible, but within 48 hours.

The working group will immediately meet to review the incident and determine:

* What happened.
* Whether this event constitutes a code of conduct violation.
* What kind of response is appropriate.
- What happened.
- Whether this event constitutes a code of conduct violation.
- What kind of response is appropriate.

If this is determined to be an ongoing incident or a threat to physical safety, the team's immediate priority will be to protect everyone involved. This means we may delay an "official" response until we believe that the situation has ended and that everyone is physically safe.

Once the team has a complete account of the events they will make a decision as to how to respond. Responses may include:

Nothing (if we determine no code of conduct violation occurred).
* A private reprimand from the Code of Conduct response team to the individual(s) involved.
* A public reprimand.
* An imposed vacation (i.e. asking someone to "take a week off" from a mailing list or IRC).
* A permanent or temporary ban from some or all of AnitaB.org spaces (events, meetings, mailing lists, IRC, etc.)
* A request to engage in mediation and/or an accountability plan.
We'll respond within one week to the person who filed the report with either a resolution or an explanation of why the situation is not yet resolved.

- A private reprimand from the Code of Conduct response team to the individual(s) involved.
- A public reprimand.
- An imposed vacation (i.e. asking someone to "take a week off" from a mailing list or IRC).
- A permanent or temporary ban from some or all of AnitaB.org spaces (events, meetings, mailing lists, IRC, etc.)
- A request to engage in mediation and/or an accountability plan.
We'll respond within one week to the person who filed the report with either a resolution or an explanation of why the situation is not yet resolved.

Once we've determined our final action, we'll contact the original reporter to let them know what action (if any) we'll be taking. We'll take into account feedback from the reporter on the appropriateness of our response, but our response will be determined by what will be best for community safety.

Finally, the response team will make a report on the situation to the AnitaB.org's Open Source Board. The board may choose to issue a public report of the incident or take additional actions.



## Appealing the response

Only permanent resolutions (such as bans) may be appealed. To appeal a decision of the working group, contact the community admins at [email protected] with your appeal and we will review the case.

36 changes: 19 additions & 17 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,32 @@ If you are using GitHub pages for hosting, this command is a convenient way to b

## Deploying to Surge

Surge is a static web hosting platform. Tt is used to deploy our spen source programs docusaurus from the command line in a minute.
Surge is a static web hosting platform. It is used to deploy our open source programs docusaurus from the command line in a minute.

Deploy using surge with the following steps:

1. Install Surge using npm by running the following command:
```
npm install --g surge
```
```
npm install --g surge
```
2. To build the static files of the site for production in the root/docs directory of project, run:
```
npm run build
```
```
npm run build
```
3. Run this command inside the root/docs directory of project:
```
surge build/
```
or

Deploy the site to existing domain using the command:
```
surge build/ https://osp-web-docs.surge.sh
```
```
surge build/
```

First-time users of Surge would be prompted to create an account from the command line (happens only once).
or

Deploy the site to existing domain using the command:

Confirm that the site you want to publish is in the build directory, a randomly generated subdomain *.surge.sh subdomain is always given (which can be edited).
```
surge build/ https://osp-web-docs.surge.sh
```

First-time users of Surge would be prompted to create an account from the command line (happens only once).

Confirm that the site you want to publish is in the build directory, a randomly generated subdomain \*.surge.sh subdomain is always given (which can be edited).
Loading

0 comments on commit a1a1f58

Please sign in to comment.