Skip to content

Commit

Permalink
chore(configs): updates project structure (#3)
Browse files Browse the repository at this point in the history
This PR does a number of things:
- updates the release config to include a git commit with a changelog
and updated package.json
- narrows down the PR title validation run conditions
- adds .eslintignore file and fixes the override for config files
- separates the top-level tsconfig from the actual project tsconfig
  • Loading branch information
Tbhesswebber authored Jan 13, 2024
1 parent 93dc9ca commit 50a5867
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"root": true,
"overrides": [
{
"files": ["./**/*.config.ts"],
"files": ["./**/*.config.*"],
"parserOptions": {
"project": "./tsconfig.root.json"
},
"rules": {
"import/no-extraneous-dependencies": [
"error",
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

permissions:
contents: read # for checkout
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dev": "vitest --watch",
"build": "pnpm run compile && vite build",
"compile": "tsc",
"lint": "eslint",
"lint": "eslint .",
"test": "vitest --watch=false"
},
"devDependencies": {
Expand All @@ -37,6 +37,7 @@
"octokit": "^3.1.2",
"prettier": "^3.0.0",
"semantic-release": "^22.0.12",
"semantic-release-npm-github-publish": "^1.5.5",
"typescript": "^5.3.3",
"vite": "^5.0.8",
"vite-plugin-dts": "^3.7.0",
Expand Down
118 changes: 118 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 30 additions & 1 deletion release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,39 @@ const config = {
],
// eslint-disable-next-line no-template-curly-in-string -- this is the format expected by semantic-release
tagFormat: "v${version}",
extends: "semantic-release-npm-github-publish",
plugins: [
"@semantic-release/commit-analyzer",
[
"@semantic-release/commit-analyzer",
{
releaseRules: [
{
type: "chore",
release: "patch",
},
{
type: "docs",
release: "patch",
},
{
type: "refactor",
release: "patch",
},
{
type: "style",
release: "patch",
},
{
type: "test",
release: "patch",
},
],
},
],
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/github",
],
};
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"module": "ESNext",
"lib": ["ES2020"],
"skipLibCheck": true,
"allowJs": true,

/* Bundler mode */
"moduleResolution": "bundler",
Expand All @@ -28,5 +27,5 @@
/* Types */
"types": ["node", "vitest/globals"],
},
"include": ["src", "./**/*.ts", "./*.config.*"]
"include": ["src"]
}
8 changes: 8 additions & 0 deletions tsconfig.root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends":"./tsconfig.json",
"include": ["./**/*.ts", "./**/*.config.*"],
"exclude": ["src", "dist", "node_modules"],
"compilerOptions": {
"allowJs": true
}
}

0 comments on commit 50a5867

Please sign in to comment.