Use eslint

This commit is contained in:
Ben Edgington
2025-05-24 20:48:15 +01:00
parent 422c2b9387
commit c177509cb5
7 changed files with 1003 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import { visit } from 'unist-util-visit';
import fs from 'fs';
// Add a tooltip to constant values in the text according to the mapping in the
// supplied file.

View File

@@ -1,3 +1,5 @@
import fs from 'fs';
// Write a .htaccess file to set the correct 404 page
function writeHtaccess(base, dir, logger) {

View File

@@ -8,7 +8,7 @@ const searchIndex = [];
function isExcludedFrontmatter(frontmatter, exclude) {
for (let i = 0; i < exclude.frontmatter.length; i++) {
const test = exclude.frontmatter[i];
const [key, ...rest] = Object.keys(test);
const key = Object.keys(test)[0];
if (
Object.prototype.hasOwnProperty.call(frontmatter, key) &&
frontmatter[key] == test[key]

View File

@@ -2,6 +2,7 @@ import { visit } from 'unist-util-visit';
import { optimize } from 'svgo';
import { getHashDigest } from 'loader-utils';
import path from 'path';
import fs from 'fs';
// Inline SVG files into the Markdown AST