Skip to content

Commit

Permalink
Merge pull request #199 from geeksblabla/next
Browse files Browse the repository at this point in the history
Awesome Morocco New listing website
  • Loading branch information
yjose authored Feb 3, 2024
2 parents 8ba53b2 + 15ee6e8 commit 87c56cd
Show file tree
Hide file tree
Showing 265 changed files with 8,947 additions and 15,124 deletions.
17 changes: 17 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Clerk Configuration
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=
CLERK_SECRET_KEY=
NEXT_PUBLIC_CLERK_AFTER_SIGN_IN_URL=/dashboard
NEXT_PUBLIC_CLERK_AFTER_SIGN_UP_URL=/dashboard

# [Xata] Configuration used by the CLI and the SDK
# Make sure your framework/tooling loads this file on startup to have it available for the SDK
XATA_BRANCH=main
XATA_API_KEY=

## Github token to retirive github repos metadata
GITHUB_API_TOKEN=

## Spotify token to retirive spotify shows and metadata
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
43 changes: 43 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/** @type {import("eslint").Linter.Config} */
const config = {
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
plugins: ["@typescript-eslint",'unicorn'],
extends: [
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:@typescript-eslint/stylistic-type-checked",
],
rules: {
// force using kebab-case for filenames
'unicorn/filename-case': [
'error',
{
case: 'kebabCase',
},
],
// These opinionated rules are enabled in stylistic-type-checked above.
// Feel free to reconfigure them to your own preference.
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-definitions": "off",

"@typescript-eslint/consistent-type-imports": [
"warn",
{
prefer: "type-imports",
fixStyle: "inline-type-imports",
},
],
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/no-misused-promises": [
2,
{
checksVoidReturn: { attributes: false },
},
],
},
};

module.exports = config;
104 changes: 104 additions & 0 deletions .github/ISSUE_TEMPLATE/NEW.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: New entry
description: Fill this form to add your content to the website.
title: "[New]: "
labels: ["new-entry"]

body:
- type: input
id: author
attributes:
label: Author full name
description: How can we get in touch with you if we need more info?
placeholder: ex. John Doe
validations:
required: true
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you if we need more info?
placeholder: ex. email@example.com
validations:
required: false

- type: input
id: project
attributes:
label: Project title
description: Add a title for your project
placeholder: ex. react-popup
validations:
required: false

- type: input
id: project-url
attributes:
label: Project url
description: Add a url for your project (repository or website)
placeholder: ex. https://github.com/user/project
validations:
required: true

- type: textarea
id: description
attributes:
label: Project description
description: Add a description for your project
placeholder: ex. A react popup component
validations:
required: true

- type: dropdown
id: type
attributes:
label: Project type
description: Choose the type of the project
options:
- Community
- Event
- Blog
- Podcast
- YouTube Channel
- Open Source Project
- Book

validations:
required: true

- type: dropdown
id: is-oss
attributes:
label: If Open Source project, can you choose technology?
multiple: true
options:
- JavaScript
- Java
- ASP.NET
- PHP
- Python
- Go
- CSS
- Flutter
- AI
- Others
description: Choose the technology of the project
validations:
required: false

- type: input
id: is-oss-others
attributes:
label: If other, please specify
description: Indicate the technology
placeholder: ex. Cobol
validations:
required: false

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our Code of Conduct
options:
- label: I agree to follow this project's Code of Conduct
required: true
21 changes: 21 additions & 0 deletions .github/actions/setup-bun-and-install/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

# ✍️ Description:
# This is a composite action, which means it can be used in other actions.
# It is used in almost all workflows to set up the environment and install dependencies.

# πŸ‘€ Example usage:
# - name : πŸ“¦ Setup Bun + Install Dependencies
# uses: ./.github/actions/setup-bun-and-install

name: 'Setup Bun + Install Dependencies'
description: 'Setup Bun + Install Dependencies'
runs:
using: 'composite'
steps:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: πŸ“¦ Install Project Dependencies
run: bun install --frozen-lockfile
shell: bash
43 changes: 43 additions & 0 deletions .github/workflows/compress-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# ✍️ Description:
# This workflow is used compress images in the repo.
# This workflow will trigger on a push to the "master" or "main" branch and only run when a new image is added or updated.
# If it's the case, it will compress those images and create a pull request with the compressed images.

name: Compress images
on:
push:
branches:
- master
- main
paths:
- "**.jpg"
- "**.jpeg"
- "**.png"
- "**.webp"
workflow_dispatch:

jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Compress Images
id: calibre
uses: calibreapp/image-actions@main
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
compressOnly: true
ignorePaths: "node_modules/**,ios/**,android/**"

- name: Create Pull Request
if: steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v3
with:
title: Auto Compress Images
branch-suffix: timestamp
commit-message: Compress Images
body: ${{ steps.calibre.outputs.markdown }}
47 changes: 0 additions & 47 deletions .github/workflows/issue-to-pr.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/lint-ts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# ✍️ Description:
# This action is used to run eslint checks
# Runs on pull requests and pushes to the main/master branches

name: Lint TS (eslint, prettier)

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
lint:
name: Lint TS (eslint, prettier)
runs-on: ubuntu-latest

steps:
- name: πŸ“¦ Checkout project repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: πŸ“¦ Setupbun + install deps
uses: ./.github/actions/setup-bun-and-install

- name: πŸƒβ€β™‚οΈ Run ESLint PR
run: bun run lint
37 changes: 0 additions & 37 deletions .github/workflows/test-scripts.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# ✍️ Description:
# This action is used to run the type-check on the project.
# Runs on pull requests and pushes to the main/master branches
# Based on the event type:
# - If it's a pull request, it will run type checking, then add the check to the PR as well as annotate the code with the errors using reviewdog.
# - If it's a push to main/master, it will run the type checking and fail if there are any errors.

name: Type Check (tsc)

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

jobs:
type-check:
name: Type Check (tsc)
runs-on: ubuntu-latest
steps:
- name: πŸ“¦ Checkout project repo
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: πŸ“¦ Setup bun + Install deps
uses: ./.github/actions/setup-bun-and-install

- name: πŸ“¦ Install Reviewdog
if: github.event_name == 'pull_request'
uses: reviewdog/action-setup@v1

- name: πŸƒβ€β™‚οΈ Run TypeScript PR # Reviewdog tsc errorformat: %f:%l:%c - error TS%n: %m
# we only need to add the reviewdog step if it's a pull request
if: github.event_name == 'pull_request'
run: |
bun type-check | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name:
πŸƒβ€β™‚οΈ Run TypeScript Commit
# If it's not a Pull Request then we just need to run the type-check
if: github.event_name != 'pull_request'
run: bun type-check
Loading

0 comments on commit 87c56cd

Please sign in to comment.