Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/secretlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Secretlint
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test:
name: "Secretlint"
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 # main

- name: 🟢 Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # main
with:
node-version-file: ".tool-versions"
cache: "npm"

- name: 🗄 Cache node_modules
id: cache-node_modules
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # main
with:
path: "**/node_modules"
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: 🗄 Cache .eslintcache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # main
with:
path: .eslintcache
key: eslintcache-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

Comment thread
jhnns marked this conversation as resolved.
Outdated
- name: 🔍 Install dependencies
Comment thread
jhnns marked this conversation as resolved.
Outdated
if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: |
npm ci --ignore-scripts --prefer-offline --no-audit
Comment thread
jhnns marked this conversation as resolved.
Outdated

- name: Lint with Secretlint
run: npx secretlint --format github "**/*"
Comment thread
jhnns marked this conversation as resolved.
Outdated
7 changes: 7 additions & 0 deletions .secretlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"rules": [
{
"id": "@secretlint/secretlint-rule-preset-recommend"
}
]
}
1 change: 1 addition & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
"*": ["secretlint --no-glob"],
"*.{js,jsx,ts,tsx,html,css,json,json5,md}": ["prettier --write"],
"!(.github/workflows)/*.{yml,yaml}": ["prettier --write"],
".github/workflows/*.{yml,yaml}": [
Expand Down
Loading