From 42e4a3f962a8e3e15ed3d1bd3410f128c01ea4c3 Mon Sep 17 00:00:00 2001 From: Bailey Pearson Date: Wed, 13 Nov 2024 15:34:34 -0700 Subject: [PATCH] add lint --- .github/workflows/lint.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..0ed7c4b --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,39 @@ +name: Lint + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + name: ${{ matrix.lint-target }} + strategy: + matrix: + lint-target: ["c++", "typescript"] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js LTS + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install dependencies + shell: bash + run: npm i --ignore-scripts + + - if: matrix.lint-target == 'c++' + shell: bash + run: | + npm run check:clang-format + + - if: matrix.lint-target == 'typescript' + shell: bash + run: | + npm run check:eslint \ No newline at end of file