Skip to content

Commit 5cd7d31

Browse files
committed
feat: setup monorepo with eslint, prettier, and typescript configs
1 parent bc61894 commit 5cd7d31

35 files changed

+2313
-452
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/nice-pugs-remain.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@nestjs-labs/eslint-config": patch
3+
"@nestjs-labs/prettier-config": patch
4+
"@nestjs-labs/typescript-config": patch
5+
---
6+
7+
Release version 1.1.0 for all packages

.github/workflows/lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
lint:
9+
name: Lint
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
- name: Setup pnpm
15+
uses: pnpm/action-setup@v3
16+
with:
17+
version: 10.10.0
18+
- name: Setup Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version-file: .nvmrc
22+
cache: pnpm
23+
- name: Install dependencies
24+
run: pnpm install --frozen-lockfile --prefer-offline
25+
- name: Build
26+
run: pnpm run build
27+
- name: Lint
28+
run: pnpm run lint
29+
- name: Format
30+
run: pnpm run format
31+
- name: Type Check
32+
run: pnpm run check-types

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
id-token: write
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v4
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v3
23+
with:
24+
version: 10.10.0
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version-file: .nvmrc
29+
cache: pnpm
30+
- name: Install Dependencies
31+
run: pnpm install --frozen-lockfile
32+
- name: Build
33+
run: pnpm run build
34+
- name: Create Release Pull Request or Publish to npm
35+
id: changesets
36+
uses: changesets/action@v1
37+
with:
38+
commit: "chore: update versions"
39+
title: "chore: update versions"
40+
publish: pnpm run release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# compiled output
22
/dist
33
/node_modules
4+
/tsconfig.tsbuildinfo
45
/build
56
**/dist
67
**/node_modules
78
**/build
8-
9+
**/tsconfig.tsbuildinfo
910
# Logs
1011
logs
1112
*.log

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22

.prettierignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
dist
2+
**/dist
3+
**/build
4+
**/build-*/
5+
**/coverage
6+
**/coverage-*/
7+
**/coverage-*/
8+
node_modules
9+
.turbo
10+
.vscode
11+
.github
12+
.husky
13+
.pnpm-lock.yaml
14+
.prettierignore
15+
.changeset

.prettierrc.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import config from '@nestjs-labs/prettier-config';
2+
3+
export default config;

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# NestJS Labs Dev
22

3-
A monorepo for NestJS development environment, providing reusable ESLint and TypeScript configurations.
3+
A monorepo for NestJS development environment, providing reusable ESLint and TypeScript
4+
configurations.
45

56
## 🚀 Project Overview
67

7-
This monorepo contains various configuration packages for NestJS development, designed to provide a consistent and high-quality development experience.
8+
This monorepo contains various configuration packages for NestJS development, designed to provide a
9+
consistent and high-quality development experience.
810

911
## 📦 Included Packages
1012

1113
### `@nestjs-labs/eslint-config`
14+
1215
Provides modular ESLint configurations supporting multiple project types:
16+
1317
- **Base**: Basic configuration
1418
- **Node.js**: Node.js project configuration
1519
- **NestJS**: NestJS project configuration
@@ -18,7 +22,9 @@ Provides modular ESLint configurations supporting multiple project types:
1822
- **Jest**: Test files configuration
1923

2024
### `@nestjs-labs/typescript-config`
25+
2126
Provides TypeScript configuration files:
27+
2228
- **Base**: Basic TypeScript configuration
2329
- **NestJS**: NestJS project specific configuration
2430
- **Next.js**: Next.js project specific configuration
@@ -130,7 +136,10 @@ MIT License
130136

131137
## 🙏 Acknowledgments
132138

133-
This project is inspired by and references the excellent work from [@polkadot-js/dev](https://github.com/polkadot-js/dev), which provides shared development configurations and CI scripts for the Polkadot.js ecosystem. Their approach to creating reusable development tooling has been a great inspiration for this project.
139+
This project is inspired by and references the excellent work from
140+
[@polkadot-js/dev](https://github.com/polkadot-js/dev), which provides shared development
141+
configurations and CI scripts for the Polkadot.js ecosystem. Their approach to creating reusable
142+
development tooling has been a great inspiration for this project.
134143

135144
## 🔗 Related Links
136145

0 commit comments

Comments
 (0)