Skip to content

Commit

Permalink
chore: basic and core configuration for typescript monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
0xjei committed Sep 21, 2024
1 parent 2f8462b commit c3eb8a4
Show file tree
Hide file tree
Showing 19 changed files with 4,222 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const fs = require("node:fs")
const path = require("node:path")

const packages = fs.readdirSync(path.resolve(__dirname, "packages"))
const apps = fs.readdirSync(path.resolve(__dirname, "apps"))

module.exports = {
extends: ["@commitlint/config-conventional"],
prompt: {
scopes: [...packages, ...apps],
markBreakingChangeMode: true,
allowCustomIssuePrefix: false,
allowEmptyIssuePrefix: false,
issuePrefixes: [
{
value: "re",
name: "re: ISSUES related"
}
]
}
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#root = true

[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
indent_size = 4

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.sol linguist-language=Solidity
93 changes: 93 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

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

# IDE
.vscode
.idea

# Testing
coverage
coverage.json
*.lcov

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm
.DS_Store

# Output of 'npm pack'
*.tgz

# Optional eslint cache
.eslintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# Production
build
dist
/docs

# Docusaurus cache and generated files
.docusaurus
.cache-loader

# Hardhat
artifacts
cache
typechain-types

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# asdf
.tool-versions

# direnv
.envrc
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no-install commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
3 changes: 3 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if [ "$NO_HOOK" != "1" ]; then
exec < /dev/tty && npx czg --hook || true
fi
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"**/*.{js,ts,md,json,sol,yaml,yml}": "prettier --write"
}
38 changes: 38 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# dependencies
node_modules
package-lock.json
yarn.lock
.yarn

# testing
coverage
coverage.json

# hardhat
artifacts
cache
typechain-types

# production
dist
build
/docs

# github
.github/ISSUE_TEMPLATE

# Docusaurus cache and generated files
.docusaurus
.cache-loader

# mdx file
*.mdx

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"arrowParens": "always",
"trailingComma": "none"
}
925 changes: 925 additions & 0 deletions .yarn/releases/yarn-4.5.0.cjs

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
yarnPath: .yarn/releases/yarn-4.5.0.cjs

checksumBehavior: update

compressionLevel: mixed

enableGlobalCache: false

nodeLinker: node-modules
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# excubiae

an on-chain flexible &amp; modular framework for implementing custom gatekeepers.
Empty file added apps/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions changelogithub.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"types": {
"feat": { "title": "🚀 Features" },
"fix": { "title": "🐞 Bug Fixes" },
"refactor": { "title": "♻️ Refactoring" }
}
}
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "excubiae",
"description": "An on-chain flexible &amp; modular framework for implementing custom gatekeepers.",
"license": "MIT",
"repository": "[email protected]:privacy-scaling-explorations/excubiae.git",
"homepage": "https://github.com/privacy-scaling-explorations/excubiae.git",
"bugs": "https://github.com/privacy-scaling-explorations/excubiae/issues",
"private": true,
"packageManager": "[email protected]",
"workspaces": [
"apps/*",
"packages/*",
"packages/contracts/contracts"
],
"devDependencies": {
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@types/node": "^22.5.5",
"changelogithub": "^0.13.10",
"czg": "^1.9.4",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"ts-node": "^10.9.2",
"typescript": "^5.6.2"
},
"scripts": {
"prepare": "husky",
"format": "prettier -c .",
"format:write": "prettier -w .",
"precommit": "lint-staged",
"postinstall": "husky && git config --local core.editor cat"
}
}
Empty file added packages/.gitkeep
Empty file.
26 changes: 26 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"baseUrl": ".",
"strict": true,
"target": "ES2020",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"preserveConstEnums": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"declaration": true,
"allowSyntheticDefaultImports": true,
"declarationDir": "types",
"typeRoots": ["node_modules/@types", "types"],
"paths": {
"@excubiae/*": ["./packages/*/src"]
}
},
"ts-node": {
"compilerOptions": {
"target": "esnext",
"module": "commonjs"
}
}
}
Loading

0 comments on commit c3eb8a4

Please sign in to comment.