Skip to content

Commit f6fbd19

Browse files
committed
Refactor spec build system
1 parent 289e724 commit f6fbd19

33 files changed

+1449
-632
lines changed

.remarkrc-lint.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import remarkValidateLinks from "remark-validate-links";
2+
import remarkPresetLintConsistent from "remark-preset-lint-consistent";
3+
import remarkPresetLintRecommended from "remark-preset-lint-recommended";
4+
import remarkPresetLintMarkdownStyleGuide from "remark-preset-lint-markdown-style-guide";
5+
import remarkLintListItemIndent from "remark-lint-list-item-indent";
6+
import remarkLintListItemSpacing from "remark-lint-list-item-spacing";
7+
import remarkLintNoFileNameMixedCase from "remark-lint-no-file-name-mixed-case";
8+
9+
10+
export default {
11+
plugins: [
12+
remarkValidateLinks,
13+
remarkPresetLintConsistent,
14+
remarkPresetLintRecommended,
15+
remarkPresetLintMarkdownStyleGuide,
16+
[remarkLintListItemIndent, "one"],
17+
[remarkLintListItemSpacing, { checkBlanks: true }],
18+
[remarkLintNoFileNameMixedCase, false]
19+
]
20+
};

README.md

+8-6
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@ Labels are assigned based on [Sensible Github Labels](https://github.com/Releque
2626

2727
### Specification
2828
To build the spec files to HTML from the Markdown sources, run `npm run
29-
build-all`.
30-
You can also build each individually with `npm run build -- filename.md`
31-
(Example: `npm run build -- jsonschema-core.md`). You can also use wildcards to
32-
build multiple specs at the same time: `npm run build -- jsonschema-*.md`. The
33-
HTML files will be available in the `web` folder.
29+
build-all`. You can also build each individually with `npm run build --
30+
specs/filename.md` (Example: `npm run build -- specs/jsonschema-core.md`). You
31+
can also use wildcards to build multiple specs at the same time: `npm run build
32+
-- specs/jsonschema-*.md`. The HTML files will be available in the `web` folder.
3433

3534
The spec is built using [Remark](https://remark.js.org/), a markdown engine with
36-
good support for plugins and lots of existing plugins we can use.
35+
good support for plugins and lots of existing plugins we can use. Remark also
36+
has a [language server](https://github.com/remarkjs/remark-language-server) and
37+
a [VSCode extension](https://github.com/remarkjs/vscode-remark) we can use to
38+
get linting an link checking while developing the spec.
3739

3840
#### Plugins
3941
The following is a not-necessarily-complete list of configured plugins and the

build/build.js

-199
This file was deleted.

eslint.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import globals from "globals";
33
import stylistic from "@stylistic/eslint-plugin";
44
import importPlugin from "eslint-plugin-import";
55

6+
67
export default [
78
js.configs.recommended,
89
importPlugin.flatConfigs.recommended,
@@ -34,7 +35,7 @@ export default [
3435

3536
// Imports
3637
"import/extensions": ["error", "ignorePackages"],
37-
"import/newline-after-import": ["error", { count: 2, exactCount: false, considerComments: true }], // Doesn't respect @import
38+
"import/newline-after-import": ["error", { count: 2, exactCount: false, considerComments: true }],
3839

3940
// Stylistic
4041
"@stylistic/yield-star-spacing": ["error", "after"],

0 commit comments

Comments
 (0)