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

WIP: boilerplate-setup #10

Merged
merged 8 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["env", "react"],
"plugins": ["react-refresh/babel", "babel-plugin-styled-components"]
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build
node_modules/
**/*.js
29 changes: 29 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{

Choose a reason for hiding this comment

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

{
  "env": {
    "browser": true,
    "es2021": true
  },
  "extends": [
    "plugin:react/recommended",
    "airbnb",
    "airbnb-typescript",
    "airbnb/hooks",
    "prettier"
  ],
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": "latest",
    "sourceType": "module",
    "project": "./tsconfig.json"
  },
  "plugins": ["react", "react-native", "@calm/react-intl", "eslint-plugin-no-inline-styles"],
  "rules": {
    "no-inline-styles/no-inline-styles": 2,
    "@calm/react-intl/missing-formatted-message": [
      2,
      {
        "noTrailingWhitespace": true,
        "ignoreLinks": true,
        "enforceLabels": false,
        "enforceImageAlts": false,
        "enforceInputProps": false
      }
    ]
  },
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [".js", ".jsx", ".ts", ".tsx"],
        "moduleDirectory": ["node_modules", "src/"]
      }
    }
  }
}

This will be the latest eslint rules we are using in the app, as some of the stuff is RN only, you can take reference of the rules.

"env": {
"browser": true,
"es2021": true
},
"extends": ["plugin:react/recommended", "airbnb", "airbnb-typescript", "airbnb/hooks"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["react", "prettier", "eslint-plugin-no-inline-styles"],
"rules": {
"no-inline-styles/no-inline-styles": 2,
"react/react-in-jsx-scope": "off"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"moduleDirectory": ["node_modules", "src/"]
}
}
}
}
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug template
about: Template for bug report.
title: ''
labels: bug
assignees: ''

---

# Component
`Insert screen/component of this bug is related.`

# Severity
`Choose one`:
- `Critical (Application crash, Loss of data)`
- `Major (Unable to proceed on a journey)`
- `Trivial (Some UI issue)`

# Summary
`Insert a TL;DR sentence describing the bug.`

# Reproduce steps
1.
2.
3.

# Expected result
`Insert expected behaviour.`

# Actual result
`Insert actual behaviour.`

# Remark
`(Optional)`
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/chores-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Chores template
about: Template for development chores.
title: ''
labels: chores
assignees: ''

---

# What to implement

# How to implement

# Resource
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Enhancement template
about: Template for user story.
title: ''
labels: enhancement
assignees: ''

---

# Story
**As a** `insert subject here`
**I want to** `insert demand here`
**so that** `insert benefit here`.
# Acceptance Criteria
## Prerequisite
### Scenario `N`
**Given** `insert pre requisites here`
**When** `insert triggering point here`
**Then** `insert result here`
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/idea-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Idea template
about: Template for new ideas.
title: ''
labels: idea
assignees: ''

---
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PR Type
What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [ ] Bugfix
- [ ] Enhancement
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:


# What is the current behavior?
(Optional) Resolved: #`Insert issue number`


# What is the new behavior?
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/bump-version-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Bump version template
about: Template for bumping version after release.
title: 'Bumping to {version_number}'
assignees: ''

---

## Checklist

- [ ] Change version number
- [ ] Reset build number
42 changes: 42 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/changes-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Changes template
about: Template for changes in repo.
title: ''
assignees: ''

---

# PR Type
What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [ ] Bugfix
- [ ] Enhancement
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:


# What is the current behavior?
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

(Optional) Resolved: #`Insert issue number`


# What is the new behavior?


# Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No


<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->


# Other information
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pre-release-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Pre-release template
about: Template for pre-release. Develop -> Master.
title: 'Pre-releasing {version_number}'
labels: pre-release
assignees: ''

---

## Checklist

- [ ] Bump version PR merged #`Insert PR number`
- [ ] CHANGELOG Generated
- [ ] CHANGELOG unreleased tag changed
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ typings/
# Nuxt.js build / generate output
.nuxt
dist
dist/

# Gatsby files
.cache/
Expand Down
13 changes: 13 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"quoteProps": "as-needed",
"singleQuote": true,
"semi": true,
"printWidth": 100,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "es5"
}
55 changes: 12 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,15 @@
# Getting Started with Create React App
# xverse-extension

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Installing and Running

## Available Scripts
### Procedures

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `npm test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `npm run build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

### `npm run eject`

**Note: this is a one-way operation. Once you `eject`, you can’t go back!**

If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.

Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.

You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).
1. Check if your [Node.js](https://nodejs.org/) version is >= **14**.
2. Clone this repository.
3. Run `npm install` to install the dependencies.
4. Run `npm start`
5. Load your extension on Chrome following:
1. Access `chrome://extensions/`
2. Check `Developer mode`
3. Click on `Load unpacked extension`
4. Select the `build` folder.
Loading