Skip to content

Commit

Permalink
Add Lint workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
myrotvorets-team committed Dec 16, 2024
1 parent 49e1f3c commit e760bea
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Linting

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

permissions:
contents: read

env:
NPM_CONFIG_FUND: '0'
NPM_CONFIG_AUDIT: '0'
SUPPRESS_SUPPORT: '1'
NO_UPDATE_NOTIFIER: 'true'

jobs:
lint:
name: ESLint Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
objects.githubusercontent.com:443
nodejs.org:443
registry.npmjs.org:443
- name: Run code style check
uses: myrotvorets/composite-actions/node-run-script@0365f64c55ccf287705b0190ded0d03c1edf8f4f
with:
script: lint

typecheck:
name: TypeScript Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
objects.githubusercontent.com:443
nodejs.org:443
registry.npmjs.org:443
- name: Run type check
uses: myrotvorets/composite-actions/node-run-script@0365f64c55ccf287705b0190ded0d03c1edf8f4f
with:
script: typecheck
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint:fix": "eslint --fix .",
"test": "node --require=ts-node/register/transpile-only --experimental-test-module-mocks test-runner.ts",
"test:coverage": "c8 npm test",
"typecheck": "tsc --noEmit",
"prepare": "npm run build"
},
"files": [
Expand Down

0 comments on commit e760bea

Please sign in to comment.