Skip to content

Commit

Permalink
chore: panda.config.ts 파일의 include 속성을 폴더, 파일 구조 컨벤션에 맞게 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wokbjso committed Jul 13, 2024
2 parents 4d6a234 + fa98ae7 commit 8c6a0ab
Show file tree
Hide file tree
Showing 21 changed files with 177 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
"endOfLine": "auto",
"semi": true
}
]
},
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<!-- - 간략한 문제 설명 -->
<!-- - 문제 관련 링크 등등 -->
<!-- Ex) React v18 version update에 후 테스트에서 에러가 발생합니다.
react-testing-library의 버전이 호환이 되지않아서 문제입니다. -->
라이브러리의 버전이 호환이 되지않아서 문제입니다. -->

<!-- # 어떻게 해결했나요? -->
<!-- - 동작 방식 등 수정힌 코드에 대한 설명 -->
<!-- Ex) react-testing-library의 버전을 업데이트하고, react-test-renderer를 v18을 사용할 수 있도록 dev dependency로 설치해주었습니다. -->
<!-- Ex) 라이브러리의 버전을 업데이트하고, v18을 사용할 수 있도록 dev dependency로 설치해주었습니다. -->

<!-- # 이미지 첨부 (Option) -->
<!-- - 이번 PR의 동작 이해를 돕는 GIF나 이미지 파일 첨부! -->
Expand Down
38 changes: 38 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
enable:
issues: false
prs: true

labels:
'build':
include:
- '\bbuild\b'
'chore':
include:
- '\bchore\b'
'ci':
include:
- '\bci\b'
'docs':
include:
- '\bdocs\b'
'feat':
include:
- '\bfeat\b'
'fix':
include:
- '\bfix\b'
'refactor':
include:
- '\brefactor\b'
'revert':
include:
- '\brevert\b'
'style':
include:
- '\bstyle\b'
'design':
include:
- '\bdesign\b'
'test':
include:
- '\btest\b'
14 changes: 14 additions & 0 deletions .github/workflows/auto-labeling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Auto Labeling'
on:
pull_request:
types: [opened, synchronize]

jobs:
labeler:
runs-on: ubuntu-latest
steps:
- name: Check Labels
id: labeler
uses: jimschubert/labeler-action@v2
with:
GITHUB_TOKEN: ${{secrets.ACTIONS_TOKEN}}
89 changes: 89 additions & 0 deletions .github/workflows/review-status-labeling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: 'Review Status Labeling'
on:
pull_request:
types: [opened, edited, reopened, ready_for_review]
pull_request_review:
types: [submitted, edited]

jobs:
labeler:
runs-on: ubuntu-latest

steps:
- name: Check out the repository
uses: actions/checkout@v2

- name: Count Approvals
id: count_approvals
uses: actions/github-script@v6
with:
github-token: ${{ secrets.ACTIONS_TOKEN }}
script: |
const reviewsResponse = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
const approvedReviews = reviewsResponse.data.filter(review => review.state === 'APPROVED');
return approvedReviews.length;
- name: Get Labels
id: get_labels
uses: actions/github-script@v6
with:
github-token: ${{ secrets.ACTIONS_TOKEN }}
script: |
const labelsResponse = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
return labelsResponse.data.map(label => label.name);
- name: Apply Labels
uses: actions/github-script@v6
with:
github-token: ${{ secrets.ACTIONS_TOKEN }}
script: |
const labelNameList = ${{ steps.get_labels.outputs.result }};
if (${{ steps.count_approvals.outputs.result }} === 0) {
if (labelNameList.includes('Approved 🆗') === true) {
await github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'Approved 🆗'
});
}
if (labelNameList.length === 0 || labelNameList.includes('Review Plz🙏') === false) {
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Review Plz🙏']
});
}
} else {
if (labelNameList.includes('Review Plz🙏') === true) {
await github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'Review Plz🙏'
});
}
if (labelNameList.includes('Approved 🆗') === false) {
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Approved 🆗']
});
}
}
6 changes: 3 additions & 3 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
// },
// }

const path = require('path')
const path = require('path');

const buildEslintCommand = (filenames) =>
`pnpm lint --fix --file ${filenames
.map((f) => path.relative(process.cwd(), f))
.join(' --file ')}`
.join(' --file ')}`;

module.exports = {
'*.{ts,tsx}': [buildEslintCommand],
}
};
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"semi": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"useTabs": false,
Expand Down
14 changes: 7 additions & 7 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import './styles/global.css'
import './styles/global.css';

import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
import type { Metadata } from 'next'
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import type { Metadata } from 'next';

import ReactQueryProvider from './providers/ReactQueryProvider'
import ReactQueryProvider from './providers/ReactQueryProvider';

export const metadata: Metadata = {
title: '2팀 최고~',
description: '',
}
};

export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
children: React.ReactNode;
}>) {
return (
<html lang="en">
Expand All @@ -24,5 +24,5 @@ export default function RootLayout({
</ReactQueryProvider>
</body>
</html>
)
);
}
6 changes: 3 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { css } from '@/styled-system/css'
import { css } from '@/styled-system/css';

const styles = css({
w: 'full',
h: 'full',
fontSize: '40px',
fontWeight: '600',
color: 'green.50',
})
});

export default function Home() {
return <main className={styles}>2팀 웹 파이팅~~</main>
return <main className={styles}>2팀 웹 파이팅~~</main>;
}
12 changes: 6 additions & 6 deletions app/providers/ReactQueryProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'use client'
'use client';

import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { useState } from 'react'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { useState } from 'react';

export default function ReactQueryProvider({
children,
}: Readonly<{
children: React.ReactNode
children: React.ReactNode;
}>) {
const [queryClient] = useState(() => new QueryClient())
const [queryClient] = useState(() => new QueryClient());

return (
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
)
);
}
Empty file added assets/index.ts
Empty file.
2 changes: 1 addition & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ module.exports = {
],
],
},
}
};
Empty file added components/atoms/index.ts
Empty file.
Empty file added components/index.ts
Empty file.
Empty file added components/molecules/index.ts
Empty file.
Empty file added features/index.ts
Empty file.
Empty file added hooks/index.ts
Empty file.
4 changes: 2 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {};

export default nextConfig
export default nextConfig;
12 changes: 8 additions & 4 deletions panda.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig, defineGlobalStyles } from '@pandacss/dev'
import { defineConfig, defineGlobalStyles } from '@pandacss/dev';

const globalCss = defineGlobalStyles({
'html, body': {
w: 'full',
h: 'full',
},
})
});

export default defineConfig({
// Whether to use css reset
Expand All @@ -14,7 +14,11 @@ export default defineConfig({
preflight: true,

// Where to look for your css declarations
include: ['./app/**/*.{js,jsx,ts,tsx}', './pages/**/*.{js,jsx,ts,tsx}'],
include: [
'./app/**/*.{js,jsx,ts,tsx}',
'./components/**/*.{js,jsx,ts,tsx}',
'./features/**/*.{js,jsx,ts,tsx}',
],

// Files to exclude
exclude: [],
Expand All @@ -34,4 +38,4 @@ export default defineConfig({

// The output directory for your css system
outdir: 'styled-system',
})
});
2 changes: 1 addition & 1 deletion postcss.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ module.exports = {
plugins: {
'@pandacss/dev/postcss': {},
},
}
};
Empty file added utils/index.ts
Empty file.

0 comments on commit 8c6a0ab

Please sign in to comment.