codelaw-rules-data 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codelaw_rules_data/LICENSE +23 -0
- codelaw_rules_data/NOTICE +31 -0
- codelaw_rules_data/README.md +130 -0
- codelaw_rules_data/codelaw-pack.toml +6 -0
- codelaw_rules_data/corpus.toml +41 -0
- codelaw_rules_data/data/schemas/github-action.json +1 -0
- codelaw_rules_data/data/schemas/github-workflow.json +1 -0
- codelaw_rules_data/data/schemas/package.json +1 -0
- codelaw_rules_data/data/schemas/pyproject.json +1 -0
- codelaw_rules_data/data/schemas/tsconfig.json +1 -0
- codelaw_rules_data/licenses/SchemaStore-Apache-2.0.txt +202 -0
- codelaw_rules_data/presets/data/conventions.toml +5 -0
- codelaw_rules_data/presets/data/github-actions.toml +6 -0
- codelaw_rules_data/presets/data/package-json.toml +7 -0
- codelaw_rules_data/presets/data/pyproject.toml +6 -0
- codelaw_rules_data/presets/data/recommended.toml +9 -0
- codelaw_rules_data/presets/data/tsconfig.toml +5 -0
- codelaw_rules_data/presets/md/recommended.toml +20 -0
- codelaw_rules_data/rules/json/no-duplicate-keys.cases.md +27 -0
- codelaw_rules_data/rules/json/no-duplicate-keys.md +45 -0
- codelaw_rules_data/rules/json/package-deps-sorted.cases.md +90 -0
- codelaw_rules_data/rules/json/package-deps-sorted.md +54 -0
- codelaw_rules_data/rules/json/package-engines.cases.md +24 -0
- codelaw_rules_data/rules/json/package-engines.md +45 -0
- codelaw_rules_data/rules/json/package-json-schema.md +57 -0
- codelaw_rules_data/rules/json/package-scripts-sorted.cases.md +45 -0
- codelaw_rules_data/rules/json/package-scripts-sorted.md +53 -0
- codelaw_rules_data/rules/json/tsconfig-schema.md +59 -0
- codelaw_rules_data/rules/json/tsconfig-strict.cases.md +57 -0
- codelaw_rules_data/rules/json/tsconfig-strict.md +45 -0
- codelaw_rules_data/rules/md/commands-show-output.cases.md +14 -0
- codelaw_rules_data/rules/md/commands-show-output.md +39 -0
- codelaw_rules_data/rules/md/descriptive-link-text.md +41 -0
- codelaw_rules_data/rules/md/fence-language.md +47 -0
- codelaw_rules_data/rules/md/first-line-heading.cases.md +28 -0
- codelaw_rules_data/rules/md/first-line-heading.md +46 -0
- codelaw_rules_data/rules/md/heading-increment.cases.md +61 -0
- codelaw_rules_data/rules/md/heading-increment.md +46 -0
- codelaw_rules_data/rules/md/link-fragments.cases.md +57 -0
- codelaw_rules_data/rules/md/link-fragments.md +49 -0
- codelaw_rules_data/rules/md/link-image-reference-definitions.cases.md +51 -0
- codelaw_rules_data/rules/md/link-image-reference-definitions.md +40 -0
- codelaw_rules_data/rules/md/no-alt-text.md +47 -0
- codelaw_rules_data/rules/md/no-bare-urls.cases.md +37 -0
- codelaw_rules_data/rules/md/no-bare-urls.md +37 -0
- codelaw_rules_data/rules/md/no-duplicate-heading.cases.md +19 -0
- codelaw_rules_data/rules/md/no-duplicate-heading.md +61 -0
- codelaw_rules_data/rules/md/no-emphasis-as-heading.cases.md +23 -0
- codelaw_rules_data/rules/md/no-emphasis-as-heading.md +49 -0
- codelaw_rules_data/rules/md/no-empty-links.md +50 -0
- codelaw_rules_data/rules/md/no-inline-html.cases.md +13 -0
- codelaw_rules_data/rules/md/no-inline-html.md +45 -0
- codelaw_rules_data/rules/md/no-reversed-links.md +33 -0
- codelaw_rules_data/rules/md/reference-links-images.cases.md +40 -0
- codelaw_rules_data/rules/md/reference-links-images.md +44 -0
- codelaw_rules_data/rules/md/relative-links.md +46 -0
- codelaw_rules_data/rules/md/single-h1.cases.md +29 -0
- codelaw_rules_data/rules/md/single-h1.md +57 -0
- codelaw_rules_data/rules/md/table-column-count.md +43 -0
- codelaw_rules_data/rules/toml/deps-sorted.cases.md +28 -0
- codelaw_rules_data/rules/toml/deps-sorted.md +49 -0
- codelaw_rules_data/rules/toml/no-duplicate-keys.cases.md +43 -0
- codelaw_rules_data/rules/toml/no-duplicate-keys.md +43 -0
- codelaw_rules_data/rules/toml/pyproject-requires-python.cases.md +24 -0
- codelaw_rules_data/rules/toml/pyproject-requires-python.md +41 -0
- codelaw_rules_data/rules/toml/pyproject-schema.md +55 -0
- codelaw_rules_data/rules/yaml/document-start.cases.md +31 -0
- codelaw_rules_data/rules/yaml/document-start.md +36 -0
- codelaw_rules_data/rules/yaml/gha-action-schema.md +59 -0
- codelaw_rules_data/rules/yaml/gha-pin-sha.cases.md +25 -0
- codelaw_rules_data/rules/yaml/gha-pin-sha.md +57 -0
- codelaw_rules_data/rules/yaml/gha-workflow-schema.md +57 -0
- codelaw_rules_data/rules/yaml/no-ambiguous-booleans.cases.md +29 -0
- codelaw_rules_data/rules/yaml/no-ambiguous-booleans.md +43 -0
- codelaw_rules_data/rules/yaml/no-ambiguous-numbers.cases.md +24 -0
- codelaw_rules_data/rules/yaml/no-ambiguous-numbers.md +46 -0
- codelaw_rules_data/rules/yaml/no-duplicate-keys.cases.md +35 -0
- codelaw_rules_data/rules/yaml/no-duplicate-keys.md +43 -0
- codelaw_rules_data/rules/yaml/no-undeclared-alias.cases.md +13 -0
- codelaw_rules_data/rules/yaml/no-undeclared-alias.md +46 -0
- codelaw_rules_data-0.2.0.dist-info/METADATA +140 -0
- codelaw_rules_data-0.2.0.dist-info/RECORD +84 -0
- codelaw_rules_data-0.2.0.dist-info/WHEEL +4 -0
- codelaw_rules_data-0.2.0.dist-info/licenses/LICENSE +23 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaml/no-ambiguous-numbers
|
|
3
|
+
title: "No numbers that YAML 1.1 and 1.2 read differently"
|
|
4
|
+
languages: [yaml]
|
|
5
|
+
fix: manual
|
|
6
|
+
fix_reason: "whether the octal or base-60 meaning or the YAML 1.2 meaning was intended needs the author"
|
|
7
|
+
stability: preview
|
|
8
|
+
since: 0.1.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
A value is not an unquoted integer with a leading zero (`0755`) or an unquoted base-60 form (`22:22`, `1:30:00`).
|
|
12
|
+
|
|
13
|
+
**Why:** YAML 1.1 reads `0755` as octal (493) and `22:22` as the number 1342; YAML 1.2 reads them as 755 and the string "22:22". The same file means different things to different loaders — the classic case is port mappings in `docker-compose.yml`.
|
|
14
|
+
|
|
15
|
+
```codelaw
|
|
16
|
+
native: yaml/no-ambiguous-numbers
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## How to fix
|
|
20
|
+
|
|
21
|
+
1. For an octal number, write it as `0o755`; for a decimal one, drop the leading zero.
|
|
22
|
+
2. For text such as a port mapping or a time, quote it: `"22:22"`.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
### YAML
|
|
27
|
+
|
|
28
|
+
#### Don't
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
mode: 0755
|
|
32
|
+
ports:
|
|
33
|
+
- 22:22
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Do
|
|
37
|
+
|
|
38
|
+
```yaml
|
|
39
|
+
mode: 0o755
|
|
40
|
+
ports:
|
|
41
|
+
- "22:22"
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Differences from the source
|
|
45
|
+
|
|
46
|
+
The idea comes from the YAML 1.1 and 1.2 specifications.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# yaml/no-duplicate-keys — edge cases
|
|
2
|
+
|
|
3
|
+
### case: quoted and plain spellings
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
a: 1
|
|
7
|
+
"a": 2
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
```expect
|
|
11
|
+
2:1 yaml/no-duplicate-keys
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### case: same key in sibling mappings
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
dev:
|
|
18
|
+
port: 1
|
|
19
|
+
prod:
|
|
20
|
+
port: 2
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```expect
|
|
24
|
+
(none)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### case: flow mapping
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
point: {x: 1, y: 2, x: 3}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```expect
|
|
34
|
+
1:21 yaml/no-duplicate-keys
|
|
35
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaml/no-duplicate-keys
|
|
3
|
+
title: "No key twice in one YAML mapping"
|
|
4
|
+
languages: [yaml]
|
|
5
|
+
fix: manual
|
|
6
|
+
fix_reason: "which of the two values was meant can't be known from the file"
|
|
7
|
+
stability: preview
|
|
8
|
+
since: 0.1.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Each key appears once in a mapping, block or flow. Quoted and plain spellings of a key are the same key.
|
|
12
|
+
|
|
13
|
+
**Why:** YAML 1.2 requires keys to be unique, but many loaders accept duplicates and keep only the last value, so the first one is silently lost.
|
|
14
|
+
|
|
15
|
+
```codelaw
|
|
16
|
+
native: yaml/no-duplicate-keys
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## How to fix
|
|
20
|
+
|
|
21
|
+
1. Decide which value the key should have.
|
|
22
|
+
2. Delete the other entry, or give it a key of its own.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
### YAML
|
|
27
|
+
|
|
28
|
+
#### Don't
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
service:
|
|
32
|
+
image: nginx
|
|
33
|
+
restart: always
|
|
34
|
+
image: caddy
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
#### Do
|
|
38
|
+
|
|
39
|
+
```yaml
|
|
40
|
+
service:
|
|
41
|
+
image: caddy
|
|
42
|
+
restart: always
|
|
43
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: yaml/no-undeclared-alias
|
|
3
|
+
title: "Every alias refers to an anchor defined before it"
|
|
4
|
+
languages: [yaml]
|
|
5
|
+
fix: manual
|
|
6
|
+
fix_reason: "whether the anchor is missing, misspelt or defined too late needs the author"
|
|
7
|
+
stability: preview
|
|
8
|
+
since: 0.1.0
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
An alias `*name` refers to an anchor `&name` defined earlier in the same document.
|
|
12
|
+
|
|
13
|
+
**Why:** An alias with no anchor before it is an error: YAML loaders refuse the whole file, and anchors don't carry over from one document to the next.
|
|
14
|
+
|
|
15
|
+
```codelaw
|
|
16
|
+
native: yaml/no-undeclared-alias
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## How to fix
|
|
20
|
+
|
|
21
|
+
1. Find the anchor the alias meant.
|
|
22
|
+
2. Move the anchored node above the alias, fix the spelling, or add the anchor.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
### YAML
|
|
27
|
+
|
|
28
|
+
#### Don't
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
production:
|
|
32
|
+
<<: *defaults
|
|
33
|
+
host: example.com
|
|
34
|
+
defaults: &defaults
|
|
35
|
+
port: 443
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Do
|
|
39
|
+
|
|
40
|
+
```yaml
|
|
41
|
+
defaults: &defaults
|
|
42
|
+
port: 443
|
|
43
|
+
production:
|
|
44
|
+
<<: *defaults
|
|
45
|
+
host: example.com
|
|
46
|
+
```
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: codelaw-rules-data
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: codelaw's rules for JSON, YAML, TOML and Markdown (SR-RULE-PACKS)
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Project-URL: Repository, https://github.com/arpitarya/codelaw
|
|
8
|
+
Requires-Python: >=3.11
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# @codelaw/rules-data · codelaw-rules-data
|
|
12
|
+
|
|
13
|
+
codelaw's rules for JSON, YAML, TOML and Markdown — one of the
|
|
14
|
+
first-party rule packs ([SR-RULE-PACKS](../../records/0101_rule-packs.md)). The
|
|
15
|
+
same files ship on npm as `@codelaw/rules-data` and on PyPI as
|
|
16
|
+
`codelaw-rules-data`.
|
|
17
|
+
|
|
18
|
+
```toml
|
|
19
|
+
# codelaw.toml
|
|
20
|
+
extends = ["codelaw:data/recommended", "codelaw:md/recommended"]
|
|
21
|
+
preview = true # every rule is `preview` until a corpus run promotes it
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Presets
|
|
25
|
+
|
|
26
|
+
<!-- docs-sync:presets -->
|
|
27
|
+
|
|
28
|
+
| preset | rules | what it holds |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `data/recommended` | 6 | correctness for JSON, YAML and TOML: keys defined twice in each, YAML aliases without an anchor, and the YAML scalars that YAML 1.1 and 1.2 read differently |
|
|
31
|
+
| `md/recommended` | 17 | the non-layout rules of markdownlint 0.42.0's default set, and the starter rule `md/relative-links` |
|
|
32
|
+
| `data/package-json` | 4 | `json/package-scripts-sorted`, `json/package-deps-sorted`, `json/package-engines`, `json/package-json-schema` — `files: **/package.json` |
|
|
33
|
+
| `data/tsconfig` | 2 | `json/tsconfig-strict`, `json/tsconfig-schema` — `files: **/tsconfig.json`, `**/tsconfig.*.json` |
|
|
34
|
+
| `data/pyproject` | 3 | `toml/deps-sorted`, `toml/pyproject-requires-python`, `toml/pyproject-schema` — `files: **/pyproject.toml` |
|
|
35
|
+
| `data/github-actions` | 3 | `yaml/gha-pin-sha`, `yaml/gha-workflow-schema`, `yaml/gha-action-schema` — workflows and composite actions |
|
|
36
|
+
| `data/conventions` | 2 | opt-in house style: `yaml/document-start`, `md/no-inline-html` |
|
|
37
|
+
|
|
38
|
+
<!-- /docs-sync:presets -->
|
|
39
|
+
|
|
40
|
+
37 rules: 8 `auto`, 5 `suggest`, 24 `manual`. Every rule is
|
|
41
|
+
**reimplemented**, not vendored: the checks, messages and docs are written
|
|
42
|
+
fresh, and each ported rule's `ported_from:` names its source. Rules that need
|
|
43
|
+
more than a pattern are native rules in `crates/codelaw-native/src/data_*.rs`;
|
|
44
|
+
rules about a path in a JSON, YAML or TOML file are `target:` + `assert:` rules
|
|
45
|
+
(SR-RULE-FORMAT decision 3e).
|
|
46
|
+
|
|
47
|
+
The starter-catalogue rules are all here under their starter ids:
|
|
48
|
+
`json/package-scripts-sorted`, `json/package-engines`, `json/tsconfig-strict`,
|
|
49
|
+
`json/no-duplicate-keys`, `yaml/no-duplicate-keys`, `yaml/gha-pin-sha`,
|
|
50
|
+
`yaml/document-start`, `toml/pyproject-requires-python`, `toml/deps-sorted`,
|
|
51
|
+
`md/single-h1`, `md/heading-increment`, `md/fence-language` and
|
|
52
|
+
`md/relative-links`.
|
|
53
|
+
|
|
54
|
+
## Ported
|
|
55
|
+
|
|
56
|
+
| rule | from | fix |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `md/heading-increment` | markdownlint MD001 | suggest |
|
|
59
|
+
| `md/no-reversed-links` | markdownlint MD011 | auto |
|
|
60
|
+
| `md/commands-show-output` | markdownlint MD014 | auto |
|
|
61
|
+
| `md/no-duplicate-heading` | markdownlint MD024 | manual |
|
|
62
|
+
| `md/single-h1` | markdownlint MD025 | manual |
|
|
63
|
+
| `md/no-inline-html` | markdownlint MD033 | manual |
|
|
64
|
+
| `md/no-bare-urls` | markdownlint MD034 | auto |
|
|
65
|
+
| `md/no-emphasis-as-heading` | markdownlint MD036 | manual |
|
|
66
|
+
| `md/fence-language` | markdownlint MD040 | manual |
|
|
67
|
+
| `md/first-line-heading` | markdownlint MD041 | manual |
|
|
68
|
+
| `md/no-empty-links` | markdownlint MD042 | manual |
|
|
69
|
+
| `md/no-alt-text` | markdownlint MD045 | manual |
|
|
70
|
+
| `md/link-fragments` | markdownlint MD051 | manual |
|
|
71
|
+
| `md/reference-links-images` | markdownlint MD052 | manual |
|
|
72
|
+
| `md/link-image-reference-definitions` | markdownlint MD053 | auto |
|
|
73
|
+
| `md/table-column-count` | markdownlint MD056 | manual |
|
|
74
|
+
| `md/descriptive-link-text` | markdownlint MD059 | manual |
|
|
75
|
+
| `md/relative-links` | codelaw's starter catalogue | manual |
|
|
76
|
+
| `json/package-json-schema` | SchemaStore `package.json` | manual |
|
|
77
|
+
| `json/tsconfig-schema` | SchemaStore `tsconfig.json` | manual |
|
|
78
|
+
| `toml/pyproject-schema` | SchemaStore `pyproject.json` | manual |
|
|
79
|
+
| `yaml/gha-workflow-schema` | SchemaStore `github-workflow.json` | manual |
|
|
80
|
+
| `yaml/gha-action-schema` | SchemaStore `github-action.json` | manual |
|
|
81
|
+
|
|
82
|
+
The JSON, YAML and TOML rules come from the formats' specifications (RFC 8259,
|
|
83
|
+
YAML 1.2.2 and its YAML 1.1 differences, TOML 1.0.0) and the Python packaging
|
|
84
|
+
specifications (PEP 503 names, PEP 621 `[project]`). yamllint (GPL-3.0) is not
|
|
85
|
+
a source: no code, documentation text, options or messages are taken from it.
|
|
86
|
+
One rule name coincides with one of yamllint's — `yaml/document-start` and its
|
|
87
|
+
`document-start`: both describe the same `---` marker.
|
|
88
|
+
|
|
89
|
+
## How the ports differ
|
|
90
|
+
|
|
91
|
+
| rule | difference |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `md/heading-increment` | has a fix: it renumbers the outline, so a raised heading's subsections move with it |
|
|
94
|
+
| `md/single-h1` | the first level-1 heading anywhere is the title; markdownlint only checks when the file's first line is one |
|
|
95
|
+
| `md/no-duplicate-heading` | `siblings_only` defaults to `true` (markdownlint: `false`), so a changelog's repeated `### Fixed` under each version is fine |
|
|
96
|
+
| `md/no-bare-urls` | URLs only, not e-mail addresses; `git+https://…` and the URL of a link the parser rejected are left alone |
|
|
97
|
+
| `md/no-emphasis-as-heading` | only paragraphs at the top level, and not emphasis wrapped around a link |
|
|
98
|
+
| `md/no-alt-text` | Markdown images only; HTML `<img>` is the HTML pack's `html/img-alt` |
|
|
99
|
+
| `md/link-fragments` | no fix and no `ignored_pattern` option |
|
|
100
|
+
| `md/no-inline-html` | in `data/conventions`, not `md/recommended`: most READMEs use HTML for layout; no `table_allowed_elements` option |
|
|
101
|
+
| `md/reference-links-images`, `md/link-image-reference-definitions`, `md/link-fragments` | a definition whose destination starts with `#` counts, although the Markdown grammar reads it as a paragraph |
|
|
102
|
+
| `yaml/no-ambiguous-booleans` | `y` and `n` aren't reported: common YAML 1.1 loaders (PyYAML, Psych) read them as strings |
|
|
103
|
+
| `json/package-scripts-sorted` | a `scripts` object that uses `npm-run-all`, `run-s` or `run-p` is left alone, as sort-package-json does, because those runners expand `build:*` in written order |
|
|
104
|
+
| `json/tsconfig-strict` | a config that `extends` another and doesn't set `strict` is left alone |
|
|
105
|
+
| the five `*-schema` rules | a `$ref` to another SchemaStore file accepts any value (nothing is fetched); `oneOf` is read as `anyOf`; a `pattern` the engine's regular expressions can't read (look-around, back-references) accepts any value; `format` isn't checked; a YAML key with no value isn't checked |
|
|
106
|
+
| `json/package-deps-sorted` | names compare by code point, not by locale as npm's `localeCompare` does; the two orders differ only where names differ by `_` against `-` or `.`, or by capitals, which new npm names cannot have |
|
|
107
|
+
|
|
108
|
+
## Not ported, and why
|
|
109
|
+
|
|
110
|
+
| rule | why |
|
|
111
|
+
|---|---|
|
|
112
|
+
| markdownlint MD043 `required-headings` | does nothing until configured with a heading list; a later version |
|
|
113
|
+
| markdownlint MD044 `proper-names` | does nothing until configured with a list of names; a later version |
|
|
114
|
+
| markdownlint MD054 `link-image-style` | every style is allowed by default, so the default set does nothing; a style choice |
|
|
115
|
+
| markdownlint MD003, MD004, MD005, MD007, MD009, MD010, MD012, MD013, MD018–MD023, MD026–MD032, MD035, MD037–MD039, MD046–MD050, MD055, MD058, MD060 | **never: layout** — heading and list markers, indentation, spacing, blank lines, line length, trailing punctuation, emphasis, fence and table-pipe style belong to the formatter (L7, SR-FORMATTER decision 3) |
|
|
116
|
+
|
|
117
|
+
## Upstream versions
|
|
118
|
+
|
|
119
|
+
- markdownlint **0.42.0** (MIT) — the rule set and documented behaviour ported.
|
|
120
|
+
- YAML 1.2.2 and YAML 1.1 (the type repository's `bool`, `int` and base-60 forms) — the ambiguity rules.
|
|
121
|
+
- TOML 1.0.0 — `toml/no-duplicate-keys`.
|
|
122
|
+
- PEP 503, PEP 621 — `toml/deps-sorted`, `toml/pyproject-requires-python`.
|
|
123
|
+
- sort-package-json (MIT) — the `pre`/`post` grouping and the `npm-run-all` exemption of `json/package-scripts-sorted`, and the sorted dependency lists of `json/package-deps-sorted`.
|
|
124
|
+
- SchemaStore (Apache-2.0), as served at `json.schemastore.org` on 2026-10-20 — the five schemas in `data/schemas/`.
|
|
125
|
+
|
|
126
|
+
## Data
|
|
127
|
+
|
|
128
|
+
| table | from | read by |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| `schemas/package` | SchemaStore `package.json` | `json/package-json-schema` |
|
|
131
|
+
| `schemas/tsconfig` | SchemaStore `tsconfig.json` | `json/tsconfig-schema` |
|
|
132
|
+
| `schemas/pyproject` | SchemaStore `pyproject.json` | `toml/pyproject-schema` |
|
|
133
|
+
| `schemas/github-workflow` | SchemaStore `github-workflow.json` | `yaml/gha-workflow-schema` |
|
|
134
|
+
| `schemas/github-action` | SchemaStore `github-action.json` | `yaml/gha-action-schema` |
|
|
135
|
+
|
|
136
|
+
Each is the SchemaStore schema with its annotation-only keywords removed
|
|
137
|
+
(`description`, `markdownDescription`, `title`, `default`, `examples`,
|
|
138
|
+
`$comment`, `deprecationMessage` and the editor-specific `x-*`, `tsType` and
|
|
139
|
+
`allowTrailingCommas` keys) and written without whitespace; every validation
|
|
140
|
+
keyword is kept as published. The NOTICE carries SchemaStore's licence.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
codelaw_rules_data/LICENSE,sha256=_R8NFLyGiKUo7mPzbUGbqg3hdEKYhaTsIgBGXqtFfa8,1097
|
|
2
|
+
codelaw_rules_data/NOTICE,sha256=l7SH_FA-g7NG82I2kVc1c_4iqDogGVV2b0CG85ECUIQ,1820
|
|
3
|
+
codelaw_rules_data/README.md,sha256=l6KGQyCce9FxWfHxCPJus-tnxtu03U7hV9wQePq4jag,8608
|
|
4
|
+
codelaw_rules_data/codelaw-pack.toml,sha256=IgZRYiqfB_mVisjOEWD70MTeX7XFh8V2vBPhhv7YPNc,348
|
|
5
|
+
codelaw_rules_data/corpus.toml,sha256=vtN1c-gEq4s-sehfrTfy6FTndZphqf85YuqbMAN6PWE,1200
|
|
6
|
+
codelaw_rules_data/data/schemas/github-action.json,sha256=cSPN1ebogh5N9OzhOGCCWEKz3KPzS_UM_KrzAVzOIo8,6775
|
|
7
|
+
codelaw_rules_data/data/schemas/github-workflow.json,sha256=OS6RB4O7Fv3_i2GBwoz6fuxY2HaE2gfYfIwGq6ngyE4,20837
|
|
8
|
+
codelaw_rules_data/data/schemas/package.json,sha256=o1xQlOpH4AbCEfdyUpF9fX7kb_hkoULxXs6AYvmx800,13975
|
|
9
|
+
codelaw_rules_data/data/schemas/pyproject.json,sha256=PZN0eHAHiVWaQEbBehld7nKBdB0DQn6IQRdaUYtCpYg,8331
|
|
10
|
+
codelaw_rules_data/data/schemas/tsconfig.json,sha256=_eH2yKRzVmWFKgiRgS78AP3aGwxKs3QRmGHSmdVLoZA,20223
|
|
11
|
+
codelaw_rules_data/licenses/SchemaStore-Apache-2.0.txt,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
12
|
+
codelaw_rules_data/presets/data/conventions.toml,sha256=tWCBz11kR6VGrP8uqcmwe5_J6IkdphB1M9W1BktuCsI,132
|
|
13
|
+
codelaw_rules_data/presets/data/github-actions.toml,sha256=WMFf8RzrhL-gXZ8E1CM6l_Zja7Ep6ExHmVr6q8drpHo,190
|
|
14
|
+
codelaw_rules_data/presets/data/package-json.toml,sha256=WEGIryo5GqtUfSMDstcBtHwPYysbnAi6r_SQok2YGsg,200
|
|
15
|
+
codelaw_rules_data/presets/data/pyproject.toml,sha256=4Gsq8578i_Q7OKJcHw5U5UeBWVDZ3pTvCUIt0iq-kWg,162
|
|
16
|
+
codelaw_rules_data/presets/data/recommended.toml,sha256=9eKinHbYPTyvuKN4qvLKgHBoN1YpCExtqQrDmD8mmBg,376
|
|
17
|
+
codelaw_rules_data/presets/data/tsconfig.toml,sha256=8uIqT_-ts07emrFxmUOWViwnMyKPCKPsWIt7aJ4ccD0,122
|
|
18
|
+
codelaw_rules_data/presets/md/recommended.toml,sha256=aiBE_RxpFckOnPTG4lfl3V5s99eLIGxSUuDK0WGpOdE,728
|
|
19
|
+
codelaw_rules_data/rules/json/no-duplicate-keys.cases.md,sha256=RuWRGu_ltWMWlj7GU3_fKVaCGW8Ul62Iz_trsjBLNmw,288
|
|
20
|
+
codelaw_rules_data/rules/json/no-duplicate-keys.md,sha256=v5ih3gdjSEH_Q4aIQolLDKPUrrXiVg4_YORXncgyttE,829
|
|
21
|
+
codelaw_rules_data/rules/json/package-deps-sorted.cases.md,sha256=bulBiz56pPtGHpmpH9QWPP8rxX26h5rYOTYuFGqZhRA,1298
|
|
22
|
+
codelaw_rules_data/rules/json/package-deps-sorted.md,sha256=0cdFVR385vIbWPnbbPcNg6Cj7TPep9ABzHJB85Tn9sE,1388
|
|
23
|
+
codelaw_rules_data/rules/json/package-engines.cases.md,sha256=NKF9HSFpMiCIYXsiEb_0NwPUns8ciYr6p_nPcg8VqP4,240
|
|
24
|
+
codelaw_rules_data/rules/json/package-engines.md,sha256=25mRzlV1djL_s92aUJl05fqnW7sshK8sRQf2lVm-8Bs,942
|
|
25
|
+
codelaw_rules_data/rules/json/package-json-schema.md,sha256=id8RJXnSpsur_SqovPg8spU6Bq61OF85Lc0GEJmKAU0,1748
|
|
26
|
+
codelaw_rules_data/rules/json/package-scripts-sorted.cases.md,sha256=DajpGCFKIAVSI91AANtsfrANbg3MxUQhKz4tMLR18VM,569
|
|
27
|
+
codelaw_rules_data/rules/json/package-scripts-sorted.md,sha256=FiifmSclXd8hfx6zAfDxjO0jEjodQ-7a4-0cQTAyET4,1287
|
|
28
|
+
codelaw_rules_data/rules/json/tsconfig-schema.md,sha256=A2XxCmtTjSgISKZRXugZ14xston506ymOuCQLXta8m8,1612
|
|
29
|
+
codelaw_rules_data/rules/json/tsconfig-strict.cases.md,sha256=wMvDP70slEFENpBEIBwd0YlqvopgBUR-c1kdCB2EgpE,591
|
|
30
|
+
codelaw_rules_data/rules/json/tsconfig-strict.md,sha256=BIYl-WcL4mx-zjVxBOqE0FTD90Zw3gllhFM1ows4uoQ,938
|
|
31
|
+
codelaw_rules_data/rules/md/commands-show-output.cases.md,sha256=ZPHk5RYUj5JetPR2iTk6Tsv-GmK2r0xoHgO9zDi9rYI,136
|
|
32
|
+
codelaw_rules_data/rules/md/commands-show-output.md,sha256=k7dZptjSbmeiw8g58ssImt83W5PV0rf2Lf14o7sMLB8,650
|
|
33
|
+
codelaw_rules_data/rules/md/descriptive-link-text.md,sha256=wa-StX7ijlXJK8GM8sMiHvDeRyODBZVnzUC6NBtxJrY,949
|
|
34
|
+
codelaw_rules_data/rules/md/fence-language.md,sha256=w95MPyGm4Qv3GMNfGviWEgM4N7sYwBv5cfp_QCaYFRo,951
|
|
35
|
+
codelaw_rules_data/rules/md/first-line-heading.cases.md,sha256=xSgnJ_KxuZtTtplPeDxopxLlZN4ImzMH2tj0uop0j8k,263
|
|
36
|
+
codelaw_rules_data/rules/md/first-line-heading.md,sha256=zrA1XvP3_g_Bm9zQ-DV9LL2dEKwfuNucWZbUoDQRPnA,1019
|
|
37
|
+
codelaw_rules_data/rules/md/heading-increment.cases.md,sha256=kUocv0QpCHzve6tX2TyjEtdR9QmDnXCoMUtDytxfAxg,455
|
|
38
|
+
codelaw_rules_data/rules/md/heading-increment.md,sha256=H5my67iWplCoHaCEFGU_581qN7b2X5ROC55F0IRO3vQ,962
|
|
39
|
+
codelaw_rules_data/rules/md/link-fragments.cases.md,sha256=imL6jLpCksEOiJJxDbHxtgtk8MjEUj6qFg35B9-SPGo,579
|
|
40
|
+
codelaw_rules_data/rules/md/link-fragments.md,sha256=FOKLn61PJ8qnBZ_oJRji4aoXJUBj3WqE-00Jh_aH1F0,1190
|
|
41
|
+
codelaw_rules_data/rules/md/link-image-reference-definitions.cases.md,sha256=-KN4mEW0cwlp6WzSrTfjjL85SmObF457iy_lEqGgV8M,549
|
|
42
|
+
codelaw_rules_data/rules/md/link-image-reference-definitions.md,sha256=HyJzmaEOJb8evAkCOqYIrR2BYri7UK67x0VEio26KCo,929
|
|
43
|
+
codelaw_rules_data/rules/md/no-alt-text.md,sha256=OlCWDnFM1K2s45Gc_ZPk2_KGc4KWylRbl8u9uk-_Vf4,1075
|
|
44
|
+
codelaw_rules_data/rules/md/no-bare-urls.cases.md,sha256=6jFZIexOr9HCO8LyS37Ip3ISAstnvvs6qjeZs5TUJ3Q,543
|
|
45
|
+
codelaw_rules_data/rules/md/no-bare-urls.md,sha256=bjB25tWP7BiLMnkV4ohvUutcKKQCuD2b9OLBP_40InQ,693
|
|
46
|
+
codelaw_rules_data/rules/md/no-duplicate-heading.cases.md,sha256=DX4vd5jDFSRi3_IX7JUvapdF_kym3_0UGdD7a9ISViI,160
|
|
47
|
+
codelaw_rules_data/rules/md/no-duplicate-heading.md,sha256=kvEc5j2yHpRRaXCFrfF0QbNQ4ELYi5nj849RSVi8_Ro,1242
|
|
48
|
+
codelaw_rules_data/rules/md/no-emphasis-as-heading.cases.md,sha256=Qv5tErj4IsrKz-xdOsVCjOi9W8Smybhh6a7CMROnVcY,268
|
|
49
|
+
codelaw_rules_data/rules/md/no-emphasis-as-heading.md,sha256=E1DrnYfDc4mIk2MxApQrD8Ihi9GX5HPSXI_XyqcCStI,1047
|
|
50
|
+
codelaw_rules_data/rules/md/no-empty-links.md,sha256=ScjxIN4sO2mNnCiCeK6Takacsh4tju9HL2c9Hekq0A8,896
|
|
51
|
+
codelaw_rules_data/rules/md/no-inline-html.cases.md,sha256=2DqwLGjyqDI6W2e4F9yYMCY9XJ3wZf9dZnVsq_q1BWA,141
|
|
52
|
+
codelaw_rules_data/rules/md/no-inline-html.md,sha256=MkSRM9WB-GE8UeGwctr_6jBnBc6_9V8ZzkidMooj05I,1163
|
|
53
|
+
codelaw_rules_data/rules/md/no-reversed-links.md,sha256=v1GKvRnyVxZz34UdSqc5FbKQdn23U7sl4V0USxJJPys,619
|
|
54
|
+
codelaw_rules_data/rules/md/reference-links-images.cases.md,sha256=FyBWfspScYeW83infJK9sAEDzQyH1S4TEXllKPgYXgM,397
|
|
55
|
+
codelaw_rules_data/rules/md/reference-links-images.md,sha256=TU60ES_cRp76_D_scUAwdAEs1adJDb0-gdyt7uqiyAg,1164
|
|
56
|
+
codelaw_rules_data/rules/md/relative-links.md,sha256=fPIe3zLjVsdojJMd-ftWBXy2p05AEVVyzZuazmRyYqw,1301
|
|
57
|
+
codelaw_rules_data/rules/md/single-h1.cases.md,sha256=NdviO_ZFJbmfzhIfGnCCLwDdHWt20VwVfH9MDN1DuBo,238
|
|
58
|
+
codelaw_rules_data/rules/md/single-h1.md,sha256=XtTK7llHZobybe6KauTSUq6Ss1cOiKmC94CxfIorBws,1182
|
|
59
|
+
codelaw_rules_data/rules/md/table-column-count.md,sha256=6UlXNqkLDBxq3cqVBhrKl8hwnFjbUE4zdQSlazkZQMc,842
|
|
60
|
+
codelaw_rules_data/rules/toml/deps-sorted.cases.md,sha256=pOsXpMatYLFfkA1amiPpKLEJbd8pQqeXtr7HRb9--2w,394
|
|
61
|
+
codelaw_rules_data/rules/toml/deps-sorted.md,sha256=ES0oZ8nVwTZy2AQOxnJPrVLie81ptgdss2UVpNMNNSc,994
|
|
62
|
+
codelaw_rules_data/rules/toml/no-duplicate-keys.cases.md,sha256=ZMhmOGBajyZLb_2gvuXZ745cnNiPgGj2KPoyw27MP3Y,390
|
|
63
|
+
codelaw_rules_data/rules/toml/no-duplicate-keys.md,sha256=3iRQQKOx8LswZ1UQAmd58w2xSeT4XkFJLLN8vwfoBms,927
|
|
64
|
+
codelaw_rules_data/rules/toml/pyproject-requires-python.cases.md,sha256=jo3t8rh6EupgxHKVvRyksVMGp-y3oXPb5fBucf6sMIg,267
|
|
65
|
+
codelaw_rules_data/rules/toml/pyproject-requires-python.md,sha256=W-8_Doal6FZss_QHTj9BI-x36bjn9sBfd2AS44AqoeU,1043
|
|
66
|
+
codelaw_rules_data/rules/toml/pyproject-schema.md,sha256=CnS709smcCxrTRE4Ky2-T_ZP7RphMIgOMXdzxHP91sg,1650
|
|
67
|
+
codelaw_rules_data/rules/yaml/document-start.cases.md,sha256=YsH3cy_jsWSESerTre5TiYPGpEZEkUfXwgKwqZlPJ2Y,292
|
|
68
|
+
codelaw_rules_data/rules/yaml/document-start.md,sha256=YxGVHFQ59mq9w8bQ5w69aBKjXfHHa-ZsBBfUqqWYV6A,669
|
|
69
|
+
codelaw_rules_data/rules/yaml/gha-action-schema.md,sha256=mXm_hYnFODMjKf4ufPZ0Sn9d632U2Vso3DbE_b2FWPw,1564
|
|
70
|
+
codelaw_rules_data/rules/yaml/gha-pin-sha.cases.md,sha256=oxIldHvEbtPiMhudJ-RX2ja51ubstXChy0sq9fLFNiU,337
|
|
71
|
+
codelaw_rules_data/rules/yaml/gha-pin-sha.md,sha256=2JdXcS1pBXp6tzVz14KorA76kCqngWuhBN-TZg_hGro,1669
|
|
72
|
+
codelaw_rules_data/rules/yaml/gha-workflow-schema.md,sha256=aOmrJ9DO8NSseJI1ZL-3iW6CNNGkXCy6u-qw3DReWrE,1651
|
|
73
|
+
codelaw_rules_data/rules/yaml/no-ambiguous-booleans.cases.md,sha256=y_FjSnyk7W5l0zGhqKzMAR-UpxVAJtU1W0R0vXKBhfw,311
|
|
74
|
+
codelaw_rules_data/rules/yaml/no-ambiguous-booleans.md,sha256=eE0i46gNeIuRVLtAYjz8L3DKwVvdBnnNe6OD-vhT1rQ,1066
|
|
75
|
+
codelaw_rules_data/rules/yaml/no-ambiguous-numbers.cases.md,sha256=yS7OPrFnGepj3iO96qnb7oPOY21GkGOo83cLLtrAybA,267
|
|
76
|
+
codelaw_rules_data/rules/yaml/no-ambiguous-numbers.md,sha256=aWjA4ocQtt-fq_UG_lQmDljblL9WiS5q6hj2sHo_NRk,1069
|
|
77
|
+
codelaw_rules_data/rules/yaml/no-duplicate-keys.cases.md,sha256=BNZA6IwAYq92TGdCDfXwrhTzpDzSgQ7TrSW2clOYwjQ,357
|
|
78
|
+
codelaw_rules_data/rules/yaml/no-duplicate-keys.md,sha256=hXzlrq_etIdfU339uqBE6Y7Mmf05WFOo1ZMSVynV-88,800
|
|
79
|
+
codelaw_rules_data/rules/yaml/no-undeclared-alias.cases.md,sha256=N2PC3IATAC2ltV1J-SbmBxkk9hQv-HFJkTzozs9oszs,170
|
|
80
|
+
codelaw_rules_data/rules/yaml/no-undeclared-alias.md,sha256=d6sZLaWkJWK32JQ-Lxz2YAXrzm8Vpa1e00uftDm5QIg,897
|
|
81
|
+
codelaw_rules_data-0.2.0.dist-info/METADATA,sha256=WeQGbkQSDveMHQ39CUEIBsCAqCK_S6FlYD3hxWT5XaM,8918
|
|
82
|
+
codelaw_rules_data-0.2.0.dist-info/WHEEL,sha256=iL940CG79gUG1gJG0fuOXtdNe75u1bVsFzkAeObStpM,97
|
|
83
|
+
codelaw_rules_data-0.2.0.dist-info/licenses/LICENSE,sha256=_R8NFLyGiKUo7mPzbUGbqg3hdEKYhaTsIgBGXqtFfa8,1097
|
|
84
|
+
codelaw_rules_data-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arpit Arya
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
SPDX-License-Identifier: MIT
|