Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
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
22 changes: 11 additions & 11 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
"package: api":
'package: api':
- any:
- changed-files:
- any-glob-to-any-file:
- 'packages/api/**/*'

"package: icon":
'package: icon':
- any:
- changed-files:
- any-glob-to-any-file:
- 'packages/icon/**/*'

"package: style":
'package: style':
- any:
- changed-files:
- any-glob-to-any-file:
- 'packages/style/**/*'

"package: ui":
'package: ui':
- any:
- changed-files:
- any-glob-to-any-file:
- 'packages/ui/**/*'

"eslint":
'eslint':
- any:
- changed-files:
- any-glob-to-any-file:
- 'tooling/config-eslint/**/*'
- '.eslintrc*'
- 'eslint.config.*'

"tsconfig":
'tsconfig':
- any:
- changed-files:
- any-glob-to-any-file:
- 'tooling/config-typescript/**/*'
- 'tsconfig.json'

"documentation":
'documentation':
- any:
- changed-files:
- any-glob-to-any-file:
- 'docs/**/*'
- 'README.md'

"build":
'build':
- any:
- changed-files:
- any-glob-to-any-file:
Expand All @@ -53,19 +53,19 @@
- 'packages/*/package.json'
- 'apps/*/package.json'

"workflows":
'workflows':
- any:
- changed-files:
- any-glob-to-any-file:
- '.github/workflows/**/*'

"app: spectator":
'app: spectator':
- any:
- changed-files:
- any-glob-to-any-file:
- 'apps/spectator/**/*'

