From c8be2e4d8f61b737ecf9a0cbf34a811cc7aba312 Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Fri, 8 Aug 2025 23:09:22 -0400 Subject: [PATCH 1/4] Update ignore patterns. --- .gitignore | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 04ddfd3..95c747b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,10 @@ +*.sw[nop] +*~ +.DS_Store +.cache/ +.project +.settings +.vscode/ _site/* node_modules/ package-lock.json -.cache/ -.vscode/ \ No newline at end of file From 383bddd042022c1265aa7b1e476222b247af2929 Mon Sep 17 00:00:00 2001 From: "David I. Lehn" Date: Fri, 8 Aug 2025 23:10:00 -0400 Subject: [PATCH 2/4] Update dependencies. - Update dependencies: - `eslint@9` and related packages. - `@11ty/eleventy@3` and related packages. - All other dependencies. - Update eslint config. - Update to ESM style. - Fix lint issues. --- .eleventy.js | 24 ++++++++++---------- .eslintrc.cjs | 28 ----------------------- _shortcodes/BarRating.js | 2 +- _shortcodes/mermaid.js | 2 +- _shortcodes/mermaid_fullscreen_js.js | 2 +- eslint.config.js | 34 ++++++++++++++++++++++++++++ package.json | 26 ++++++++++----------- src/_data/implementations.js | 2 +- src/_data/results.js | 6 ++--- src/assets/js/spiderCharts.js | 2 +- 10 files changed, 67 insertions(+), 61 deletions(-) delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.js diff --git a/.eleventy.js b/.eleventy.js index aebeb72..95a7443 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,14 +1,14 @@ // Imports -const markdownIt = require('markdown-it'); -const {execSync} = require('child_process'); -const legend = require('./src/_data/legend.json'); -const BarRating = require('./_shortcodes/BarRating'); -const markdownItAnchor = require('markdown-it-anchor'); -const mermaidShortcode = require('./_shortcodes/mermaid'); -const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); -const eleventyMermaidPlugin = require('@kevingimbel/eleventy-plugin-mermaid'); -const mermaidFullscreenJsShortcode = - require('./_shortcodes/mermaid_fullscreen_js'); +import BarRating from './_shortcodes/BarRating.js'; +import eleventyMermaidPlugin from '@kevingimbel/eleventy-plugin-mermaid'; +import {execSync} from 'node:child_process'; +import legend from './src/_data/legend.json' with {type: 'json'}; +import markdownIt from 'markdown-it'; +import markdownItAnchor from 'markdown-it-anchor'; +import mermaidFullscreenJsShortcode from + './_shortcodes/mermaid_fullscreen_js.js'; +import mermaidShortcode from './_shortcodes/mermaid.js'; +import syntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight'; // Constants const statusMarks = legend.reduce((all, statusMark) => { @@ -22,7 +22,7 @@ const statusLabel = legend.reduce((all, statusMark) => { }, {}); // Eleventy Configurations -module.exports = function(eleventyConfig) { +export default function(eleventyConfig) { /* Markdown Overrides */ const markdownLibrary = markdownIt({ html: true, @@ -91,4 +91,4 @@ module.exports = function(eleventyConfig) { layouts: '_layouts', }, }; -}; +} diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index 78fa68e..0000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,28 +0,0 @@ -module.exports = { - env: { - node: true - }, - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'commonjs' - }, - ignorePatterns: ['_site', '!.eleventy.js'], - extends: [ - 'eslint-config-digitalbazaar', - 'eslint-config-digitalbazaar/jsdoc' - ], - rules: { - 'jsdoc/check-examples': 0 - }, - overrides: [ - { - files: ['src/assets/js/*'], - env: { - browser: true - }, - parserOptions: { - sourceType: 'module' - } - } - ] -}; diff --git a/_shortcodes/BarRating.js b/_shortcodes/BarRating.js index faa6f07..7637287 100644 --- a/_shortcodes/BarRating.js +++ b/_shortcodes/BarRating.js @@ -56,4 +56,4 @@ function BarRating(passed, pending, failed, total, width) { `; } -module.exports = BarRating; +export default BarRating; diff --git a/_shortcodes/mermaid.js b/_shortcodes/mermaid.js index 345e8aa..d4f5c9b 100644 --- a/_shortcodes/mermaid.js +++ b/_shortcodes/mermaid.js @@ -1,4 +1,4 @@ -module.exports = content => { +export default content => { return `
diff --git a/_shortcodes/mermaid_fullscreen_js.js b/_shortcodes/mermaid_fullscreen_js.js index 219f1d8..a7817a2 100644 --- a/_shortcodes/mermaid_fullscreen_js.js +++ b/_shortcodes/mermaid_fullscreen_js.js @@ -1,4 +1,4 @@ -module.exports = () => { +export default () => { const src = 'https://unpkg.com/mermaid@10/dist/mermaid.esm.min.mjs'; return `