-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yusukehirao
committed
May 7, 2024
0 parents
commit 2a096ed
Showing
27 changed files
with
9,366 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": ["@d-zero/eslint-config/base"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import config from '@d-zero/prettier-config'; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.', | ||
}, | ||
}, | ||
}), | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.