Skip to content

Commit

Permalink
Merge branch 'devhatt:main' into issue-232
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathh19 authored Sep 9, 2024
2 parents ee54cd8 + 843ded8 commit 97e27c9
Show file tree
Hide file tree
Showing 83 changed files with 759 additions and 615 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @devhatt/hatts @devhatt/petdex-frontend-administrators
21 changes: 0 additions & 21 deletions .github/workflows/autoAssigned.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/base-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Base workflows

on:
issue_comment:
types: [created]
pull_request:

jobs:
assignes:
uses: devhatt/workflows/.github/workflows/auto-assign.yml@main
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup deps
uses: ./.github/actions/install-deps
uses: devhatt/workflows/.github/actions/pnpm-setup@main

- name: Build
run: pnpm build
40 changes: 4 additions & 36 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,13 @@ jobs:
uses: actions/checkout@v3

- name: Setup deps
uses: ./.github/actions/install-deps

- name: Get all changed files
id: all-changed-files
uses: tj-actions/changed-files@v41
with:
files: |
!pnpm-lock.yaml
uses: devhatt/workflows/.github/actions/pnpm-setup@main

- name: Run prettier in all files
if: steps.all-changed-files.outputs.any_changed == 'true'
env:
files: ${{ steps.all-changed-files.outputs.all_changed_files }}
run: pnpm exec prettier $files --check --ignore-unknown

- name: Get specific changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
files_yaml: |
code:
- '**.js'
- '**.ts'
- '**.tsx'
- '**.jsx'
- '**.mjs'
- '**.cjs'
style:
- '**.scss'
run: pnpm exec prettier . --check --ignore-unknown

- name: Run stylelint in scss files
if: steps.changed-files.outputs.style_any_changed == 'true'
env:
files: ${{ steps.changed-files.outputs.style_all_changed_files }}
run: pnpm exec stylelint $files --allow-empty-input
run: pnpm exec stylelint . --allow-empty-input

- name: Run eslint in code files
if: steps.changed-files.outputs.code_any_changed == 'true'
env:
files: ${{ steps.changed-files.outputs.code_all_changed_files }}
run: pnpm exec eslint $files --report-unused-disable-directives --max-warnings 0 --output-file eslint_report.json --format json
continue-on-error: true
run: pnpm exec eslint . --report-unused-disable-directives --max-warnings 0
72 changes: 72 additions & 0 deletions db.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,78 @@
"id": "1",
"breed": "Spitz",
"name": "Mel",
"title": "Bolinha",
"imgSrc": "https://images.unsplash.com/photo-1598628599796-2a454fa7d9c5?q=80&w=1674&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"imgAlt": "Bolinha",
"size": {
"small": "X",
"medium": "",
"large": ""
},
"weight": 10,
"birthday": "20-05-2022",
"castrated": true,
"specialNeeds": false
},
{
"id": "2",
"breed": "Spitz",
"name": "Mel",
"title": "Jake",
"imgSrc": "https://images.unsplash.com/photo-1530281700549-e82e7bf110d6?q=80&w=1888&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"imgAlt": "Jake",
"size": {
"small": "X",
"medium": "",
"large": ""
},
"weight": 10,
"birthday": "20-05-2022",
"castrated": true,
"specialNeeds": false
},
{
"id": "3",
"breed": "Spitz",
"name": "Mel",
"title": "Tobias",
"imgSrc": "https://images.unsplash.com/photo-1632165258904-21ca36a01ee0?q=80&w=1635&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"imgAlt": "Tobias",
"size": {
"small": "X",
"medium": "",
"large": ""
},
"weight": 10,
"birthday": "20-05-2022",
"castrated": true,
"specialNeeds": false
},

{
"id": "4",
"breed": "Spitz",
"name": "Mel",
"title": "Francis",
"imgSrc": "https://images.unsplash.com/photo-1596921825946-d738194fac80?q=80&w=1886&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"imgAlt": "Francis",
"size": {
"small": "X",
"medium": "",
"large": ""
},
"weight": 10,
"birthday": "20-05-2022",
"castrated": true,
"specialNeeds": false
},
{
"id": "5",
"breed": "Spitz",
"name": "Mel",
"title": "Toyota",
"imgSrc": "https://images.unsplash.com/photo-1694185643879-536f8d785fa6?q=80&w=1664&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"imgAlt": "Toyota",
"size": {
"small": "X",
"medium": "",
Expand Down
6 changes: 5 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
"types": ["vitest/globals"],
"baseUrl": ".",
"paths": {
"@testing-library/vanilla": ["src/__tests__/index.js"]
"@testing-library/vanilla": ["src/__tests__/index.js"],
"~src/*": ["src/*"],
"~styles/*": ["src/styles/*"],
"~stories/*": ["src/stories/*"],
"~layouts/*": ["src/layouts/*"]
}
}
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"stylelint": "stylelint \"**/*.scss\"",
"mock-api": "json-server db.json"
"mock-api": "json-server db.json --routes routes.json"
},
"dependencies": {
"concurrently": "8.2.2",
Expand Down Expand Up @@ -57,6 +57,7 @@
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-jsconfig": "1.1.0",
"eslint-import-resolver-node": "0.3.9",
"eslint-plugin-import": "^2.29.1",
Expand All @@ -71,7 +72,7 @@
"eslint-plugin-vitest-globals": "1.5.0",
"husky": "^8.0.3",
"jsdom": "^23.2.0",
"json-server": "1.0.0-beta.1",
"json-server": "0.17.4",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"reset-css": "^5.0.2",
Expand Down
Loading

0 comments on commit 97e27c9

Please sign in to comment.