Skip to content

Commit aebca02

Browse files
committed
Update config.$ref of CLI2 JSON schema to reference local schema to avoid (new) warning in VS Code about untrusted schema location (fixes #423).
1 parent 6200396 commit aebca02

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

markdownlint-cli2-config-schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"config": {
1313
"description": "markdownlint configuration schema : https://github.com/DavidAnson/markdownlint/blob/v0.40.0/schema/.markdownlint.jsonc",
14-
"$ref": "https://raw.githubusercontent.com/DavidAnson/markdownlint/v0.40.0/schema/markdownlint-config-schema.json",
14+
"$ref": "./markdownlint-config-schema.json",
1515
"default": {}
1616
},
1717
"customRules": {

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@
2424
"compile": "webpack --mode production",
2525
"compile-debug": "webpack --mode none",
2626
"lint": "eslint --ignore-pattern bundle.js --ignore-pattern bundle.web.js --no-warn-ignored *.mjs *.js test-ui/*.cjs eslint.config.mjs && markdownlint-cli2 *.md",
27-
"schema": "cpy ./node_modules/markdownlint/schema/markdownlint-config-schema.json . --flat && cpy ./node_modules/markdownlint-cli2/schema/markdownlint-cli2-config-schema.json . --flat",
28-
"test": "node --test --experimental-test-coverage && npm run lint && npm run compile && npm run schema && git diff --exit-code",
27+
"schema-copy": "cpy ./node_modules/markdownlint/schema/markdownlint-config-schema.json . --flat && cpy ./node_modules/markdownlint-cli2/schema/markdownlint-cli2-config-schema.json . --flat",
28+
"schema-update": "replace-in-files --regex='\"\\$ref\": \"https://raw\\.githubusercontent\\.com/DavidAnson/markdownlint/v\\d+\\.\\d+\\.\\d+/schema/markdownlint-config-schema\\.json\"' --replacement='\"$ref\": \"./markdownlint-config-schema.json\"' ./markdownlint-cli2-config-schema.json",
29+
"test": "node --test --experimental-test-coverage && npm run lint && npm run compile && npm run schema-copy && npm run schema-update && git diff --exit-code",
2930
"test-ui": "node ./test-ui/run-tests.mjs",
3031
"test-web": "npm install --no-save @vscode/test-web && sed -i '.bak' -e 's/\\/{{uuid}}\\./\\//' node_modules/@vscode/test-web/out/server/workbench.js && vscode-test-web --browser=none --verbose --extensionDevelopmentPath=. .",
3132
"upgrade": "npx --yes npm-check-updates --upgrade"
@@ -53,6 +54,7 @@
5354
"eslint-plugin-n": "17.23.1",
5455
"eslint-plugin-unicorn": "62.0.0",
5556
"path-browserify": "1.0.1",
57+
"replace-in-files-cli": "4.0.0",
5658
"stream-browserify": "3.0.0",
5759
"terser-webpack-plugin": "5.3.16",
5860
"util": "0.12.5",

test/metadata-test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const markdownlintPackageJson = await importWithTypeJson(import.meta, "../node_m
2121
describe("metadata", () => {
2222

2323
test("version numbers match", async (t) => {
24-
t.plan(184);
24+
t.plan(183);
2525
const files = [
2626
"./package.json",
2727
"./CHANGELOG.md",

0 commit comments

Comments
 (0)