@neralabs/rerail-pack-next 0.1.5 → 0.1.6
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.
- package/README.md +6 -5
- package/pack.json +26 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,14 +15,15 @@ The pack follows the [pack structure and validation contract](../../docs/pack-fo
|
|
|
15
15
|
| `rules/` | The code-rule documents (`rerail.policy/v1`) |
|
|
16
16
|
| `conformance.json` | Each ported rule's upstream rule, how findings compare, and the capabilities it exercises, the shipped rules first and then the candidates; the pinned plugin |
|
|
17
17
|
| `upstream/eslint-plugin-next/` | The plugin's copied rule tests (`tests/`) and the cases extracted from them (`fixtures/`, their rename variants under `fixtures/renamed/`), its expected findings (`fixtures.expected.json`) and case list (`fixtures.cases.json`), the generator (`generate.mjs`), and the lock naming its real-code samples (`samples.lock`) with their sources and licences (`SAMPLES.md`). The tests, cases and expected findings are pack test data, derived from the pins (`npm run fixtures:derive`) and archived in S3; `npm run fixtures:pull` fetches them and the samples |
|
|
18
|
-
| `candidates/` | Ports that cannot pass their fixtures yet or that fail the conformance check (`rules/`, none today; scored through `conformance.json`, never gating)
|
|
18
|
+
| `candidates/` | Ports that cannot pass their fixtures yet or that fail the conformance check (`rules/`, none today; scored through `conformance.json`, never gating) and the Next fact model's probes (`probes/`) |
|
|
19
19
|
| `licenses/next.js/` | Next.js's licence and `UPSTREAM.md`, per upstream repository: its source, the patterns of the files taken and how (each file's provenance is `provenance.json` in the tool's test-data archive) |
|
|
20
20
|
|
|
21
|
-
The rule documents, `conformance.json`'s and `pack.json`'s rule lists and the candidates are generated, offline
|
|
21
|
+
The rule documents, `conformance.json`'s and `pack.json`'s rule lists and the candidates are generated, offline, by
|
|
22
|
+
`scripts/generate/packs/next-policies.mjs` and `next-probes.mjs` ([scripts/generate/README.md](../../scripts/generate/README.md)):
|
|
22
23
|
|
|
23
24
|
```sh
|
|
24
|
-
node packs/next
|
|
25
|
-
node packs/next
|
|
25
|
+
node scripts/generate/packs/next-policies.mjs
|
|
26
|
+
node scripts/generate/packs/next-probes.mjs
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
Taking a new snapshot is a maintainer deriving the pack's test data from its pins and publishing it
|
|
@@ -46,7 +47,7 @@ node --import tsx conformance/languages/cli.ts --pack next --rule next-no-img-el
|
|
|
46
47
|
|
|
47
48
|
What each rule matches beyond its one-line description: exact matching, edge cases, upstream settings and known divergences.
|
|
48
49
|
|
|
49
|
-
All rules in this chunk are ports of `@next/eslint-plugin-next` 16.3.8 (rule `@next/next/<name>`). Note: the rule documents are generated by `packs/next
|
|
50
|
+
All rules in this chunk are ports of `@next/eslint-plugin-next` 16.3.8 (rule `@next/next/<name>`). Note: the rule documents are generated by `scripts/generate/packs/next-policies.mjs`, which prefixes each description with the upstream version and rule code (line ~140); re-running it overwrites the rewritten descriptions unless the generator is updated too.
|
|
50
51
|
|
|
51
52
|
### `next-google-font-display`
|
|
52
53
|
|
package/pack.json
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"id": "next-no-img-element",
|
|
23
23
|
"document": "rules/next-no-img-element.json",
|
|
24
24
|
"title": "No img element",
|
|
25
|
-
"mode": "log",
|
|
26
25
|
"group": "Next.js",
|
|
26
|
+
"mode": "log",
|
|
27
27
|
"examples": {
|
|
28
28
|
"caught": {
|
|
29
29
|
"path": "app/page.tsx",
|
|
@@ -39,15 +39,15 @@
|
|
|
39
39
|
"id": "next-no-head-element",
|
|
40
40
|
"document": "rules/next-no-head-element.json",
|
|
41
41
|
"title": "No head element",
|
|
42
|
-
"
|
|
43
|
-
"
|
|
42
|
+
"group": "Next.js",
|
|
43
|
+
"mode": "log"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"id": "next-no-sync-scripts",
|
|
47
47
|
"document": "rules/next-no-sync-scripts.json",
|
|
48
48
|
"title": "No sync scripts",
|
|
49
|
-
"mode": "log",
|
|
50
49
|
"group": "Next.js",
|
|
50
|
+
"mode": "log",
|
|
51
51
|
"examples": {
|
|
52
52
|
"caught": {
|
|
53
53
|
"path": "pages/index.tsx",
|
|
@@ -63,36 +63,36 @@
|
|
|
63
63
|
"id": "next-no-css-tags",
|
|
64
64
|
"document": "rules/next-no-css-tags.json",
|
|
65
65
|
"title": "No css tags",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
66
|
+
"group": "Next.js",
|
|
67
|
+
"mode": "log"
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"id": "next-google-font-display",
|
|
71
71
|
"document": "rules/next-google-font-display.json",
|
|
72
72
|
"title": "Google font display",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
73
|
+
"group": "Next.js",
|
|
74
|
+
"mode": "log"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"id": "next-google-font-preconnect",
|
|
78
78
|
"document": "rules/next-google-font-preconnect.json",
|
|
79
79
|
"title": "Google font preconnect",
|
|
80
|
-
"
|
|
81
|
-
"
|
|
80
|
+
"group": "Next.js",
|
|
81
|
+
"mode": "log"
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"id": "next-next-script-for-ga",
|
|
85
85
|
"document": "rules/next-next-script-for-ga.json",
|
|
86
86
|
"title": "Next script for ga",
|
|
87
|
-
"
|
|
88
|
-
"
|
|
87
|
+
"group": "Next.js",
|
|
88
|
+
"mode": "log"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"id": "next-no-unwanted-polyfillio",
|
|
92
92
|
"document": "rules/next-no-unwanted-polyfillio.json",
|
|
93
93
|
"title": "No unwanted polyfillio",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
94
|
+
"group": "Next.js",
|
|
95
|
+
"mode": "log"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"id": "next-no-assign-module-variable",
|
|
@@ -126,8 +126,8 @@
|
|
|
126
126
|
"id": "next-no-styled-jsx-in-document",
|
|
127
127
|
"document": "rules/next-no-styled-jsx-in-document.json",
|
|
128
128
|
"title": "No styled jsx in document",
|
|
129
|
-
"mode": "log",
|
|
130
129
|
"group": "Next.js",
|
|
130
|
+
"mode": "log",
|
|
131
131
|
"examples": {
|
|
132
132
|
"caught": {
|
|
133
133
|
"path": "pages/_document.tsx",
|
|
@@ -143,8 +143,8 @@
|
|
|
143
143
|
"id": "next-no-title-in-document-head",
|
|
144
144
|
"document": "rules/next-no-title-in-document-head.json",
|
|
145
145
|
"title": "No title in document head",
|
|
146
|
-
"mode": "log",
|
|
147
146
|
"group": "Next.js",
|
|
147
|
+
"mode": "log",
|
|
148
148
|
"examples": {
|
|
149
149
|
"caught": {
|
|
150
150
|
"path": "pages/_document.tsx",
|
|
@@ -182,15 +182,15 @@
|
|
|
182
182
|
"id": "next-no-async-client-component",
|
|
183
183
|
"document": "rules/next-no-async-client-component.json",
|
|
184
184
|
"title": "No async client component",
|
|
185
|
-
"
|
|
186
|
-
"
|
|
185
|
+
"group": "Next.js",
|
|
186
|
+
"mode": "log"
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
"id": "next-no-before-interactive-script-outside-document",
|
|
190
190
|
"document": "rules/next-no-before-interactive-script-outside-document.json",
|
|
191
191
|
"title": "No before interactive script outside document",
|
|
192
|
-
"
|
|
193
|
-
"
|
|
192
|
+
"group": "Next.js",
|
|
193
|
+
"mode": "log"
|
|
194
194
|
},
|
|
195
195
|
{
|
|
196
196
|
"id": "next-no-duplicate-head",
|
|
@@ -202,22 +202,22 @@
|
|
|
202
202
|
"id": "next-no-typos",
|
|
203
203
|
"document": "rules/next-no-typos.json",
|
|
204
204
|
"title": "No typos",
|
|
205
|
-
"
|
|
206
|
-
"
|
|
205
|
+
"group": "Next.js",
|
|
206
|
+
"mode": "log"
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
"id": "next-no-page-custom-font",
|
|
210
210
|
"document": "rules/next-no-page-custom-font.json",
|
|
211
211
|
"title": "No page custom font",
|
|
212
|
-
"
|
|
213
|
-
"
|
|
212
|
+
"group": "Next.js",
|
|
213
|
+
"mode": "log"
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
"id": "next-no-location-assign-relative-destination",
|
|
217
217
|
"document": "rules/next-no-location-assign-relative-destination.json",
|
|
218
218
|
"title": "No location assign relative destination",
|
|
219
|
-
"
|
|
220
|
-
"
|
|
219
|
+
"group": "Next.js",
|
|
220
|
+
"mode": "log"
|
|
221
221
|
}
|
|
222
222
|
]
|
|
223
223
|
}
|