Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: prepare repository for typedoc enforcement #25

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,28 @@ jobs:
- name: Install dependencies
run: npm clean-install
env: { HUSKY: 0 }

- name: Build package
run: npm run build
- name: Build docs
run: npm run build:docs

- name: Audit dependencies
run: npm audit && npm audit signatures
run: >
npm audit
npm audit signatures
- name: Audit linting
run: npm run lint
- name: Audit type checks
run: npm run build:typescript
- name: Audit code coverage
run: npm run test:coverage
- name: Audit code formatting
run: npm run format
- name: Audit code linting
run: npm run lint
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with: { token: "${{ secrets.CODECOV_TOKEN }}" }

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with: { token: "${{ secrets.CODECOV_TOKEN }}" }
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v5
with: { token: "${{ secrets.CODECOV_TOKEN }}" }
3 changes: 2 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Documentation
name: Documentation

on:
push: { branches: [main] }
Expand Down Expand Up @@ -28,6 +28,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with: { node-version: latest }

- name: Install dependencies
run: npm clean-install
env: { HUSKY: 0 }
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with: { node-version: latest }

- name: Install dependencies
run: npm clean-install
env: { HUSKY: 0 }
- name: Build plugin
run: npm run build:release
run: npm run build
- name: Release update
env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" }
run: npx semantic-release
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run lint:commit ${1}
npm run commitlint ${1}
1 change: 0 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
npm run format
npm run lint
1 change: 1 addition & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
npm run build:docs
npm run test:coverage
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ELEMENTS, ELEMENT_TYPE_RULES, EXTERNAL_RULES } from "./boundaries.confi

/** @type { import("eslint").Linter.Config[] } */
export default [
{ ignores: [".husky/", "coverage/", "docs/", "dist/", "node_modules/", "test-vault/"] },
{ ignores: [".husky/", "coverage/", "docs/", "dist/", "node_modules/"] },

eslintPluginImport.flatConfigs.recommended,
...eslintConfigPreact.flat,
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
"type": "module",
"main": "dist/main.js",
"scripts": {
"prepare": "husky && git submodule init",
"build": "tsc && vite build",
"build": "vite build",
"build:clean": "rm -rf node_modules/ dist/ coverage/ docs/",
"build:release": "tsc && vite build --mode production --outDir ./dist/",
"build:watch": "git submodule init && git submodule update && vite build --mode development --outDir ./test-vault/.obsidian/plugins/objo/ --watch",
"build:docs": "typedoc --validation",
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"lint:commit": "commitlint --edit",
"format": "prettier --check .",
"format:fix": "prettier --write .",
"build:typescript": "tsc --build",
"build:watch": "vite build --watch",
"build:watch-docs": "typedoc --validation --watch",
"build:watch-typescript": "tsc --build --watch",
"commitlint": "commitlint --edit",
"lint": "eslint . && prettier --check .",
"lint:fix": "prettier --write . && eslint --fix .",
"prepare": "husky",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest --watch",
"test:watch-coverage": "vitest --watch --coverage"
"test:watch-coverage": "vitest --coverage --watch"
},
"dependencies": {
"@preact/signals": "^2.0.1",
Expand Down
5 changes: 0 additions & 5 deletions test-vault/.obsidian/community-plugins.json

This file was deleted.

Loading