Skip to content

Data #2

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

Open
wants to merge 10 commits into
base: revamp-2021
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/*.js
node_modules
build
public
dist
57 changes: 57 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint",
"react-hooks",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/explicit-module-boundary-types": "off",
"react/jsx-one-expression-per-line": "off",
"no-use-before-define": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"@typescript-eslint/ban-ts-comment": "off",
"react/jsx-filename-extension": [
1,
{
"extensions": [
".tsx"
]
}
],
"import/prefer-default-export": "off",
"import/extensions": [
"error",
"ignorePackages",
{
"ts": "never",
"tsx": "never"
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
}
}
}
49 changes: 49 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches: [ revamp ]
pull_request:
branches: [ revamp ]

jobs:
Code-Quality-Check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Run Linter
run: yarn lint
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 15.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install requirements
run: npm install -g yarn && yarn
- name: Run Build
run: yarn run build --if-present
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install requirements
run: npm install -g yarn && yarn
- name: Run Unit tests
run: yarn test

21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
src/*.d.ts
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
71 changes: 71 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
### Few points to follow

- Follow proper HTML [Semantics](https://www.w3schools.com/html/html5_semantic_elements.asp)

- Each Component must have proper description about their functionality

### Commit Message Format

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

The **header** is mandatory and the **scope** of the header is optional.

Example —

```
feat(JIRA-0007): add hat wobble
^ — ^—————————^ — — — — — — ^
| | |
| | +-> Jira story or component affected (optional)
| |
| + — — -> Summary in present tense.
|
+ — -> Type: chore, docs, feat, fix, refactor, style, or test.
```

Any line of the commit message cannot be longer 100 characters. This allows the message to be easier to read on GitHub as well as in various git tools.

#### Type

Must be one of the following:

- **feat**: A new feature.
- **fix**: A bug fix.
- **docs**: Documentation only changes.
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
- **refactor**: A code change that neither fixes a bug nor adds a feature.
- **perf**: A code change that improves performance.
- **test**: Adding missing tests.
- **chore**: Changes to the build process or auxiliary tools and libraries such as documentation generation.

#### Scope

The scope is optional and could be anything specifying place of the commit change. For example `nsis`, `mac`, `linux`, etc...

#### Subject

The subject contains succinct description of the change:

- use the imperative, present tense: `change` not `changed` nor `changes`,
- don't capitalize first letter,
- no dot (.) at the end.

#### Body

Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

#### Footer

The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# By Meer Sawood <[email protected]>
# uses uib node.js 14 image to build and nginx 1.18 as the server
FROM registry.access.redhat.com/ubi8/nodejs-14 AS builder
USER 0
WORKDIR /tmp/src
RUN chown -R 1001:0 /tmp/src/
ADD package.json /tmp/src/
ADD package-lock.json /tmp/src/
USER 1001
RUN npm install
ENV PATH="./tmp/src/node_modules/.bin:$PATH"
ADD . /tmp/src/
# Requires root user to build a production build
USER root
# Create A production build
RUN npm run build

FROM registry.access.redhat.com/ubi8/nginx-118

ADD nginx/nginx.conf "${NGINX_CONF_PATH}"
# if you want to add other configuration add here
COPY --from=builder /tmp/src/build ./
# Start Server
CMD nginx -g "daemon off;"
Loading