diff --git a/.eslintrc b/.eslintrc index 64c653b..c3e64a1 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,7 +26,7 @@ "@typescript-eslint/no-floating-promises": "warn", "no-async-promise-executor": "warn", "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-unnecessary-type-assertion": "error", + "@typescript-eslint/no-unnecessary-type-assertion": "off", "no-constant-condition": [ "error", { diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..806ff3c --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,33 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: git submodule init + - run: git submodule update + - run: npm ci + - run: npm run build + - run: npm run check diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..1fd10ae --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing to obsidian-livesync + +## Getting started + +### Initialise livesync-commonlib submodule + +We use a git submodule to reference common code, you will need this before +building and testing will work. + +```sh +# Initialise the submodules after initiali clone +git submodule init +# Update to get the latest code +git submodule update +``` + +# Guidelines + +1. Run `npm run check` before creating any PR + +TODO. +