refactor: update docs and linting CI

This commit is contained in:
Paul Makles
2023-04-14 20:13:03 +01:00
parent fd6bf3e25f
commit bd572ec792
5 changed files with 66 additions and 42 deletions
+1
View File
@@ -1,4 +1,5 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["solid", "spellcheck"],
"extends": [
+22 -17
View File
@@ -2,27 +2,32 @@ name: Publish Documentation
on:
push:
branches: [ master ]
branches: [master]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Install packages
run: pnpm install
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 16
- name: Build
run: pnpm run docs
- name: Install dependencies
run: yarn install
- name: Build
run: yarn run docs
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: docs
folder: docs
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: docs
folder: docs
+37
View File
@@ -0,0 +1,37 @@
name: Lint
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install packages
run: pnpm install
- name: Typecheck
run: pnpm typecheck
- name: Code Formatting
run: pnpm fmt:check
- name: Lint
run: pnpm lint
-24
View File
@@ -1,24 +0,0 @@
name: Typecheck
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install
- run: yarn run typecheck
+6 -1
View File
@@ -11,7 +11,11 @@
"build": "tsc",
"build:watch": "tsc-watch --onSuccess \"node .\"",
"lint": "eslint --ext .ts,.tsx src/",
"lint:fix": "eslint --fix --ext .ts,.tsx src/"
"lint:fix": "eslint --fix --ext .ts,.tsx src/",
"typecheck": "tsc --noEmit",
"docs": "typedoc --readme README.md src/",
"fmt": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'",
"fmt:check": "prettier --check 'src/**/*.{js,jsx,ts,tsx}'"
},
"files": [
"README.md",
@@ -27,6 +31,7 @@
"long": "^5.2.1",
"revolt-api": "^0.5.17",
"solid-js": "^1.7.2",
"typedoc": "^0.24.1",
"ulid": "^2.3.0",
"ws": "^8.13.0"
},