Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull Request テンプレートの導入 #15

Merged
merged 7 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
POSTGRES_DB=postgres
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_HOST=localhost
POSTGRES_HOST=db
POSTGRES_PORT=5432
POSTGRES_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
URL=http://localhost:3000
33 changes: 33 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## 関連 Issue(s)

<!--
`Close #123` のように記載することで、merge と同時に対応する Issue を自動で close できます。
複数の Issue に関連する場合は、箇条書きで列挙してください。
-->

- Close #

## 変更内容

<!--
この Pull Request の目的や変更内容を簡潔に説明してください。
-->

- a

### スクリーンショット

<!--
必要に応じて、変更内容を示すスクリーンショットも添付してください。
UI を変更する(見た目が変わる)場合は、必ず追加してください。
-->

## 確認手順

<!--
変更内容が正しく動作することを確認する手順を番号付きの箇条書きで記載してください。
-->

1. a
27 changes: 27 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint Code Base
on:
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout target branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: lts/*
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Install dependencies
run: pnpm install
- name: TypeScript Compile Check
run: pnpm tsc --noEmit
- name: Run ESLint
run: pnpm lint
- name: Run Prettier
run: pnpm format --check
- name: Run Stylelint
run: pnpm stylelint
32 changes: 11 additions & 21 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import { FlatCompat } from "@eslint/eslintrc";
import { dirname } from "path";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
import { FlatCompat } from '@eslint/eslintrc';
import eslintConfigPrettier from 'eslint-config-prettier';

const compat = new FlatCompat({
baseDirectory: __dirname,
});
// import.meta.dirname is available after Node.js v20.11.0
baseDirectory: import.meta.dirname,
})

const eslintConfig = [
{
ignores: ["node_modules/", ".next/"],
},
...compat.extends("next/core-web-vitals", "next/typescript"),
importPlugin.flatConfigs.recommended,
eslintConfigPrettier,
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
"import/order": [
"error",
Expand All @@ -34,14 +29,9 @@ const eslintConfig = [
"pathGroups": [
{
"pattern": "{react,react-dom/**,react-router-dom,next,next/**}",
"group": "bulitin",
"group": "builtin",
"position": "before"
},
{
"pattern": "@mantine/**",
"group": "builtin",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["builtin"],
"alphabetize": {
Expand All @@ -54,4 +44,4 @@ const eslintConfig = [
},
];

export default eslintConfig;
export default eslintConfig;
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,31 @@
"build": "next build",
"start": "next start",
"format": "prettier --write \"./src/**/*.{ts,tsx}\"",
"lint": "next lint",
"lint": "eslint",
"stylelint": "stylelint \"./src/**/*.css\" --fix"
},
"dependencies": {
"@mantine/core": "^7.15.1",
"@mantine/hooks": "^7.15.1",
"@mantine/modals": "^7.15.1",
"@mantine/spotlight": "^7.15.1",
"@prisma/client": "^6.1.0",
"@tabler/icons-react": "^3.24.0",
"next": "15.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"eslint": "^9.16.0",
"@eslint/eslintrc": "^3",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-prettier": "^9.1.0",
"eslint-config-next": "15.1.0",
"eslint-plugin-import": "^2.31.0",
"prettier": "^3.4.2",
"typescript-eslint": "^8.19.0",
"stylelint": "^16.11.0",
"stylelint-config-recess-order": "^5.1.1",
"stylelint-config-standard": "^36.0.1",
Expand Down
Loading
Loading