Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "16"
node-version: "24"
- name: Cache dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "16"
node-version: "24"
- name: Cache dependencies
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
Expand Down
11 changes: 5 additions & 6 deletions docs/.eleventy.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
const syntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight")

const {
EleventyHtmlBasePlugin,
EleventyRenderPlugin,
} = require("@11ty/eleventy")

const yaml = require("js-yaml")
const markdownIt = require("markdown-it")
const markdownItEmoji = require("markdown-it-emoji")
Expand All @@ -27,7 +22,11 @@ mdSetup.renderer.rules.code_inline = (tokens, idx, { langPrefix = "" }) => {
)}</code>`
}

module.exports = function (eleventyConfig) {
module.exports = async function (eleventyConfig) {
const { EleventyHtmlBasePlugin, EleventyRenderPlugin } = await import(
"@11ty/eleventy"
)

eleventyConfig.addWatchTarget("./_src/styles/tailwind.config.js")
eleventyConfig.addWatchTarget("./_src/styles/tailwind.css")
eleventyConfig.addWatchTarget("./_src/js/*.js")
Expand Down
12 changes: 6 additions & 6 deletions docs/_data/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ async function fetchData(location) {
const gitleaks = await fetchFile(gitleaksInternalRule, "/")
rules.push(gitleaks)
// ex: looping through rules [ruby, gitleaks, sql]
dirs.forEach(async (dir) => {
for (const dir of dirs) {
Comment thread
elsapet marked this conversation as resolved.
const dirPath = path.join(location, dir)
if (isDirectory(dirPath) && !excludeDirectories.includes(dir)) {
const subDirs = await readdir(dirPath)
updateCounts(dir)
// ex. looping through rules/ruby [lang, rails]
subDirs.forEach(async (subDir) => {
for (const subDir of subDirs) {
const subDirPath = path.join(dirPath, subDir)
if (
isDirectory(subDirPath) &&
Expand All @@ -105,7 +105,7 @@ async function fetchData(location) {
} else if (isDirectory(subDirPath) && subDir === "gosec") {
const groupDirs = await readdir(subDirPath)

groupDirs.forEach(async (groupDir) => {
for (const groupDir of groupDirs) {
const groupDirPath = path.join(dirPath, subDir, groupDir)
if (isDirectory(groupDirPath)) {
const files = await readdir(groupDirPath)
Expand All @@ -116,11 +116,11 @@ async function fetchData(location) {
)
rules.push(...children)
}
})
}
}
})
}
}
})
}
return { counts, rules }
}

Expand Down
Loading
Loading