From 42164d70813b32390426e372003f9f144a811593 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Thu, 4 Apr 2024 11:50:35 -0700 Subject: [PATCH] build: add Markdown lint check for unescaped angle brackets (#41753) --- .markdownlint.json | 16 +++++++++++++++- docs/api/client-request.md | 2 +- docs/tutorial/tutorial-2-first-app.md | 2 +- package.json | 2 +- yarn.lock | 8 ++++---- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/.markdownlint.json b/.markdownlint.json index 5336389f147d..9ccf3dd4b27e 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,3 +1,17 @@ { - "extends": "@electron/lint-roller/configs/markdownlint.json" + "extends": "@electron/lint-roller/configs/markdownlint.json", + "no-angle-brackets": true, + "no-inline-html": { + "allowed_elements": [ + "br", + "details", + "img", + "li", + "summary", + "ul", + "unknown", + "Tabs", + "TabItem", + ] + } } diff --git a/docs/api/client-request.md b/docs/api/client-request.md index 7e2637d207b8..72852525af8a 100644 --- a/docs/api/client-request.md +++ b/docs/api/client-request.md @@ -17,7 +17,7 @@ following properties: method. * `url` string (optional) - The request URL. Must be provided in the absolute form with the protocol scheme specified as http or https. - * `headers` Record (optional) - Headers to be sent + * `headers` Record\ (optional) - Headers to be sent with the request. * `session` Session (optional) - The [`Session`](session.md) instance with which the request is associated. diff --git a/docs/tutorial/tutorial-2-first-app.md b/docs/tutorial/tutorial-2-first-app.md index e260e89d92d3..5052b37de718 100644 --- a/docs/tutorial/tutorial-2-first-app.md +++ b/docs/tutorial/tutorial-2-first-app.md @@ -234,7 +234,7 @@ Notification) whereas camelCase modules are not instantiable (e.g. app, ipcRende
Typed import aliases For better type checking when writing TypeScript code, you can choose to import -main process modules from electron/main. +main process modules from `electron/main`. ```js const { app, BrowserWindow } = require('electron/main') diff --git a/package.json b/package.json index 0fb7c38a9955..dbe1906572d2 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "@electron/docs-parser": "^1.2.0", "@electron/fiddle-core": "^1.0.4", "@electron/github-app-auth": "^2.0.0", - "@electron/lint-roller": "^1.9.0", + "@electron/lint-roller": "^1.12.1", "@electron/typescript-definitions": "^8.15.2", "@octokit/rest": "^19.0.7", "@primer/octicons": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 7c864372f41e..c1d4d82b9853 100644 --- a/yarn.lock +++ b/yarn.lock @@ -199,10 +199,10 @@ "@octokit/auth-app" "^4.0.13" "@octokit/rest" "^19.0.11" -"@electron/lint-roller@^1.9.0": - version "1.11.1" - resolved "https://registry.yarnpkg.com/@electron/lint-roller/-/lint-roller-1.11.1.tgz#bf4ab114e8cb3a77e2c634807d4af3d40c3ba863" - integrity sha512-LfErOK5MnSmoSyVN5OnHWsQ8p5It8JBE0AmRYCx65WS4BZudnYeRcohlRSOSi+GGqldujdKHyEo+fdY5lREL/Q== +"@electron/lint-roller@^1.12.1": + version "1.12.1" + resolved "https://registry.yarnpkg.com/@electron/lint-roller/-/lint-roller-1.12.1.tgz#3152b9a68815b2ab51cc5a4d462ae6769d5052ce" + integrity sha512-TGgVcHUAooM9/dV3iJTxhmKl35x/gzStsClz2/LWtBQZ59cRK+0YwWF5HWhtydGFIpOLEQGzCvUrty5zZLyd4w== dependencies: "@dsanders11/vscode-markdown-languageservice" "^0.3.0" balanced-match "^2.0.0"