Skip to content

Commit

Permalink
feat: first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
yusukehirao committed May 7, 2024
0 parents commit 2a096ed
Show file tree
Hide file tree
Showing 27 changed files with 9,366 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://editorconfig.org
root = true
indent_style = tab
indent_size = 2

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@d-zero/eslint-config/base"]
}
37 changes: 37 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"configMigration": true,
"extends": [
"config:recommended",
"docker:pinDigests",
"helpers:pinGitHubActionDigests",
":pinDevDependencies",
":semanticCommitTypeAll(chore)"
],
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"autoApprove": true,
"labels": ["Dependencies", "Renovate"],
"packageRules": [
{
"matchDepTypes": ["optionalDependencies"],
"addLabels": ["Dependencies: Optional"]
},
{
"matchDepTypes": ["devDependencies"],
"addLabels": ["Dependencies: Development"]
},
{
"matchDepTypes": ["dependencies"],
"addLabels": ["Dependencies: Production"]
},
{
"description": "Automerge non-major updates",
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"matchCurrentVersion": "!/^0/",
"automerge": true
}
]
}
44 changes: 44 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy Pages

on:
push:
branches: ['main']
pull_request:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 22
- name: Install dependencies
run: yarn install
- name: Build Pages
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
79 changes: 79 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# macOS
.DS_Store

# Dist *.js sources
lib

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# TypeScript
*.tsbuildinfo

# Secret Test
test/fixture/.__*

# Vitepress
src/.vitepress/cache

# Pages
.dist
3 changes: 3 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import config from '@d-zero/prettier-config';

export default config;
9 changes: 9 additions & 0 deletions .textlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
...require('@d-zero/textlint-config'),
'no-mix-dearu-desumasu': {
preferInHeader: 'である',
preferInBody: 'ですます',
preferInList: 'である',
strict: true,
},
};
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": ["javascript", "typescript"],
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"github.copilot.enable": {
"*": true,
"plaintext": false,
"log": false,
"dotenv": false
}
}
4 changes: 4 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Copyright (c) 2024 D-ZERO Co., Ltd.

Licensed under CC BY-NC-SA 4.0
https://creativecommons.org/licenses/by-nc-sa/4.0/
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# ディーゼロ コーディングガイドライン

株式会社ディーゼロの主にフロントエンド開発のために規定しているコーディンガイドラインです。

Copyright (c) 2024 D-ZERO Co., Ltd. Licensed under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)
11 changes: 11 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"import": ["@d-zero/cspell-config"],
"words": [
//
"huskyrc",
"nodist",
"Splide",
"splidejs",
"WCAG"
]
}
2 changes: 2 additions & 0 deletions lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import lintStagedConfigGenerator from '@d-zero/lint-staged-config';
export default lintStagedConfigGenerator();
36 changes: 36 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@d-zero/frontend-guidelines",
"version": "5.0.0-alpha.0",
"description": "D-ZERO Frontend Developer's Guideline",
"repository": "https://github.com/d-zero-dev/frontend-env.git",
"author": "D-ZERO Co., Ltd.",
"license": "CC BY-NC-SA 4.0",
"private": true,
"type": "module",
"scripts": {
"dev": "vitepress dev src",
"build": "vitepress build src",
"lint": "run-s lint:eslint lint:prettier lint:textlint lint:cspell",
"lint:cspell": "cspell --no-progress --show-suggestions \"{*,src/*}/\"",
"lint:eslint": "eslint --fix \"*.{js,cjs,mjs}\"",
"lint:prettier": "prettier --write \"{*,src/*}.{md,json,js,cjs,mjs,jsx,ts,cts,mts,tsx}\"",
"lint:textlint": "textlint --fix ./src/*.md; textlint ./src/*.md",
"up": "yarn upgrade-interactive --latest"
},
"devDependencies": {
"@d-zero/cspell-config": "5.0.0-alpha.23",
"@d-zero/eslint-config": "5.0.0-alpha.23",
"@d-zero/lint-staged-config": "5.0.0-alpha.23",
"@d-zero/prettier-config": "5.0.0-alpha.23",
"@d-zero/textlint-config": "5.0.0-alpha.23",
"@d-zero/tsconfig": "0.2.0",
"mermaid": "10.9.0",
"npm-run-all2": "6.1.2",
"vitepress": "1.1.4",
"vitepress-plugin-mermaid": "2.0.16"
},
"volta": {
"node": "22.1.0",
"yarn": "1.22.22"
}
}
20 changes: 20 additions & 0 deletions src/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'vitepress';
import { withMermaid } from 'vitepress-plugin-mermaid';

export default async () => {
return withMermaid(
defineConfig({
outDir: process.cwd() + '/.dist',
lang: 'ja',
title: 'ディーゼロ コーディングガイドライン',
description:
'株式会社ディーゼロの主にフロントエンド開発のために規定しているコーディンガイドラインです。',
themeConfig: {
footer: {
message: 'Licensed under CC BY-NC-SA 4.0',
copyright: 'Copyright © 2024 D-ZERO Co., Ltd.',
},
},
}),
);
};
23 changes: 23 additions & 0 deletions src/.vitepress/theme/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.vp-doc div[class*='language-'] + div[class*='language-'],
.vp-doc div[class$='-api'] + div[class*='language-'],
.vp-doc div[class*='language-'] + div[class$='-api'] > div[class*='language-'] {
margin-block-start: 1em;
}

@media print {
.VPNav {
position: relative !important;
}

.VPLocalNav {
display: none !important;
}

.vp-doc [class*='language-'] {
border: 1px solid gray;
}

.vp-doc [class*='language-'] :is(pre, code) {
white-space: pre-wrap;
}
}
4 changes: 4 additions & 0 deletions src/.vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import DefaultTheme from 'vitepress/theme';
import './custom.css';

export default DefaultTheme;
Binary file added src/breakpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2a096ed

Please sign in to comment.