Skip to content

Commit

Permalink
Do not persist credentials on code checkout (#64)
Browse files Browse the repository at this point in the history
* chore: do not persist credentials on gh actions

* Add color to lint
  • Loading branch information
fcasal authored Dec 16, 2024
1 parent db826a6 commit ad64a32
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/lint_and_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/setup-node@v4

- name: Install modules
run: npm install

- name: Run prettier
run: npx prettier --check .

- name: Run ESLint
run: npx eslint --color -c .eslintrc.json .
run: npx eslint --ext ts --color -c .eslintrc.json src

# GH's SARIF viewer does not support suppression directives so we get too many false positives
# - name: SARIF
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@
"compile": "node ./esbuild.js",
"package": "NODE_ENV=production node ./esbuild.js",
"watch": "node ./esbuild.js --watch",
"lint": "eslint src --ext ts",
"lint": "eslint --ext ts --color -c .eslintrc.json src",
"prettier": "prettier --write ."
},
"devDependencies": {
Expand Down

0 comments on commit ad64a32

Please sign in to comment.