"app: manager":
'app: manager':
- any:
- changed-files:
- any-glob-to-any-file:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
- wip/*
- release/**
types: [ opened, synchronize, reopened ]
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
33 changes: 33 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"singleQuote": true,
"jsxSingleQuote": false,

// sort imports
"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
"type-internal",
"value-internal",
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
],
"order": "asc"
},

// sort tailwindcss classes
"sortTailwindcss": {
"stylesheet": "./apps/spectator/src/styles/globals.css",
"functions": ["clsx", "cn"],
"preserveWhitespace": true
},
Comment on lines +21 to +25
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

sortTailwindcss.stylesheet 설정이 spectator 앱의 CSS 파일 하나만 가리키고 있습니다. manager 앱도 Tailwind CSS를 사용하고 자체 globals.css 파일이 있는데, 이 설정으로는 manager 앱의 클래스가 올바르게 정렬되지 않을 수 있습니다. oxfmt가 여러 경로를 지원한다면 두 앱의 CSS 파일을 모두 포함하는 것이 좋겠습니다. 만약 단일 경로만 지원한다면, 이 제한 사항을 인지하고 있어야 합니다.


// sort package.json fields
"sortPackageJson": {
"sortScripts": true
},

"ignorePatterns": []
}
74 changes: 74 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "react", "unicorn", "jsx-a11y"],
"categories": {
"correctness": "warn"
},
"rules": {
"typescript/no-floating-promises": "error",
"typescript/no-unsafe-assignment": "warn",
"unicorn/prefer-node-protocol": "off",
"typescript/no-non-null-assertion": "warn",
"eslint/prefer-template": "warn",
"typescript/consistent-type-imports": "error",
"typescript/consistent-type-exports": "error",
"eslint/no-param-reassign": "error",
"typescript/prefer-as-const": "error",
"eslint/default-param-last": "error",
"typescript/prefer-enum-initializers": "error",
"react/self-closing-comp": "error",
"eslint/one-var": ["error", "never"],
"unicorn/prefer-number-properties": "error",
"typescript/no-inferrable-types": "error",
"eslint/no-else-return": "error",
"eslint/dot-notation": "off",
"typescript/ban-types": "off",
"unicorn/no-array-for-each": "off",
"react-hooks/exhaustive-deps": "warn",
"typescript/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrors": "none" }
],
"react/no-danger": "warn",
"typescript/no-explicit-any": "warn",
"react/no-array-index-key": "warn",
"jsx-a11y/button-has-type": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/label-has-associated-control": "off",
"jsx-a11y/alt-text": "off"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

여러 중요한 웹 접근성(jsx-a11y) 규칙들이 비활성화되어 있습니다. 특히 button-has-type, click-events-have-key-events, label-has-associated-control, alt-text와 같은 규칙을 끄면 장애가 있는 사용자들이 애플리케이션을 사용하는 데 어려움을 겪을 수 있습니다. 이 규칙들을 다시 활성화하고 관련 문제들을 수정하는 것을 강력히 권장합니다.

},
"settings": {
"jsx-a11y": {
"polymorphicPropName": null,
"components": {},
"attributes": {}
},
"next": {
"rootDir": []
},
"react": {
"formComponents": [],
"linkComponents": [],
"version": null,
"componentWrapperFunctions": []
},
"jsdoc": {
"ignorePrivate": false,
"ignoreInternal": false,
"ignoreReplacesDocs": true,
"overrideReplacesDocs": true,
"augmentsExtendsReplacesDocs": false,
"implementsReplacesDocs": false,
"exemptDestructuredRootsFromChecks": false,
"tagNamePreference": {}
},
"vitest": {
"typecheck": false
}
},
"env": {
"builtin": true
},
"globals": {},
"ignorePatterns": []
}
16 changes: 5 additions & 11 deletions apps/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,12 @@
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "next dev --turbopack --port 11114 --hostname 0.0.0.0",
"build": "next build",
"start": "next start",
"lint": "biome lint .",
"lint:fix": "biome lint --fix .",
"format": "biome format --write ."
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"biome lint --fix",
"biome format --write"
]
"dev": "next dev --turbopack --port 11114 --hostname 0.0.0.0",
"format": "oxfmt",
"lint": "oxlint",
"lint:fix": "oxlint --fix",
"start": "next start"
},
"dependencies": {
"@bprogress/next": "^3.2.12",
Expand Down
2 changes: 1 addition & 1 deletion apps/manager/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const config = {
plugins: ["@tailwindcss/postcss"],
plugins: ['@tailwindcss/postcss'],
};

export default config;
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreateGames.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { GameStateType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export type GameFormTeamType = {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreateLeagues.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { LeagueDetailType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export type LeagueFormType = Pick<
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreatePlayers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { PlayerType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export type PlayerFormType = Pick<PlayerType, 'name' | 'studentNumber'>;
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreateTeams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { TeamType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export type TeamFormType = Pick<TeamType, 'name' | 'unit' | 'teamColor' | 'teamPlayers'> & {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreateTimelinePK.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { PkType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export const postTimelinePK = ({ gameId, ...request }: PkType) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { ReplacementType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export const postTimelineReplace = ({ gameId, ...request }: ReplacementType) => {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreateTimelineScore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { ScoreType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export const postTimelineScore = ({ gameId, ...request }: ScoreType) => {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreateTimelineStatus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { ProgressStateType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export const postTimelineProgress = ({ gameId, ...request }: ProgressStateType) => {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useCreateTimelineWarning.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { WarningType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export const postTimelineWarning = ({ gameId, ...request }: WarningType) => {
Expand Down
1 change: 1 addition & 0 deletions apps/manager/src/api/mutations/useDeleteLeagues.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
1 change: 1 addition & 0 deletions apps/manager/src/api/mutations/useDeletePlayers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
1 change: 1 addition & 0 deletions apps/manager/src/api/mutations/useDeleteTeams.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
1 change: 1 addition & 0 deletions apps/manager/src/api/mutations/useDeleteTimeline.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
1 change: 1 addition & 0 deletions apps/manager/src/api/mutations/useUpdateCheerTalkBlock.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useUpdateGames.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { GameStateType } from '~/api';

import { queryKeys } from '~/api/queryKey';

export type GameUpdateFormType = {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useUpdateLeagueTeams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { LeagueDetailType } from '~/api';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useUpdateLeagues.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { LeagueDetailType } from '~/api';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useUpdatePlayers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { PlayerFormType } from '~/api';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/mutations/useUpdateTeams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { fetcher, useMutation, useQueryClient } from '@hcc/api-base';

import type { TeamFormType } from '~/api';

import { queryKeys } from '~/api/queryKey';

type Request = {
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/queries/useCheerTalkBlock.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useQuery, useSuspenseQuery } from '@hcc/api-base';

import type { CheerTalkPayload } from '~/api';

import { queryKeys } from '../queryKey';

export const useCheerTalkBlock = (payload: CheerTalkPayload) =>
Expand Down
2 changes: 2 additions & 0 deletions apps/manager/src/api/queries/useCheerTalkReport.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { useQuery, useSuspenseQuery } from '@hcc/api-base';

import type { CheerTalkPayload } from '~/api';

import { queryKeys } from '../queryKey';

export const useCheerTalkReport = (payload: CheerTalkPayload) =>
Expand Down
Loading