diff --git a/.github/workflows/format-lint-check.yml b/.github/workflows/format-lint-check.yml new file mode 100644 index 0000000..8eb7e87 --- /dev/null +++ b/.github/workflows/format-lint-check.yml @@ -0,0 +1,29 @@ +name: Format / Lint Check + +on: + pull_request: + branches: + - master + +jobs: + lint: + name: Lint and Format Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + + - name: Install dependencies + run: npm ci + + - name: Run ESLint + run: npm run lint + + - name: Check Prettier formatting + run: npm run format:check diff --git a/package.json b/package.json index a2634da..4ef1fe3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "description": "This is a fan made but now officially supported rules implementation (system) for [Foundry Virtual Tabletop](https://foundryvtt.com/) system for Delta Green: The RPG, based on the _Agent's Handbook_ rule set from Arc Dream Publishing (_**not** the Call of Cthulu rules_).", "main": "deltagreen.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "lint": "npx eslint .", + "format:check": "prettier --check ." }, "repository": { "type": "git",