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

Feat/hng 82 develop waitlist form to add user #98

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
65e320f
feat: Added DataCard component
lordfrantex Jul 19, 2024
0db6217
feat: Added DataCard component
lordfrantex Jul 19, 2024
7fee609
feat: Removed pnpm package from package.json
lordfrantex Jul 19, 2024
76aec8d
Merge branch 'hngprojects:dev' into feat/47-component-datacard
lordfrantex Jul 19, 2024
99e2ad3
Merge branch 'dev' of https://github.com/hngprojects/hng_boilerplate_…
lordfrantex Jul 20, 2024
f54d426
passed lint test
lordfrantex Jul 20, 2024
76a08ba
Merge branch 'feat/47-component-datacard' of https://github.com/lordf…
lordfrantex Jul 20, 2024
02da97e
Merge pull request #120 from lordfrantex/feat/47-component-datacard
chumex412 Jul 20, 2024
98dc86a
installed necessary packages and get dev up to date with the main branch
shalomtaiwo Jul 20, 2024
937fbcc
initialized staging dir
Ravencodess Jul 20, 2024
5baf629
Merge pull request #203 from hngprojects/dev
Ravencodess Jul 20, 2024
b890a85
Merge pull request #204 from hngprojects/staging
Ravencodess Jul 20, 2024
6785408
Merge branch 'dev' into remix-setup
shalomtaiwo Jul 20, 2024
45a0f2e
remove pnpm and package lock
shalomtaiwo Jul 20, 2024
34e24ae
Merge pull request #202 from hngprojects/remix-setup
shalomtaiwo Jul 20, 2024
7fdf9a3
install pnpm lock file
shalomtaiwo Jul 20, 2024
9f1709b
Merge pull request #205 from hngprojects/remix-setup
shalomtaiwo Jul 20, 2024
519c17b
Removed React import
shalomtaiwo Jul 20, 2024
5b8c159
Merge pull request #210 from hngprojects/remix-setup
shalomtaiwo Jul 20, 2024
06290d9
Create staging-cicd.yml
augusthottie Jul 20, 2024
02b309d
save lint setup
shalomtaiwo Jul 20, 2024
116470a
remove unused tailwind config
shalomtaiwo Jul 20, 2024
c4f8238
Lint fixes
shalomtaiwo Jul 20, 2024
7894d91
Email template setup
shalomtaiwo Jul 20, 2024
ce5076a
add dotfiles from nextjs repo
ickynavigator Jul 20, 2024
2a11e13
remove test workflows
ickynavigator Jul 20, 2024
d986456
Merge pull request #215 from hngprojects/remix-setup
shalomtaiwo Jul 20, 2024
8d4f516
use pnpm in deploy scripts
ickynavigator Jul 20, 2024
1bfdfc8
use pnpm in staging deploy scripts
ickynavigator Jul 20, 2024
a8665b4
make the templates checboxes by default
ickynavigator Jul 20, 2024
09ccef9
Merge pull request #216 from hngprojects/change-deploy-scripts-to-pnpm
Ravencodess Jul 20, 2024
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 @@
node_modules
coverage
html
dist
!.prettierrc.cjs
119 changes: 52 additions & 67 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,83 +1,68 @@
// @ts-check

/**
* This is intended to be a basic starting point for linting in your app.
* It relies on recommended configs out of the box for simplicity, but you can
* and should modify this configuration to best suit your team's needs.
* To use this configuration, you need to install the following dependencies:
*
* eslint@^8.57.0 @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-react-refresh eslint-plugin-unicorn eslint-plugin-unused-imports@^3.2.0 prettier eslint-config-prettier eslint-plugin-prettier @ianvs/prettier-plugin-sort-imports prettier-plugin-tailwindcss
*
*
* To Replicate the vitest configuration, you need to install the following dependencies:
*
* eslint-plugin-vitest@^0.4.1 eslint-testing-library
*
* Also replicate the .prettierrc.cjs file in the root of your project.
*/

/** @type {import('eslint').Linter.Config} */
module.exports = {
root: true,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
},
reportUnusedDisableDirectives: true,
env: {
browser: true,
commonjs: true,
es6: true,
es2020: true,
},
ignorePatterns: ["!**/.server", "!**/.client"],

// Base config
extends: ["eslint:recommended"],

