Skip to content

Commit

Permalink
Merge branch 'develop' into 523-implement-tanstack-to-prevent-reloads…
Browse files Browse the repository at this point in the history
…-between-search-page-and-prompt-of-the-month
  • Loading branch information
marclupanc committed Nov 16, 2024
2 parents 0f1779f + 5b8134e commit 9b45820
Show file tree
Hide file tree
Showing 103 changed files with 12,644 additions and 8,328 deletions.
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ VITE_ADVERTISEMENT_COMPAIGN_CONTRACT_OWNER= "0xdb0f8aACC19a779b9020a693c35014DaF

VITE_ADVERTISE_CLICK_RATE='0.001'
VITE_ADVERTISE_IMPRESSION_RATE='0.001'

VITE_ADVERTISE_VIEWS_RATE='0.001'
VITE_LAYER8_PROXY=https://layer8proxy.net
#DEV ENV FOR STATS API
VITE_STATS_API_URL=https://stats-api-dev.up.railway.app/v1

VITE_ESCROW_DEPLOYED_CONTRACT_ON_POLYGON_MAINET="0x9bf0e1fa0868997eEE5F62449F5Ea2ad5db5E75E"
SERVICE_WORKER_FILE='custom-service-worker.js'

LHCI_GITHUB_APP_TOKEN=B6ArZYEnDbHNlGFF:56686146:zUx9rDIA
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/src-cordova
/.quasar
/node_modules
.eslintrc.js
/.eslintrc.js
24 changes: 20 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module.exports = {
root: true,

parserOptions: {
ecmaVersion: '2021' // Allows for the parsing of modern ECMAScript features
// Allows for the parsing of modern ECMAScript features
ecmaVersion: '2021'
},

env: {
Expand All @@ -31,7 +32,8 @@ module.exports = {
// Uncomment any of the lines below to choose desired strictness,
// but leave only one uncommented!
// See https://eslint.vuejs.org/rules/#available-rules
'plugin:vue/vue3-essential', // Priority A: Essential (Error Prevention)
// Priority A: Essential (Error Prevention)
'plugin:vue/vue3-essential',
// 'plugin:vue/vue3-strongly-recommended', // Priority B: Strongly Recommended (Improving Readability)
// 'plugin:vue/vue3-recommended', // Priority C: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)

Expand All @@ -43,14 +45,16 @@ module.exports = {
plugins: [
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-files
// required to lint *.vue files
'vue'
'vue',
'prettier'
// https://github.com/typescript-eslint/typescript-eslint/issues/389#issuecomment-509292674
// Prettier has not been included as plugin to avoid performance impact
// add it as an extension for your IDE
],

globals: {
ga: 'readonly', // Google Analytics
// Google Analytics
ga: 'readonly',
cordova: 'readonly',
__statics: 'readonly',
__QUASAR_SSR__: 'readonly',
Expand All @@ -71,6 +75,18 @@ module.exports = {
'no-empty': 'error',
'no-inline-comments': 'error',
'no-var': 'error',
'vue/no-unused-refs': 'error',
'vue/no-restricted-syntax': 'error',
'vue/no-console': 'error',
'vue/no-empty-component-block': 'error',
'vue/no-multi-spaces': 'error',
'vue/no-unused-emit-declarations': 'error',
'vue/no-unused-vars': [
'error',
{
ignorePattern: '^_'
}
],
'prefer-const': 'error'
}
}
47 changes: 38 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
<!--
Please, include:
- A description of the changes proposed in the pull request.
- A reference to a related issue in your repository:
- Add keyword "close", "fix" or "resolve" to inform the issue related.
Example: Resolve #123
-->

## Description
### 🛠 Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

### ✨ Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

### 🧠 Rationale behind the change

Why did you choose to make these changes? Were there any trade-offs you had to consider?

### 🧪 All Test Suites Passed?

- [ ] Manual tested
- [ ] Vitest
- [ ] Cypress

### 📸 Screenshots (optional)

Please provide some screenshot for relevant changes

### 🏎 Quick checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [ ] I have checked my code and corrected any misspellings
34 changes: 34 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Code Quality check

on:
pull_request:
branches: "**"
paths:
- "src/**"
workflow_dispatch:

jobs:
code_quality_check:
runs-on: ubuntu-latest
steps:
- name: 🛫 Checkout code
uses: actions/checkout@v4

- name: 🏗 Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.10.0
cache: "npm"
cache-dependency-path: ./package-lock.json

- name: ⚙️ NPM install
run: npm install
working-directory: ./src

- name: ⚙️ Run lint
run: npm run lint:fix
working-directory: ./src

- name: 🧹Format code
run: npm run format
working-directory: ./src
76 changes: 0 additions & 76 deletions .github/workflows/codeql.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Cypress End-to-End Tests

on:
pull_request:
branches: [main]
branches: ["*"]
workflow_dispatch:

jobs:
Expand All @@ -21,7 +21,7 @@ jobs:
- name: 💻 Run Cypress
uses: cypress-io/github-action@v5
with:
start: npm run dev:e2e
start: npm run cy:test
wait-on: http://localhost:9200/
wait-on-timeout: 600
browser: chrome
Expand All @@ -35,7 +35,7 @@ jobs:
# pass GitHub token to detect new build vs re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: ✅ Upload coverage to Codecov
uses: codecov/codecov-action@v2
- name: Codecov
uses: codecov/codecov-action@v4.6.0
with:
flags: E2E
39 changes: 39 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to Cloudflare

on: [push]

jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy to Cloudflare
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: npm install

- name: Build Quasar app
run: npm run build

- name: Deploy
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist/pwa --project-name=celebrityfanalyzer

- name: Wait for 3 minutes
run: sleep 180 # Sleep for 180 seconds (3 minutes)

- name: Run Lighthouse on urls and validate with lighthouserc
uses: treosh/lighthouse-ci-action@v12
with:
urls: ${{ steps.deploy.outputs.deployment-url }}
configPath: './.github/workflows/lighthouserc.json'
runs: 3
12 changes: 12 additions & 0 deletions .github/workflows/lighthouserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ci": {
"assert": {
"assertions": {
"categories:performance": ["warn", { "minScore": 0.4 }],
"categories:accessibility": ["warn", { "minScore": 0.7 }],
"categories:best-practices": ["warn", { "minScore": 0.7 }],
"categories:seo": ["warn", { "minScore": 0.6 }]
}
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/vitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Vitest Unit Tests

on:
pull_request:
branches: [main]
branches: [ "*" ]
workflow_dispatch:

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ coverage/
conf-example
functions/node_modules
package-lock.json

.lighthousec/

22 changes: 22 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env sh

message="$(cat "$1")"
requiredPattern="^(revert: )?(feat|fix|docs|dx|style|refactor|perf|test|workflow|build|ci|chore|types|wip):#\\d+ - .{1,100}$"
mergePattern="^Merge (branch|remote-tracking branch)"

# Check if the commit message is a merge message
if echo "$message" | grep -E "$mergePattern"; then
echo "Merge commit detected. Skipping commit message check."
exit 0
fi

# Check if the commit message matches the required pattern
if ! echo "$message" | grep -E "$requiredPattern"; then
echo "$message"
echo "Error: Commit message does not match the required pattern!"
echo "The correct format is:"
echo " <type>:#<ticketNumber> - <description>"
echo "Where <type> is one of: feat, fix, docs, style, refactor, test, chore."
echo "Example: fix:#123 - fixed issue 123"
exit 1
fi
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lint-staged
28 changes: 21 additions & 7 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
# HOW TO CONTRIBUTE
# Code Of Conduct

## "Our World Is One Country"

Globe&Citizen, as a company and service, is based on the premise that people are _people_ all around the world and that all humans display the unique capacity to cooperate flexibly in groups. Participation requires, above all else, a willingness to work with other developers who are different from yourself respectfully, openly, in good faith.

## Steps to Contributing
## Our Standards

1. Fork a local copy of the code base and get to know it.
2. Create your own development branch off of the shared "develop" branch to work on locally.
3. Push to your forked repository and then open a 'pull' request.
Examples of behavior that contributes to creating a positive environment include:

## Other Considerations
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

...coming soon...
Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Loading

0 comments on commit 9b45820

Please sign in to comment.