@neralabs/rerail-pack-next 0.1.0 → 0.1.2

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.
@@ -0,0 +1,341 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "next-no-page-custom-font",
4
+ "revision": 1,
5
+ "mode": "steer",
6
+ "description": "@next/eslint-plugin-next 16.3.8 @next/next/no-page-custom-font: a <link> whose literal href is a Google Fonts CSS URL, unless the file is pages/_document (last `pages` piece starts with /_document) and the link is inside the default-exported component.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*.ts",
10
+ "**/*.mts",
11
+ "**/*.cts",
12
+ "**/*.tsx",
13
+ "**/*.js",
14
+ "**/*.jsx",
15
+ "**/*.mjs",
16
+ "**/*.cjs"
17
+ ],
18
+ "exclude": []
19
+ },
20
+ "clauses": [
21
+ {
22
+ "id": "page",
23
+ "forbid": {
24
+ "ast": {
25
+ "language": "typescript",
26
+ "file": {
27
+ "path": {
28
+ "notRegex": "pages(?:/_document(?:[^p]|p(?:p|ap|agp|agep)*(?:[^pa]|a[^gp]|ag[^ep]|age[^sp]))*(?:p(?:p|ap|agp|agep)*(?:a|ag|age)?)?)?$"
29
+ }
30
+ },
31
+ "rule": {
32
+ "all": [
33
+ {
34
+ "any": [
35
+ {
36
+ "kind": "jsx_opening_element"
37
+ },
38
+ {
39
+ "kind": "jsx_self_closing_element"
40
+ }
41
+ ]
42
+ },
43
+ {
44
+ "has": {
45
+ "field": "name",
46
+ "kind": "identifier",
47
+ "regex": "^link$"
48
+ }
49
+ },
50
+ {
51
+ "has": {
52
+ "kind": "jsx_attribute",
53
+ "all": [
54
+ {
55
+ "has": {
56
+ "kind": "property_identifier",
57
+ "regex": "^href$"
58
+ }
59
+ },
60
+ {
61
+ "has": {
62
+ "any": [
63
+ {
64
+ "kind": "string",
65
+ "value": {
66
+ "startsWith": "https://fonts.googleapis.com/css"
67
+ }
68
+ },
69
+ {
70
+ "kind": "jsx_expression",
71
+ "has": {
72
+ "kind": "string",
73
+ "value": {
74
+ "startsWith": "https://fonts.googleapis.com/css"
75
+ }
76
+ }
77
+ }
78
+ ]
79
+ }
80
+ }
81
+ ]
82
+ }
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ },
88
+ "violation": {
89
+ "anchor": "witness.span",
90
+ "code": "@next/next/no-page-custom-font",
91
+ "message": "Custom fonts not added in `pages/_document.js` will only load for a single page. This is discouraged. See: https://nextjs.org/docs/messages/no-page-custom-font",
92
+ "suppress": {
93
+ "eslint": {
94
+ "rules": [
95
+ "@next/next/no-page-custom-font"
96
+ ]
97
+ },
98
+ "oxlint": {
99
+ "rules": [
100
+ "no-page-custom-font"
101
+ ]
102
+ }
103
+ }
104
+ }
105
+ },
106
+ {
107
+ "id": "document",
108
+ "forbid": {
109
+ "ast": {
110
+ "language": "typescript",
111
+ "file": {
112
+ "path": {
113
+ "regex": "pages/_document(?:[^p]|p(?:p|ap|agp|agep)*(?:[^pa]|a[^gp]|ag[^ep]|age[^sp]))*(?:p(?:p|ap|agp|agep)*(?:a|ag|age)?)?$"
114
+ }
115
+ },
116
+ "rule": {
117
+ "all": [
118
+ {
119
+ "all": [
120
+ {
121
+ "any": [
122
+ {
123
+ "kind": "jsx_opening_element"
124
+ },
125
+ {
126
+ "kind": "jsx_self_closing_element"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "has": {
132
+ "field": "name",
133
+ "kind": "identifier",
134
+ "regex": "^link$"
135
+ }
136
+ },
137
+ {
138
+ "has": {
139
+ "kind": "jsx_attribute",
140
+ "all": [
141
+ {
142
+ "has": {
143
+ "kind": "property_identifier",
144
+ "regex": "^href$"
145
+ }
146
+ },
147
+ {
148
+ "has": {
149
+ "any": [
150
+ {
151
+ "kind": "string",
152
+ "value": {
153
+ "startsWith": "https://fonts.googleapis.com/css"
154
+ }
155
+ },
156
+ {
157
+ "kind": "jsx_expression",
158
+ "has": {
159
+ "kind": "string",
160
+ "value": {
161
+ "startsWith": "https://fonts.googleapis.com/css"
162
+ }
163
+ }
164
+ }
165
+ ]
166
+ }
167
+ }
168
+ ]
169
+ }
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "not": {
175
+ "inside": {
176
+ "stopBy": "end",
177
+ "any": [
178
+ {
179
+ "any": [
180
+ {
181
+ "kind": "function_declaration"
182
+ },
183
+ {
184
+ "kind": "function_expression"
185
+ }
186
+ ],
187
+ "inside": {
188
+ "kind": "export_statement",
189
+ "regex": "^export\\s+default\\s"
190
+ }
191
+ },
192
+ {
193
+ "all": [
194
+ {
195
+ "all": [
196
+ {
197
+ "any": [
198
+ {
199
+ "kind": "class_declaration"
200
+ },
201
+ {
202
+ "kind": "class",
203
+ "inside": {
204
+ "kind": "export_statement"
205
+ }
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "has": {
211
+ "kind": "class_heritage",
212
+ "any": [
213
+ {
214
+ "has": {
215
+ "kind": "identifier",
216
+ "pattern": "$D"
217
+ }
218
+ },
219
+ {
220
+ "has": {
221
+ "kind": "extends_clause",
222
+ "has": {
223
+ "field": "value",
224
+ "kind": "identifier",
225
+ "pattern": "$D"
226
+ }
227
+ }
228
+ }
229
+ ]
230
+ }
231
+ },
232
+ {
233
+ "inside": {
234
+ "kind": "program",
235
+ "stopBy": "end",
236
+ "has": {
237
+ "kind": "import_statement",
238
+ "all": [
239
+ {
240
+ "has": {
241
+ "field": "source",
242
+ "kind": "string",
243
+ "value": {
244
+ "eq": "next/document"
245
+ }
246
+ }
247
+ },
248
+ {
249
+ "has": {
250
+ "kind": "import_clause",
251
+ "has": {
252
+ "kind": "identifier",
253
+ "pattern": "$D"
254
+ }
255
+ }
256
+ }
257
+ ]
258
+ }
259
+ }
260
+ }
261
+ ]
262
+ },
263
+ {
264
+ "inside": {
265
+ "kind": "export_statement",
266
+ "regex": "^export\\s+default\\s"
267
+ }
268
+ }
269
+ ]
270
+ },
271
+ {
272
+ "all": [
273
+ {
274
+ "any": [
275
+ {
276
+ "kind": "function_declaration"
277
+ },
278
+ {
279
+ "kind": "class_declaration"
280
+ },
281
+ {
282
+ "kind": "function_expression"
283
+ },
284
+ {
285
+ "kind": "class"
286
+ },
287
+ {
288
+ "kind": "variable_declarator"
289
+ }
290
+ ]
291
+ },
292
+ {
293
+ "has": {
294
+ "field": "name",
295
+ "pattern": "$X"
296
+ }
297
+ },
298
+ {
299
+ "inside": {
300
+ "kind": "program",
301
+ "stopBy": "end",
302
+ "has": {
303
+ "kind": "export_statement",
304
+ "has": {
305
+ "field": "value",
306
+ "kind": "identifier",
307
+ "pattern": "$X"
308
+ }
309
+ }
310
+ }
311
+ }
312
+ ]
313
+ }
314
+ ]
315
+ }
316
+ }
317
+ }
318
+ ]
319
+ }
320
+ }
321
+ },
322
+ "violation": {
323
+ "anchor": "witness.span",
324
+ "code": "@next/next/no-page-custom-font",
325
+ "message": "Using `<link />` outside of `<Head>` will disable automatic font optimization. This is discouraged. See: https://nextjs.org/docs/messages/no-page-custom-font",
326
+ "suppress": {
327
+ "eslint": {
328
+ "rules": [
329
+ "@next/next/no-page-custom-font"
330
+ ]
331
+ },
332
+ "oxlint": {
333
+ "rules": [
334
+ "no-page-custom-font"
335
+ ]
336
+ }
337
+ }
338
+ }
339
+ }
340
+ ]
341
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": "rerail.policy/v1",
3
3
  "id": "next-no-script-component-in-head",
4
- "revision": 1,
4
+ "revision": 2,
5
5
  "mode": "steer",
6
6
  "description": "@next/eslint-plugin-next 16.3.8 @next/next/no-script-component-in-head: a <Head> element with a direct <Script> element child, in a file that imports next/head.",
7
7
  "scope": {
@@ -94,6 +94,11 @@
94
94
  "rules": [
95
95
  "@next/next/no-script-component-in-head"
96
96
  ]
97
+ },
98
+ "oxlint": {
99
+ "rules": [
100
+ "no-script-component-in-head"
101
+ ]
97
102
  }
98
103
  }
99
104
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": "rerail.policy/v1",
3
3
  "id": "next-no-styled-jsx-in-document",
4
- "revision": 1,
4
+ "revision": 2,
5
5
  "mode": "steer",
6
6
  "description": "@next/eslint-plugin-next 16.3.8 @next/next/no-styled-jsx-in-document: a <style> opening element with a `jsx` attribute in a file whose path, between its first and second `pages`, names a document.",
7
7
  "scope": {
@@ -73,6 +73,11 @@
73
73
  "rules": [
74
74
  "@next/next/no-styled-jsx-in-document"
75
75
  ]
76
+ },
77
+ "oxlint": {
78
+ "rules": [
79
+ "no-styled-jsx-in-document"
80
+ ]
76
81
  }
77
82
  }
78
83
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": "rerail.policy/v1",
3
3
  "id": "next-no-sync-scripts",
4
- "revision": 1,
4
+ "revision": 3,
5
5
  "mode": "steer",
6
6
  "description": "@next/eslint-plugin-next 16.3.8 @next/next/no-sync-scripts: a <script> opening element with a src attribute and neither async nor defer.",
7
7
  "scope": {
@@ -98,6 +98,16 @@
98
98
  "rules": [
99
99
  "@next/next/no-sync-scripts"
100
100
  ]
101
+ },
102
+ "oxlint": {
103
+ "rules": [
104
+ "no-sync-scripts"
105
+ ]
106
+ },
107
+ "biome": {
108
+ "rules": [
109
+ "lint/performance/noSyncScripts"
110
+ ]
101
111
  }
102
112
  }
103
113
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": "rerail.policy/v1",
3
3
  "id": "next-no-title-in-document-head",
4
- "revision": 1,
4
+ "revision": 2,
5
5
  "mode": "steer",
6
6
  "description": "@next/eslint-plugin-next 16.3.8 @next/next/no-title-in-document-head: the first <title> element child of a <Head> element, in a file with an import from next/document that binds the local name Head.",
7
7
  "scope": {
@@ -178,6 +178,11 @@
178
178
  "rules": [
179
179
  "@next/next/no-title-in-document-head"
180
180
  ]
181
+ },
182
+ "oxlint": {
183
+ "rules": [
184
+ "no-title-in-document-head"
185
+ ]
181
186
  }
182
187
  }
183
188
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": "rerail.policy/v1",
3
3
  "id": "next-no-typos",
4
- "revision": 1,
4
+ "revision": 2,
5
5
  "mode": "steer",
6
6
  "description": "@next/eslint-plugin-next 16.3.8 @next/next/no-typos: an exported function or variable whose name is one edit away from getStaticProps, getStaticPaths or getServerSideProps, in a file whose segment after the first `pages` is non-empty and not under /api.",
7
7
  "scope": {
@@ -89,6 +89,11 @@
89
89
  "rules": [
90
90
  "@next/next/no-typos"
91
91
  ]
92
+ },
93
+ "oxlint": {
94
+ "rules": [
95
+ "no-typos"
96
+ ]
92
97
  }
93
98
  }
94
99
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "format": "rerail.policy/v1",
3
3
  "id": "next-no-unwanted-polyfillio",
4
- "revision": 1,
4
+ "revision": 3,
5
5
  "mode": "steer",
6
6
  "description": "@next/eslint-plugin-next 16.3.8 @next/next/no-unwanted-polyfillio: a <script> (or the first local name an import from next/script binds) with a plain string src on a polyfill.io host whose first features parameter lists a feature Next.js already polyfills.",
7
7
  "scope": {
@@ -183,6 +183,16 @@
183
183
  "rules": [
184
184
  "@next/next/no-unwanted-polyfillio"
185
185
  ]
186
+ },
187
+ "oxlint": {
188
+ "rules": [
189
+ "no-unwanted-polyfillio"
190
+ ]
191
+ },
192
+ "biome": {
193
+ "rules": [
194
+ "lint/performance/noUnwantedPolyfillio"
195
+ ]
186
196
  }
187
197
  }
188
198
  }