overrides: [
// React
{
files: ["**/*.{js,jsx,ts,tsx}"],
plugins: ["react", "jsx-a11y"],
extends: [
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
],
settings: {
react: {
version: "detect",
},
formComponents: ["Form"],
linkComponents: [
{ name: "Link", linkAttribute: "to" },
{ name: "NavLink", linkAttribute: "to" },
],
"import/resolver": {
typescript: {},
},
extends: [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"plugin:unicorn/recommended",
"plugin:prettier/recommended",
],
ignorePatterns: ["dist", "node_modules"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react", "unicorn", "unused-imports"],
rules: {
"react/prop-types": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
},

// Typescript
],
"unicorn/filename-case": [
"error",
{ cases: { kebabCase: true, pascalCase: true, camelCase: true } },
],
},
settings: {
react: { version: "detect" },
vitest: { typecheck: true },
},
overrides: [
{
files: ["**/*.{ts,tsx}"],
plugins: ["@typescript-eslint", "import"],
parser: "@typescript-eslint/parser",
settings: {
"import/internal-regex": "^~/",
"import/resolver": {
node: {
extensions: [".ts", ".tsx"],
},
typescript: {
alwaysTryTypes: true,
},
},
},
extends: [
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript",
],
files: [".eslintrc.*js", ".vite(|st).(js|ts)"],
env: { node: true },
},

// Node
{
files: [".eslintrc.cjs"],
env: {
node: true,
files: ["*.d.ts"],
rules: {
"unicorn/prevent-abbreviations": "off",
},
},
],
Expand Down
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Feature
description: An enhancement or feature
title: "[Feature]: "
labels: ["triage", "feature"]
body:
- type: textarea
id: description
attributes:
label: Description
description: A step-by-step description of the suggested feature/enhancement.
placeholder: On the user page, you should be able to...
validations:
required: true
- type: textarea
id: acceptanceCriteria
attributes:
label: Acceptance Criteria
description: What are the things that must be achieved for your ticket to be considered complete.
validations:
required: true
- type: markdown
attributes:
value: >
| Please include any screenshots which would help demonstrate the steps
and point out which parts the feature is related to
- type: textarea
id: links
attributes:
label: Links
description: Place links to supporting docs here. e.g. Figma
value: >
| [`FIGMA LINK`](LINK_HERE)
- type: textarea
id: images
attributes:
label: Images
description: Paste images or image urls
value: "![image](URL_HERE)"
47 changes: 47 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!-- Do not delete this PR template. Just edit it to include the required information -->

# Description

<!-- If your PR fixes an open issue, use `Closes #999` to link your PR with the issue. #999 stands for the issue number you are fixing -->

<!-- Github Issue Example: Closes #31 -->

**Closes #issue_number_here**

# Changes proposed

## What were you told to do?

<!-- Write the title of the issue/feature you are working on -->

## What did you do?

<!-- Talk about the things you did eg. files changes, dependencies installed e.t.c -->

# Check List (Check all the applicable boxes)

🚨Please review the [contribution guideline](CONTRIBUTING.md) for this repository.

<!-- Mark all the applicable boxes. To mark the box as done follow the following conventions -->

<!--
[x] - Correct; marked as done
[X] - Correct; marked as done
[ ] - Not correct; marked as **not** done
-->

- [ ] My code follows the code style of this project.
- [ ] This PR does not contain plagiarized content.
- [ ] The title and description of the PR is clear and explains the approach.
- [ ] I am making a pull request against the **dev branch** (left side).
- [ ] My commit messages styles matches our requested structure.
- [ ] My code additions will fail neither code linting checks nor unit test.
- [ ] I am only making changes to files I was requested to.

# Screenshots/Videos

<!-- If the changes are static page changes or UI changes add screenshots -->
<!-- If the changes involve implementing a functionality or working with apis, include a video
detailing how to implement the functionality and the request to the api and responses from the api endpoint-->
<!-- Add all the screenshots/videos which support your changes i.e before your change and after your change -->
20 changes: 11 additions & 9 deletions .github/workflows/dev-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,27 @@ jobs:
with:
node-version: '20'

- name: Cache npm modules
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-pnpm-

- name: Install npm
run: npm install -g npm@9
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: npm install
run: pnpm install

- name: Lint code
run: npm run lint
run: pnpm lint

- name: Build project
run: npm run build
run: pnpm build

deploy:
runs-on: ubuntu-latest
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/initial-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Label new issues
on:
issues:
types:
- reopened
- opened
jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- run: gh issue edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.issue.number }}
LABELS: triage
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on:
pull_request:

jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v4
with:
version: 9
- run: pnpm install
- uses: reviewdog/action-eslint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
eslint_flags: ". --ext js,jsx,ts,tsx --ignore-path=.gitignore"
21 changes: 11 additions & 10 deletions .github/workflows/prod-cicd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Production CI/CD Pipeline

on:
Expand All @@ -25,25 +24,27 @@ jobs:
with:
node-version: '20'

- name: Cache npm modules
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-npm-
${{ runner.os }}-pnpm-

- name: Install npm
run: npm install -g npm@9
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: npm install
run: pnpm install

- name: Lint code
run: npm run lint
run: pnpm run lint

- name: Build project
run: npm run build
run: pnpm run build

deploy:
runs-on: ubuntu-latest
Expand Down
Loading