Skip to content

Commit

Permalink
Merge pull request #105 from Bear29ers/develop
Browse files Browse the repository at this point in the history
master <= develop
  • Loading branch information
Bear29ers committed Jun 26, 2024
2 parents 3290dd3 + 0bd7e7b commit 8d8b7de
Show file tree
Hide file tree
Showing 145 changed files with 30,888 additions and 5,522 deletions.
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# config
*.cjs
tailwind.config.ts
jest.setup.js
next.config.js

# build
build/
bin/
obj/
out/
.next/
205 changes: 205 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
/** @type {import('@typescript-eslint/experimental-utils').TSESLint.Linter.Config} */

const config = {
root: true,
env: {
browser: true,
node: true,
es2021: true,
},
extends: [
'eslint:recommended',
'airbnb',
'airbnb/hooks',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:jsx-a11y/recommended',
'next/core-web-vitals',
'plugin:tailwindcss/recommended',
'plugin:jest/recommended',
'plugin:jest/style',
'plugin:testing-library/react',
'plugin:jest-dom/recommended',
'plugin:testing-library/react',
'plugin:react/recommended',
'plugin:storybook/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
plugins: [
'import',
'unused-imports',
'jsx-a11y',
'tailwindcss',
'@typescript-eslint',
'jest',
'jest-dom',
'testing-library',
],
rules: {
/* eslint */
'no-unused-vars': 'off',
'arrow-body-style': 'off',
'no-restricted-syntax': [
'error',
{
selector: 'TSEnumDeclaration',
message: 'DO NOT DECLARE ENUM',
},
],
'no-plusplus': 'off',
/* typescript */
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-expect-error': 'allow-with-description',
'ts-ignore': false,
'ts-nocheck': false,
'ts-check': false,
},
],
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
},
],
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
},
],
/* react */
'react/jsx-filename-extension': [
'error',
{
extensions: ['.jsx', '.tsx'],
},
],
'react/jsx-props-no-spreading': 'off',
'react/function-component-definition': [
'error',
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
'react/prop-types': 'off',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react-hooks/exhaustive-deps': 'warn',
'react/no-unknown-property': ['error', { ignore: ['space'] }],
'react/require-default-props': 'off',
'react/no-array-index-key': 'warn',
/* import */
'unused-imports/no-unused-imports': 'error',
'import/prefer-default-export': 'off',
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'import/order': [
'error',
{
'groups': ['builtin', 'external', 'parent', 'sibling', 'index', 'object', 'type'],
'pathGroupsExcludedImportTypes': ['builtin'],
'newlines-between': 'always',
'pathGroups': [
{
pattern: '{react,react-dom/**,react-router-dom}',
group: 'builtin',
position: 'before',
},
{
pattern: '@/app/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/components/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/stores/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/providers/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/hooks/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/constants/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/libs/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/utils/**',
group: 'parent',
position: 'before',
},
{
pattern: '@/**',
group: 'parent',
position: 'before',
},
],
'alphabetize': {
order: 'asc',
},
},
],
/* tailwindcss */
'tailwindcss/no-custom-classname': [
'warn',
{
config: 'tailwind.config.ts',
cssFiles: ['**/*.scss', '**/*.css', '!**/node_modules', '!**/.*', '!**/dist', '!**/build'],
},
],
'tailwindcss/classnames-order': 'off',
/* jest */
'jest/consistent-test-it': [
'error',
{
fn: 'it',
},
],
'jest/require-top-level-describe': ['error'],
/* testing-library */
'testing-library/no-render-in-lifecycle': 'off',
'testing-library/no-node-access': 'off',
},
};

module.exports = config;
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Feature request template
about: Feature requests or tasks.
title: ''
labels: ''
assignees: ''
---

## 概要(Description)

-

## 内容(Detail)

-

## ゴール(Goal)

-
17 changes: 17 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Overview(概要)

-

## Type of change(変更内容)

-

## Checklist(チェックリスト)

- [ ] The title of the pull request is described.(タイトルが記載されている)
- [ ] The overview is written.(概要が記載されいてる)
- [ ] The label iis set correctly.(ラベルが正しくセットされている)

## Supplement(補足)

-
12 changes: 12 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'coverage'
on:
pull_request:
branches:
- master
- develop
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ArtiomTr/jest-coverage-report-action@v2
22 changes: 22 additions & 0 deletions .github/workflows/release_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Production Release Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
release:
types:
- released

jobs:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/node_modules
/.pnp
.pnp.js
.yarn/install-state.gz

# testing
/coverage
Expand Down Expand Up @@ -33,3 +34,6 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# IDE
.idea
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
12 changes: 12 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const path = require('path');

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

module.exports = {
'**/*.{js,jsx,ts,tsx}': [buildEslintCommand, 'eslint --fix'],
'**/*.{js,jsx,ts,tsx,json}': 'prettier --write',
'**/*.{html,jsx,tsx}': 'markuplint --fix',
'**/*.{css,scss,sass}': 'stylelint --fix',
'**/*.{spec,test}.{js,jsx,ts,tsx}': 'jest -- --coverage',
};
22 changes: 22 additions & 0 deletions .markuplintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": [
"markuplint:recommended-react"
],
"parser": {
".[jt]sx$": "@markuplint/jsx-parser"
},
"specs": {
".[jt]sx$": "@markuplint/react-spec"
},
"rules": {
"ineffective-attr": false,
"no-hard-code-id": false,
"attr-duplication": false,
"invalid-attr": {
"options": {
"allowAttrs": ["transform", "gradientTransform"]
}
}
"heading-levels": false,
},
}
25 changes: 25 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/** @type {import('pretteir').Config} */

const config = {
printWidth: 120,
tabWidth: 2,
semi: true,
jsxSingleQuote: false,
singleQuote: true,
bracketSameLine: true,
trailingComma: 'es5',
quoteProps: 'consistent',
bracketSpacing: true,
arrowParens: 'always',
plugins: ['prettier-plugin-tailwindcss'],
overrides: [
{
files: ['**/*.css', '**/*.scss', '**/*.html'],
options: {
singleQuote: false,
},
},
],
};

module.exports = config;
Loading

0 comments on commit 8d8b7de

Please sign in to comment.