gscan 4.26.1 → 4.29.0
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/bin/cli.js +8 -3
- package/lib/ast-linter/rules/index.js +2 -0
- package/lib/ast-linter/rules/lint-no-member-products-data-helper.js +24 -0
- package/lib/ast-linter/rules/lint-no-price-data-helper.js +24 -0
- package/lib/ast-linter/rules/lint-no-product-data-helper.js +2 -2
- package/lib/ast-linter/rules/lint-no-products-data-helper.js +2 -2
- package/lib/ast-linter/rules/lint-no-products-helper.js +2 -2
- package/lib/checks/050-koenig-css-classes.js +1 -1
- package/lib/specs/canary.js +221 -157
- package/lib/specs/v1.js +20 -20
- package/lib/specs/v2.js +71 -62
- package/lib/specs/v3.js +2 -1
- package/lib/specs/v4.js +7 -6
- package/lib/utils/package-json.js +2 -11
- package/package.json +13 -13
package/lib/specs/canary.js
CHANGED
|
@@ -10,62 +10,81 @@ const previousKnownHelpers = previousSpec.knownHelpers;
|
|
|
10
10
|
const previousTemplates = previousSpec.templates;
|
|
11
11
|
const previousRules = _.cloneDeep(previousSpec.rules);
|
|
12
12
|
|
|
13
|
+
const multiAuthorDesc = `Ghost allows multiple authors to be assigned to a post, so all helpers have been reworked to account for this.`;
|
|
14
|
+
const authorHelperDocs = `Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>`;
|
|
15
|
+
const tierDesc = `Ghost now supports multiple tiers and subscriptions. All product and price related helpers have been reworked to account for this.`;
|
|
16
|
+
|
|
13
17
|
// assign new or overwrite existing knownHelpers, templates, or rules here:
|
|
14
18
|
let knownHelpers = [];
|
|
15
19
|
let templates = [];
|
|
16
20
|
let rules = {
|
|
17
21
|
// New rules
|
|
18
22
|
'GS010-PJ-GHOST-API-PRESENT': {
|
|
19
|
-
level: '
|
|
20
|
-
rule: '
|
|
21
|
-
details: oneLineTrim`
|
|
22
|
-
|
|
23
|
-
Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
|
|
23
|
+
level: 'warning',
|
|
24
|
+
rule: 'Remove <code>"engines.ghost-api"</code> from <code>package.json</code>.',
|
|
25
|
+
details: oneLineTrim`The <code>"ghost-api"</code> version is no longer used and can be removed.<br>
|
|
26
|
+
Find more information about the <code>package.json</code> file <a href="${docsBaseUrl}packagejson/" target=_blank>here</a>.`
|
|
24
27
|
},
|
|
25
28
|
'GS090-NO-AUTHOR-HELPER-IN-POST-CONTEXT': {
|
|
26
29
|
level: 'error',
|
|
27
30
|
fatal: true,
|
|
28
|
-
rule: '
|
|
29
|
-
details: oneLineTrim`The <code>{{author}}</code> helper
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
rule: 'Replace <code>{{author}}</code> with <code>{{authors}}</code>',
|
|
32
|
+
details: oneLineTrim`The <code>{{author}}</code> helper was removed in favor of <code>{{<authors>}}</code><br>
|
|
33
|
+
${multiAuthorDesc}<br>
|
|
34
|
+
${authorHelperDocs}`,
|
|
32
35
|
helper: '{{author}}'
|
|
33
36
|
},
|
|
34
37
|
'GS090-NO-PRODUCTS-HELPER': {
|
|
35
38
|
level: 'error',
|
|
36
39
|
fatal: true,
|
|
37
|
-
rule: '
|
|
38
|
-
details: oneLineTrim`The <code>{{products}}</code> helper
|
|
39
|
-
|
|
40
|
+
rule: 'Replace <code>{{products}}</code> with <code>{{tiers}}</code>',
|
|
41
|
+
details: oneLineTrim`The <code>{{products}}</code> helper was removed in favor of <code>{{tiers}}</code><br>
|
|
42
|
+
${tierDesc}<br>
|
|
40
43
|
Find more information about the <code>{{tiers}}</code> property <a href="${docsBaseUrl}helpers/tiers/" target=_blank>here</a>.`,
|
|
41
44
|
helper: '{{products}}'
|
|
42
45
|
},
|
|
43
46
|
'GS090-NO-PRODUCT-DATA-HELPER': {
|
|
44
47
|
level: 'error',
|
|
45
48
|
fatal: true,
|
|
46
|
-
rule: '
|
|
47
|
-
details: oneLineTrim`The <code>{{@product}}</code> data helper
|
|
48
|
-
|
|
49
|
+
rule: 'Replace <code>{{@product}}</code> with <code>{{#get "tiers"}}</code>',
|
|
50
|
+
details: oneLineTrim`The <code>{{@product}}</code> data helper was removed in favor of <code>{{#get "tiers"}}</code><br>
|
|
51
|
+
${tierDesc}<br>
|
|
49
52
|
Find more information about the <code>{{#get "tiers"}}</code> property <a href="${docsBaseUrl}helpers/tiers/" target=_blank>here</a>.`,
|
|
50
53
|
helper: '{{@product}}'
|
|
51
54
|
},
|
|
52
55
|
'GS090-NO-PRODUCTS-DATA-HELPER': {
|
|
53
56
|
level: 'error',
|
|
54
57
|
fatal: true,
|
|
55
|
-
rule: '
|
|
56
|
-
details: oneLineTrim`The <code>{{@products}}</code> data helper
|
|
57
|
-
|
|
58
|
+
rule: 'Replace <code>{{@products}}</code> with <code>{{#get "tiers"}}</code>',
|
|
59
|
+
details: oneLineTrim`The <code>{{@products}}</code> data helper was removed in favor of <code>{{#get "tiers"}}</code><br>
|
|
60
|
+
${tierDesc}<br>
|
|
58
61
|
Find more information about the <code>{{#get "tiers"}}</code> property <a href="${docsBaseUrl}helpers/tiers/" target=_blank>here</a>.`,
|
|
59
62
|
helper: '{{@products}}'
|
|
60
63
|
},
|
|
64
|
+
'GS090-NO-MEMBER-PRODUCTS-DATA-HELPER': {
|
|
65
|
+
level: 'error',
|
|
66
|
+
rule: 'Replace <code>{{@member.products}}</code> with <code>{{@member.subscriptions}}</code>',
|
|
67
|
+
details: oneLineTrim`The <code>{{@member.products}}</code> helper was removed in favor of <code>{{@member.subscriptions}}</code><br>
|
|
68
|
+
${tierDesc}<br>
|
|
69
|
+
Find more information about the <code>{{@member.subscriptions}}</code> property <a href="${docsBaseUrl}members/#member-subscriptions" target=_blank>here</a>.`,
|
|
70
|
+
helper: '{{@member.products}}'
|
|
71
|
+
},
|
|
72
|
+
'GS090-NO-PRICE-DATA-HELPER': {
|
|
73
|
+
level: 'error',
|
|
74
|
+
fatal: true,
|
|
75
|
+
rule: 'Replace <code>{{@price}}</code> with <code>{{price}}</code> and <code>{{@member.subscriptions}}</code>',
|
|
76
|
+
details: oneLineTrim`The <code>{{@price}}</code> data helper was removed in favor of <code>{{price}}</code> and <code>{{@member.subscriptions}}</code><br>
|
|
77
|
+
${tierDesc}<br>
|
|
78
|
+
Find more information about the <code>{{price}}</code> helper <a href="${docsBaseUrl}members/#the-price-helper" target=_blank>here</a>.`,
|
|
79
|
+
helper: '{{@price}}'
|
|
80
|
+
},
|
|
61
81
|
|
|
62
82
|
// Updated v1 & v2 rules
|
|
63
83
|
'GS001-DEPR-BLOG': {
|
|
64
84
|
level: 'error',
|
|
65
85
|
fatal: true,
|
|
66
|
-
rule: '
|
|
67
|
-
details: oneLineTrim`
|
|
68
|
-
The <code>{{@blog}}</code> helper was removed in Ghost v5 and should not be used.
|
|
86
|
+
rule: 'Replace <code>{{@blog}}</code> with <code>{{@site}}</code>',
|
|
87
|
+
details: oneLineTrim`The usage of <code>{{@blog}}</code> is no longer supported and should be replaced with<code>{{@site}}</code>.<br>
|
|
69
88
|
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
70
89
|
regex: /{{\s*?@blog\.[a-zA-Z0-9_]+\s*?}}/g,
|
|
71
90
|
helper: '{{@blog}}'
|
|
@@ -73,290 +92,319 @@ let rules = {
|
|
|
73
92
|
'GS001-DEPR-AUTH-ID': {
|
|
74
93
|
level: 'error',
|
|
75
94
|
fatal: true,
|
|
76
|
-
rule: 'Replace
|
|
77
|
-
details: oneLineTrim`The usage of <code>{{author.id}}</code> is
|
|
95
|
+
rule: 'Replace <code>{{author.id}}</code> with <code>{{primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
|
|
96
|
+
details: oneLineTrim`The usage of <code>{{author.id}}</code> is no longer supported and should be replaced with either <code>{{primary_author.id}}</code>
|
|
78
97
|
or <code>{{authors.[#].id}}</code>.<br>
|
|
79
|
-
|
|
98
|
+
${multiAuthorDesc}<br>
|
|
99
|
+
${authorHelperDocs}`,
|
|
80
100
|
regex: /{{\s*?author\.id\s*?}}/g,
|
|
81
101
|
helper: '{{author.id}}'
|
|
82
102
|
},
|
|
83
103
|
'GS001-DEPR-AUTH-SLUG': {
|
|
84
104
|
level: 'error',
|
|
85
105
|
fatal: true,
|
|
86
|
-
rule: 'Replace
|
|
87
|
-
details: oneLineTrim`The usage of <code>{{author.slug}}</code> is
|
|
106
|
+
rule: 'Replace <code>{{author.slug}}</code> with <code>{{primary_author.slug}}</code> or <code>{{authors.[#].slug}}</code>',
|
|
107
|
+
details: oneLineTrim`The usage of <code>{{author.slug}}</code> is no longer supported and should be replaced with either <code>{{primary_author.slug}}</code>
|
|
88
108
|
or <code>{{authors.[#].slug}}</code>.<br>
|
|
89
|
-
|
|
109
|
+
${multiAuthorDesc}<br>
|
|
110
|
+
${authorHelperDocs}`,
|
|
90
111
|
regex: /{{\s*?author\.slug\s*?}}/g,
|
|
91
112
|
helper: '{{author.slug}}'
|
|
92
113
|
},
|
|
93
114
|
'GS001-DEPR-AUTH-MAIL': {
|
|
94
115
|
level: 'error',
|
|
95
116
|
fatal: true,
|
|
96
|
-
rule: 'Replace
|
|
97
|
-
details: oneLineTrim`The usage of <code>{{author.email}}</code> is
|
|
117
|
+
rule: 'Replace <code>{{author.email}}</code> with <code>{{primary_author.email}}</code> or <code>{{authors.[#].email}}</code>',
|
|
118
|
+
details: oneLineTrim`The usage of <code>{{author.email}}</code> is no longer supported and should be replaced with either <code>{{primary_author.email}}</code>
|
|
98
119
|
or <code>{{authors.[#].email}}</code>.<br>
|
|
99
|
-
|
|
120
|
+
${multiAuthorDesc}<br>
|
|
121
|
+
${authorHelperDocs}`,
|
|
100
122
|
regex: /{{\s*?author\.email\s*?}}/g,
|
|
101
123
|
helper: '{{author.email}}'
|
|
102
124
|
},
|
|
103
125
|
'GS001-DEPR-AUTH-MT': {
|
|
104
126
|
level: 'error',
|
|
105
127
|
fatal: true,
|
|
106
|
-
rule: 'Replace
|
|
107
|
-
details: oneLineTrim`The usage of <code>{{author.meta_title}}</code> is
|
|
128
|
+
rule: 'Replace <code>{{author.meta_title}}</code> with <code>{{primary_author.meta_title}}</code> or <code>{{authors.[#].meta_title}}</code>',
|
|
129
|
+
details: oneLineTrim`The usage of <code>{{author.meta_title}}</code> is no longer supported and should be replaced with either <code>{{primary_author.meta_title}}</code>
|
|
108
130
|
or <code>{{authors.[#].meta_title}}</code>.<br>
|
|
109
|
-
|
|
131
|
+
${multiAuthorDesc}<br>
|
|
132
|
+
${authorHelperDocs}`,
|
|
110
133
|
regex: /{{\s*?author\.meta_title\s*?}}/g,
|
|
111
134
|
helper: '{{author.meta_title}}'
|
|
112
135
|
},
|
|
113
136
|
'GS001-DEPR-AUTH-MD': {
|
|
114
137
|
level: 'error',
|
|
115
138
|
fatal: true,
|
|
116
|
-
rule: 'Replace
|
|
117
|
-
details: oneLineTrim`The usage of <code>{{author.meta_description}}</code> is
|
|
139
|
+
rule: 'Replace <code>{{author.meta_description}}</code> with <code>{{primary_author.meta_description}}</code> or <code>{{authors.[#].meta_description}}</code>',
|
|
140
|
+
details: oneLineTrim`The usage of <code>{{author.meta_description}}</code> is no longer supported and should be replaced with either <code>{{primary_author.meta_description}}</code>
|
|
118
141
|
or <code>{{authors.[#].meta_description}}</code>.<br>
|
|
119
|
-
|
|
142
|
+
${multiAuthorDesc}<br>
|
|
143
|
+
${authorHelperDocs}`,
|
|
120
144
|
regex: /{{\s*?author\.meta_description\s*?}}/g,
|
|
121
145
|
helper: '{{author.meta_description}}'
|
|
122
146
|
},
|
|
123
147
|
'GS001-DEPR-AUTH-NAME': {
|
|
124
148
|
level: 'error',
|
|
125
149
|
fatal: true,
|
|
126
|
-
rule: 'Replace
|
|
127
|
-
details: oneLineTrim`The usage of <code>{{author.name}}</code> is
|
|
150
|
+
rule: 'Replace <code>{{author.name}}</code> with <code>{{primary_author.name}}</code> or <code>{{authors.[#].name}}</code>',
|
|
151
|
+
details: oneLineTrim`The usage of <code>{{author.name}}</code> is no longer supported and should be replaced with either <code>{{primary_author.name}}</code>
|
|
128
152
|
or <code>{{authors.[#].name}}</code>.<br>
|
|
129
|
-
|
|
153
|
+
${multiAuthorDesc}<br>
|
|
154
|
+
${authorHelperDocs}`,
|
|
130
155
|
regex: /{{\s*?author\.name\s*?}}/g,
|
|
131
156
|
helper: '{{author.name}}'
|
|
132
157
|
},
|
|
133
158
|
'GS001-DEPR-AUTH-BIO': {
|
|
134
159
|
level: 'error',
|
|
135
160
|
fatal: true,
|
|
136
|
-
rule: 'Replace
|
|
137
|
-
details: oneLineTrim`The usage of <code>{{author.bio}}</code> is
|
|
161
|
+
rule: 'Replace <code>{{author.bio}}</code> with <code>{{primary_author.bio}}</code> or <code>{{authors.[#].bio}}</code>',
|
|
162
|
+
details: oneLineTrim`The usage of <code>{{author.bio}}</code> is no longer supported and should be replaced with either <code>{{primary_author.bio}}</code>
|
|
138
163
|
or <code>{{authors.[#].bio}}</code>.<br>
|
|
139
|
-
|
|
164
|
+
${multiAuthorDesc}<br>
|
|
165
|
+
${authorHelperDocs}`,
|
|
140
166
|
regex: /{{\s*?author\.bio\s*?}}/g,
|
|
141
167
|
helper: '{{author.bio}}'
|
|
142
168
|
},
|
|
143
169
|
'GS001-DEPR-AUTH-LOC': {
|
|
144
170
|
level: 'error',
|
|
145
171
|
fatal: true,
|
|
146
|
-
rule: 'Replace
|
|
147
|
-
details: oneLineTrim`The usage of <code>{{author.location}}</code> is
|
|
172
|
+
rule: 'Replace <code>{{author.location}}</code> with <code>{{primary_author.location}}</code> or <code>{{authors.[#].location}}</code>',
|
|
173
|
+
details: oneLineTrim`The usage of <code>{{author.location}}</code> is no longer supported and should be replaced with either <code>{{primary_author.location}}</code>
|
|
148
174
|
or <code>{{authors.[#].location}}</code>.<br>
|
|
149
|
-
|
|
175
|
+
${multiAuthorDesc}<br>
|
|
176
|
+
${authorHelperDocs}`,
|
|
150
177
|
regex: /{{\s*?author\.location\s*?}}/g,
|
|
151
178
|
helper: '{{author.location}}'
|
|
152
179
|
},
|
|
153
180
|
'GS001-DEPR-AUTH-WEB': {
|
|
154
181
|
level: 'error',
|
|
155
182
|
fatal: true,
|
|
156
|
-
rule: 'Replace
|
|
157
|
-
details: oneLineTrim`The usage of <code>{{author.website}}</code> is
|
|
183
|
+
rule: 'Replace <code>{{author.website}}</code> with <code>{{primary_author.website}}</code> or <code>{{authors.[#].website}}</code>',
|
|
184
|
+
details: oneLineTrim`The usage of <code>{{author.website}}</code> is no longer supported and should be replaced with either <code>{{primary_author.website}}</code>
|
|
158
185
|
or <code>{{authors.[#].website}}</code>.<br>
|
|
159
|
-
|
|
186
|
+
${multiAuthorDesc}<br>
|
|
187
|
+
${authorHelperDocs}`,
|
|
160
188
|
regex: /{{\s*?author\.website\s*?}}/g,
|
|
161
189
|
helper: '{{author.website}}'
|
|
162
190
|
},
|
|
163
191
|
'GS001-DEPR-AUTH-TW': {
|
|
164
192
|
level: 'error',
|
|
165
193
|
fatal: true,
|
|
166
|
-
rule: 'Replace
|
|
167
|
-
details: oneLineTrim`The usage of <code>{{author.twitter}}</code> is
|
|
194
|
+
rule: 'Replace <code>{{author.twitter}}</code> with <code>{{primary_author.twitter}}</code> or <code>{{authors.[#].twitter}}</code>',
|
|
195
|
+
details: oneLineTrim`The usage of <code>{{author.twitter}}</code> is no longer supported and should be replaced with either <code>{{primary_author.twitter}}</code>
|
|
168
196
|
or <code>{{authors.[#].twitter}}</code>.<br>
|
|
169
|
-
|
|
197
|
+
${multiAuthorDesc}<br>
|
|
198
|
+
${authorHelperDocs}`,
|
|
170
199
|
regex: /{{\s*?author\.twitter\s*?}}/g,
|
|
171
200
|
helper: '{{author.twitter}}'
|
|
172
201
|
},
|
|
173
202
|
'GS001-DEPR-AUTH-FB': {
|
|
174
203
|
level: 'error',
|
|
175
204
|
fatal: true,
|
|
176
|
-
rule: 'Replace
|
|
177
|
-
details: oneLineTrim`The usage of <code>{{author.facebook}}</code> is
|
|
205
|
+
rule: 'Replace <code>{{author.facebook}}</code> with <code>{{primary_author.facebook}}</code> or <code>{{authors.[#].facebook}}</code>',
|
|
206
|
+
details: oneLineTrim`The usage of <code>{{author.facebook}}</code> is no longer supported and should be replaced with either <code>{{primary_author.facebook}}</code>
|
|
178
207
|
or <code>{{authors.[#].facebook}}</code>.<br>
|
|
179
|
-
|
|
208
|
+
${multiAuthorDesc}<br>
|
|
209
|
+
${authorHelperDocs}`,
|
|
180
210
|
regex: /{{\s*?author\.facebook\s*?}}/g,
|
|
181
211
|
helper: '{{author.facebook}}'
|
|
182
212
|
},
|
|
183
213
|
'GS001-DEPR-AUTH-PIMG': {
|
|
184
214
|
level: 'error',
|
|
185
215
|
fatal: true,
|
|
186
|
-
rule: 'Replace
|
|
187
|
-
details: oneLineTrim`The usage of <code>{{author.profile_image}}</code> is
|
|
216
|
+
rule: 'Replace <code>{{author.profile_image}}</code> with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
|
|
217
|
+
details: oneLineTrim`The usage of <code>{{author.profile_image}}</code> is no longer supported and should be replaced with either <code>{{primary_author.profile_image}}</code>
|
|
188
218
|
or <code>{{authors.[#].profile_image}}</code>.<br>
|
|
189
|
-
|
|
219
|
+
${multiAuthorDesc}<br>
|
|
220
|
+
${authorHelperDocs}`,
|
|
190
221
|
regex: /{{\s*?author\.profile_image\s*?}}/g,
|
|
191
222
|
helper: '{{author.profile_image}}'
|
|
192
223
|
},
|
|
193
224
|
'GS001-DEPR-AUTH-CIMG': {
|
|
194
225
|
level: 'error',
|
|
195
226
|
fatal: true,
|
|
196
|
-
rule: 'Replace
|
|
197
|
-
details: oneLineTrim`The usage of <code>{{author.cover_image}}</code> is
|
|
227
|
+
rule: 'Replace <code>{{author.cover_image}}</code> with <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>',
|
|
228
|
+
details: oneLineTrim`The usage of <code>{{author.cover_image}}</code> is no longer supported and should be replaced with either <code>{{primary_author.cover_image}}</code>
|
|
198
229
|
or <code>{{authors.[#].cover_image}}</code>.<br>
|
|
199
|
-
|
|
230
|
+
${multiAuthorDesc}<br>
|
|
231
|
+
${authorHelperDocs}`,
|
|
200
232
|
regex: /{{\s*?author\.cover_image\s*?}}/g,
|
|
201
233
|
helper: '{{author.cover_image}}'
|
|
202
234
|
},
|
|
203
235
|
'GS001-DEPR-AUTH-URL': {
|
|
204
236
|
level: 'error',
|
|
205
237
|
fatal: true,
|
|
206
|
-
rule: 'Replace
|
|
207
|
-
details: oneLineTrim`The usage of <code>{{author.url}}</code> is
|
|
238
|
+
rule: 'Replace <code>{{author.url}}</code> with <code>{{primary_author.url}}</code> or <code>{{authors.[#].url}}</code>',
|
|
239
|
+
details: oneLineTrim`The usage of <code>{{author.url}}</code> is no longer supported and should be replaced with either <code>{{primary_author.url}}</code>
|
|
208
240
|
or <code>{{authors.[#].url}}</code>.<br>
|
|
209
|
-
|
|
241
|
+
${multiAuthorDesc}<br>
|
|
242
|
+
${authorHelperDocs}`,
|
|
210
243
|
regex: /{{\s*?author\.url\s*?}}/g,
|
|
211
244
|
helper: '{{author.url}}'
|
|
212
245
|
},
|
|
213
246
|
'GS001-DEPR-PAUTH': {
|
|
214
247
|
level: 'error',
|
|
215
248
|
fatal: true,
|
|
216
|
-
rule: 'Replace
|
|
217
|
-
details: oneLineTrim`The usage of <code>{{post.author}}</code> is
|
|
249
|
+
rule: 'Replace <code>{{post.author}}</code> with <code>{{post.primary_author}}</code> or <code>{{authors.[#]}}</code>',
|
|
250
|
+
details: oneLineTrim`The usage of <code>{{post.author}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author}}</code>
|
|
218
251
|
or <code>{{post.authors.[#]}}</code>.<br>
|
|
219
|
-
|
|
252
|
+
${multiAuthorDesc}<br>
|
|
253
|
+
${authorHelperDocs}`,
|
|
220
254
|
regex: /{{\s*?post\.author\s*?}}/g,
|
|
221
255
|
helper: '{{post.author}}'
|
|
222
256
|
},
|
|
223
257
|
'GS001-DEPR-PAUTH-ID': {
|
|
224
258
|
level: 'error',
|
|
225
259
|
fatal: true,
|
|
226
|
-
rule: 'Replace
|
|
227
|
-
details: oneLineTrim`The usage of <code>{{post.author.id}}</code> is
|
|
260
|
+
rule: 'Replace <code>{{post.author.id}}</code> with <code>{{post.primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
|
|
261
|
+
details: oneLineTrim`The usage of <code>{{post.author.id}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.id}}</code>
|
|
228
262
|
or <code>{{post.authors.[#].id}}</code>.<br>
|
|
229
|
-
|
|
263
|
+
${multiAuthorDesc}<br>
|
|
264
|
+
${authorHelperDocs}`,
|
|
230
265
|
regex: /{{\s*?post\.author\.id\s*?}}/g,
|
|
231
266
|
helper: '{{post.author.id}}'
|
|
232
267
|
},
|
|
233
268
|
'GS001-DEPR-PAUTH-SLUG': {
|
|
234
269
|
level: 'error',
|
|
235
270
|
fatal: true,
|
|
236
|
-
rule: 'Replace
|
|
237
|
-
details: oneLineTrim`The usage of <code>{{post.author.slug}}</code> is
|
|
271
|
+
rule: 'Replace <code>{{post.author.slug}}</code> with <code>{{post.primary_author.slug}}</code> or <code>{{post.authors.[#].slug}}</code>',
|
|
272
|
+
details: oneLineTrim`The usage of <code>{{post.author.slug}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.slug}}</code>
|
|
238
273
|
or <code>{{post.authors.[#].slug}}</code>.<br>
|
|
239
|
-
|
|
274
|
+
${multiAuthorDesc}<br>
|
|
275
|
+
${authorHelperDocs}`,
|
|
240
276
|
regex: /{{\s*?post\.author\.slug\s*?}}/g,
|
|
241
277
|
helper: '{{post.author.slug}}'
|
|
242
278
|
},
|
|
243
279
|
'GS001-DEPR-PAUTH-MAIL': {
|
|
244
280
|
level: 'error',
|
|
245
281
|
fatal: true,
|
|
246
|
-
rule: 'Replace
|
|
247
|
-
details: oneLineTrim`The usage of <code>{{post.author.email}}</code> is
|
|
282
|
+
rule: 'Replace <code>{{post.author.email}}</code> with <code>{{post.primary_author.email}}</code> or <code>{{post.authors.[#].email}}</code>',
|
|
283
|
+
details: oneLineTrim`The usage of <code>{{post.author.email}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.email}}</code>
|
|
248
284
|
or <code>{{post.authors.[#].email}}</code>.<br>
|
|
249
|
-
|
|
285
|
+
${multiAuthorDesc}<br>
|
|
286
|
+
${authorHelperDocs}`,
|
|
250
287
|
regex: /{{\s*?post\.author\.email\s*?}}/g,
|
|
251
288
|
helper: '{{post.author.email}}'
|
|
252
289
|
},
|
|
253
290
|
'GS001-DEPR-PAUTH-MT': {
|
|
254
291
|
level: 'error',
|
|
255
292
|
fatal: true,
|
|
256
|
-
rule: 'Replace
|
|
257
|
-
details: oneLineTrim`The usage of <code>{{post.author.meta_title}}</code> is
|
|
293
|
+
rule: 'Replace <code>{{post.author.meta_title}}</code> with <code>{{post.primary_author.meta_title}}</code> or <code>{{post.authors.[#].meta_title}}</code>',
|
|
294
|
+
details: oneLineTrim`The usage of <code>{{post.author.meta_title}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.meta_title}}</code>
|
|
258
295
|
or <code>{{post.authors.[#].meta_title}}</code>.<br>
|
|
259
|
-
|
|
296
|
+
${multiAuthorDesc}<br>
|
|
297
|
+
${authorHelperDocs}`,
|
|
260
298
|
regex: /{{\s*?post\.author\.meta_title\s*?}}/g,
|
|
261
299
|
helper: '{{post.author.meta_title}}'
|
|
262
300
|
},
|
|
263
301
|
'GS001-DEPR-PAUTH-MD': {
|
|
264
302
|
level: 'error',
|
|
265
303
|
fatal: true,
|
|
266
|
-
rule: 'Replace
|
|
267
|
-
details: oneLineTrim`The usage of <code>{{post.author.meta_description}}</code> is
|
|
304
|
+
rule: 'Replace <code>{{post.author.meta_description}}</code> with <code>{{post.primary_author.meta_description}}</code> or <code>{{post.authors.[#].meta_description}}</code>',
|
|
305
|
+
details: oneLineTrim`The usage of <code>{{post.author.meta_description}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.meta_description}}</code>
|
|
268
306
|
or <code>{{post.authors.[#].meta_description}}</code>.<br>
|
|
269
|
-
|
|
307
|
+
${multiAuthorDesc}<br>
|
|
308
|
+
${authorHelperDocs}`,
|
|
270
309
|
regex: /{{\s*?post\.author\.meta_description\s*?}}/g,
|
|
271
310
|
helper: '{{post.author.meta_description}}'
|
|
272
311
|
},
|
|
273
312
|
'GS001-DEPR-PAUTH-NAME': {
|
|
274
313
|
level: 'error',
|
|
275
314
|
fatal: true,
|
|
276
|
-
rule: 'Replace
|
|
277
|
-
details: oneLineTrim`The usage of <code>{{post.author.name}}</code> is
|
|
315
|
+
rule: 'Replace <code>{{post.author.name}}</code> with <code>{{post.primary_author.name}}</code> or <code>{{post.authors.[#].name}}</code>',
|
|
316
|
+
details: oneLineTrim`The usage of <code>{{post.author.name}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.name}}</code>
|
|
278
317
|
or <code>{{post.authors.[#].name}}</code>.<br>
|
|
279
|
-
|
|
318
|
+
${multiAuthorDesc}<br>
|
|
319
|
+
${authorHelperDocs}`,
|
|
280
320
|
regex: /{{\s*?post\.author\.name\s*?}}/g,
|
|
281
321
|
helper: '{{post.author.name}}'
|
|
282
322
|
},
|
|
283
323
|
'GS001-DEPR-PAUTH-BIO': {
|
|
284
324
|
level: 'error',
|
|
285
325
|
fatal: true,
|
|
286
|
-
rule: 'Replace
|
|
287
|
-
details: oneLineTrim`The usage of <code>{{post.author.bio}}</code> is
|
|
326
|
+
rule: 'Replace <code>{{post.author.bio}}</code> with <code>{{post.primary_author.bio}}</code> or <code>{{post.authors.[#].bio}}</code>',
|
|
327
|
+
details: oneLineTrim`The usage of <code>{{post.author.bio}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.bio}}</code>
|
|
288
328
|
or <code>{{post.authors.[#].bio}}</code>.<br>
|
|
289
|
-
|
|
329
|
+
${multiAuthorDesc}<br>
|
|
330
|
+
${authorHelperDocs}`,
|
|
290
331
|
regex: /{{\s*?post\.author\.bio\s*?}}/g,
|
|
291
332
|
helper: '{{post.author.bio}}'
|
|
292
333
|
},
|
|
293
334
|
'GS001-DEPR-PAUTH-LOC': {
|
|
294
335
|
level: 'error',
|
|
295
336
|
fatal: true,
|
|
296
|
-
rule: 'Replace
|
|
297
|
-
details: oneLineTrim`The usage of <code>{{post.author.location}}</code> is
|
|
337
|
+
rule: 'Replace <code>{{post.author.location}}</code> with <code>{{post.primary_author.location}}</code> or <code>{{post.authors.[#].location}}</code>',
|
|
338
|
+
details: oneLineTrim`The usage of <code>{{post.author.location}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.location}}</code>
|
|
298
339
|
or <code>{{post.authors.[#].location}}</code>.<br>
|
|
299
|
-
|
|
340
|
+
${multiAuthorDesc}<br>
|
|
341
|
+
${authorHelperDocs}`,
|
|
300
342
|
regex: /{{\s*?post\.author\.location\s*?}}/g,
|
|
301
343
|
helper: '{{post.author.location}}'
|
|
302
344
|
},
|
|
303
345
|
'GS001-DEPR-PAUTH-WEB': {
|
|
304
346
|
level: 'error',
|
|
305
347
|
fatal: true,
|
|
306
|
-
rule: 'Replace
|
|
307
|
-
details: oneLineTrim`The usage of <code>{{post.author.website}}</code> is
|
|
348
|
+
rule: 'Replace <code>{{post.author.website}}</code> with <code>{{post.primary_author.website}}</code> or <code>{{post.authors.[#].website}}</code>',
|
|
349
|
+
details: oneLineTrim`The usage of <code>{{post.author.website}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.website}}</code>
|
|
308
350
|
or <code>{{post.authors.[#].website}}</code>.<br>
|
|
309
|
-
|
|
351
|
+
${multiAuthorDesc}<br>
|
|
352
|
+
${authorHelperDocs}`,
|
|
310
353
|
regex: /{{\s*?post\.author\.website\s*?}}/g,
|
|
311
354
|
helper: '{{post.author.website}}'
|
|
312
355
|
},
|
|
313
356
|
'GS001-DEPR-PAUTH-TW': {
|
|
314
357
|
level: 'error',
|
|
315
358
|
fatal: true,
|
|
316
|
-
rule: 'Replace
|
|
317
|
-
details: oneLineTrim`The usage of <code>{{post.author.twitter}}</code> is
|
|
359
|
+
rule: 'Replace <code>{{post.author.twitter}}</code> with <code>{{post.primary_author.twitter}}</code> or <code>{{post.authors.[#].twitter}}</code>',
|
|
360
|
+
details: oneLineTrim`The usage of <code>{{post.author.twitter}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.twitter}}</code>
|
|
318
361
|
or <code>{{post.authors.[#].twitter}}</code>.<br>
|
|
319
|
-
|
|
362
|
+
${multiAuthorDesc}<br>
|
|
363
|
+
${authorHelperDocs}`,
|
|
320
364
|
regex: /{{\s*?post\.author\.twitter\s*?}}/g,
|
|
321
365
|
helper: '{{post.author.twitter}}'
|
|
322
366
|
},
|
|
323
367
|
'GS001-DEPR-PAUTH-FB': {
|
|
324
368
|
level: 'error',
|
|
325
369
|
fatal: true,
|
|
326
|
-
rule: 'Replace
|
|
327
|
-
details: oneLineTrim`The usage of <code>{{post.author.facebook}}</code> is
|
|
370
|
+
rule: 'Replace <code>{{post.author.facebook}}</code> with <code>{{post.primary_author.facebook}}</code> or <code>{{post.authors.[#].facebook}}</code>',
|
|
371
|
+
details: oneLineTrim`The usage of <code>{{post.author.facebook}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.facebook}}</code>
|
|
328
372
|
or <code>{{post.authors.[#].facebook}}</code>.<br>
|
|
329
|
-
|
|
373
|
+
${multiAuthorDesc}<br>
|
|
374
|
+
${authorHelperDocs}`,
|
|
330
375
|
regex: /{{\s*?post\.author\.facebook\s*?}}/g,
|
|
331
376
|
helper: '{{post.author.facebook}}'
|
|
332
377
|
},
|
|
333
378
|
'GS001-DEPR-PAUTH-PIMG': {
|
|
334
379
|
level: 'error',
|
|
335
380
|
fatal: true,
|
|
336
|
-
rule: 'Replace
|
|
337
|
-
details: oneLineTrim`The usage of <code>{{post.author.profile_image}}</code> is
|
|
381
|
+
rule: 'Replace <code>{{post.author.profile_image}}</code> with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
|
|
382
|
+
details: oneLineTrim`The usage of <code>{{post.author.profile_image}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.profile_image}}</code>
|
|
338
383
|
or <code>{{post.authors.[#].profile_image}}</code>.<br>
|
|
339
|
-
|
|
384
|
+
${multiAuthorDesc}<br>
|
|
385
|
+
${authorHelperDocs}`,
|
|
340
386
|
regex: /{{\s*?post\.author\.profile_image\s*?}}/g,
|
|
341
387
|
helper: '{{post.author.profile_image}}'
|
|
342
388
|
},
|
|
343
389
|
'GS001-DEPR-PAUTH-CIMG': {
|
|
344
390
|
level: 'error',
|
|
345
391
|
fatal: true,
|
|
346
|
-
rule: 'Replace
|
|
347
|
-
details: oneLineTrim`The usage of <code>{{post.author.cover_image}}</code> is
|
|
392
|
+
rule: 'Replace <code>{{post.author.cover_image}}</code> with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
|
|
393
|
+
details: oneLineTrim`The usage of <code>{{post.author.cover_image}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.cover_image}}</code>
|
|
348
394
|
or <code>{{post.authors.[#].cover_image}}</code>.<br>
|
|
349
|
-
|
|
395
|
+
${multiAuthorDesc}<br>
|
|
396
|
+
${authorHelperDocs}`,
|
|
350
397
|
regex: /{{\s*?post\.author\.cover_image\s*?}}/g,
|
|
351
398
|
helper: '{{post.author.cover_image}}'
|
|
352
399
|
},
|
|
353
400
|
'GS001-DEPR-PAUTH-URL': {
|
|
354
401
|
level: 'error',
|
|
355
402
|
fatal: true,
|
|
356
|
-
rule: 'Replace
|
|
357
|
-
details: oneLineTrim`The usage of <code>{{post.author.url}}</code> is
|
|
403
|
+
rule: 'Replace <code>{{post.author.url}}</code> with <code>{{post.primary_author.url}}</code> or <code>{{post.authors.[#].url}}</code>',
|
|
404
|
+
details: oneLineTrim`The usage of <code>{{post.author.url}}</code> is no longer supported and should be replaced with either <code>{{post.primary_author.url}}</code>
|
|
358
405
|
or <code>{{post.authors.[#].url}}</code>.<br>
|
|
359
|
-
|
|
406
|
+
${multiAuthorDesc}<br>
|
|
407
|
+
${authorHelperDocs}`,
|
|
360
408
|
regex: /{{\s*?post\.author\.url\s*?}}/g,
|
|
361
409
|
helper: '{{post.author.url}}'
|
|
362
410
|
},
|
|
@@ -366,7 +414,7 @@ let rules = {
|
|
|
366
414
|
rule: 'Replace <code>{{post.author_id}}</code> code with <code>{{post.primary_author.id}}</code>',
|
|
367
415
|
details: oneLineTrim`The <code>{{post.author_id}}</code> attribute in post context was removed<br>
|
|
368
416
|
Instead of <code>{{post.author_id}}</code> you need to use <code>{{post.primary_author.id}}</code>.<br>
|
|
369
|
-
|
|
417
|
+
Find more information about the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
|
|
370
418
|
regex: /{{\s*?post\.author_id\s*?}}/g,
|
|
371
419
|
helper: '{{post.author_id}}'
|
|
372
420
|
},
|
|
@@ -374,9 +422,10 @@ let rules = {
|
|
|
374
422
|
level: 'error',
|
|
375
423
|
fatal: true,
|
|
376
424
|
rule: 'Replace <code>../author</code> with <code>../primary_author</code> or <code>../authors.[#]</code>',
|
|
377
|
-
details: oneLineTrim`The usage of <code>../author</code> is
|
|
425
|
+
details: oneLineTrim`The usage of <code>../author</code> is no longer supported and should be replaced with either <code>../primary_author</code>
|
|
378
426
|
or <code>../authors.[#]</code>.<br>
|
|
379
|
-
|
|
427
|
+
${multiAuthorDesc}<br>
|
|
428
|
+
${authorHelperDocs}`,
|
|
380
429
|
regex: /{{\s*?(?:#|#if)?\s*?\.\.\/author(?:\.\S*?)?\s*?}}/g,
|
|
381
430
|
helper: '{{../author}}'
|
|
382
431
|
},
|
|
@@ -384,50 +433,51 @@ let rules = {
|
|
|
384
433
|
level: 'error',
|
|
385
434
|
fatal: true,
|
|
386
435
|
rule: 'Replace <code>{{img_url author.*}}</code> with <code>{{img_url primary_author.*}}</code> or <code>.{img_url author.[#].*}}</code>',
|
|
387
|
-
details: oneLineTrim`The usage of <code>{{img_url author.*}}</code> is
|
|
436
|
+
details: oneLineTrim`The usage of <code>{{img_url author.*}}</code> is no longer supported and should be replaced with either <code>{{img_url primary_author.*}}</code>
|
|
388
437
|
or <code>{{img_url author.[#].*}}</code>.<br>
|
|
389
|
-
|
|
438
|
+
${multiAuthorDesc}<br>
|
|
439
|
+
${authorHelperDocs}`,
|
|
390
440
|
regex: /{{\s*?img_url\s*?(author.).*}}/g,
|
|
391
441
|
helper: '{{img_url author.*}}'
|
|
392
442
|
},
|
|
393
443
|
'GS001-DEPR-AC': {
|
|
394
444
|
level: 'error',
|
|
395
445
|
fatal: true,
|
|
396
|
-
rule: 'Replace
|
|
446
|
+
rule: 'Replace <code>{{author.cover}}</code> with <code>{{primary_author.cover_image}}</code>',
|
|
397
447
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
398
448
|
Instead of <code>{{author.cover}}</code> you need to use
|
|
399
449
|
<code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>.<br>
|
|
400
|
-
|
|
450
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
401
451
|
regex: /{{\s*?author\.cover\s*?}}/g,
|
|
402
452
|
helper: '{{author.cover}}'
|
|
403
453
|
},
|
|
404
454
|
'GS001-DEPR-AIMG': {
|
|
405
455
|
level: 'error',
|
|
406
456
|
fatal: true,
|
|
407
|
-
rule: 'Replace
|
|
457
|
+
rule: 'Replace <code>{{author.image}}</code> with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
|
|
408
458
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
409
459
|
Instead of <code>{{author.image}}</code>, you need to use
|
|
410
460
|
<code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>.<br>
|
|
411
|
-
|
|
461
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
412
462
|
regex: /{{\s*?author\.image\s*?}}/g,
|
|
413
463
|
helper: '{{author.image}}'
|
|
414
464
|
},
|
|
415
465
|
'GS001-DEPR-PAC': {
|
|
416
466
|
level: 'error',
|
|
417
467
|
fatal: true,
|
|
418
|
-
rule: 'Replace
|
|
468
|
+
rule: 'Replace <code>{{post.author.cover}}</code> with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
|
|
419
469
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
420
470
|
Instead of <code>{{post.author.cover}}</code>, you need to use
|
|
421
471
|
<code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>.<br>
|
|
422
|
-
|
|
472
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
423
473
|
regex: /{{\s*?post\.author\.cover\s*?}}/g,
|
|
424
474
|
helper: '{{post.author.cover}}'
|
|
425
475
|
},
|
|
426
476
|
'GS001-DEPR-AUTH-INCL': {
|
|
427
477
|
level: 'error',
|
|
428
478
|
fatal: true,
|
|
429
|
-
rule:
|
|
430
|
-
details: oneLineTrim`The usage of <code>{{#get "posts" include="author"}}</code> is
|
|
479
|
+
rule: `Replace <code>include="author"</code> with <code>include="authors"</code>`,
|
|
480
|
+
details: oneLineTrim`The usage of <code>{{#get "posts" include="author"}}</code> is no longer supported and should be replaced with <code>{{#get "posts" include="authors"}}</code>.<br>
|
|
431
481
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
432
482
|
// This regex seems only to work properly with the escaped characters. Removing them resulted
|
|
433
483
|
// in not detecting the wrong usage.
|
|
@@ -438,7 +488,7 @@ let rules = {
|
|
|
438
488
|
level: 'error',
|
|
439
489
|
fatal: true,
|
|
440
490
|
rule: `<code>fields="author"</code> should be replaced with <code>fields="authors"</code>`,
|
|
441
|
-
details: oneLineTrim`The usage of <code>{{#get "posts" fields="author"}}</code> is
|
|
491
|
+
details: oneLineTrim`The usage of <code>{{#get "posts" fields="author"}}</code> is no longer supported and should be replaced with
|
|
442
492
|
<code>{{#get "posts" fields="primary_author"}}</code> or <code>{{#get "posts" fields="authors.[#]"}}</code>.<br>
|
|
443
493
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
444
494
|
// This regex seems only to work properly with the escaped characters. Removing them resulted
|
|
@@ -450,7 +500,7 @@ let rules = {
|
|
|
450
500
|
level: 'error',
|
|
451
501
|
fatal: true,
|
|
452
502
|
rule: `<code>filter="author:[...]"</code> should be replaced with <code>filter="authors:[...]"</code>`,
|
|
453
|
-
details: oneLineTrim`The usage of <code>{{#get "posts" filter="author:[...]"}}</code> is
|
|
503
|
+
details: oneLineTrim`The usage of <code>{{#get "posts" filter="author:[...]"}}</code> is no longer supported and should be replaced with <code>{{#get "posts" filter="authors:[...]"}}</code>.<br>
|
|
454
504
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
455
505
|
// This regex seems only to work properly with the escaped characters. Removing them resulted
|
|
456
506
|
// in not detecting the wrong usage.
|
|
@@ -461,9 +511,10 @@ let rules = {
|
|
|
461
511
|
level: 'error',
|
|
462
512
|
fatal: true,
|
|
463
513
|
rule: 'The <code>{{#author}}</code> block helper should be replaced with <code>{{#primary_author}}</code> or <code>{{#foreach authors}}...{{/foreach}}</code>',
|
|
464
|
-
details: oneLineTrim`The usage of <code>{{#author}}</code> block helper outside of <code>author.hbs</code> is
|
|
514
|
+
details: oneLineTrim`The usage of <code>{{#author}}</code> block helper outside of <code>author.hbs</code> is no longer supported and
|
|
465
515
|
should be replaced with <code>{{#primary_author}}</code> or <code>{{#foreach authors}}...{{/foreach}}</code>.<br>
|
|
466
|
-
|
|
516
|
+
${multiAuthorDesc}<br>
|
|
517
|
+
${authorHelperDocs}`,
|
|
467
518
|
regex: /{{\s*?#author\s*?}}/g,
|
|
468
519
|
notValidIn: 'author.hbs',
|
|
469
520
|
helper: '{{#author}}'
|
|
@@ -471,11 +522,11 @@ let rules = {
|
|
|
471
522
|
'GS001-DEPR-PAIMG': {
|
|
472
523
|
level: 'error',
|
|
473
524
|
fatal: true,
|
|
474
|
-
rule: 'Replace
|
|
525
|
+
rule: 'Replace <code>{{post.author.image}}</code> with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
|
|
475
526
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
476
527
|
Instead of <code>{{post.author.image}}</code>, you need to use
|
|
477
528
|
<code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>.<br>
|
|
478
|
-
|
|
529
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
479
530
|
regex: /{{\s*?post\.author\.image\s*?}}/g,
|
|
480
531
|
helper: '{{post.author.image}}'
|
|
481
532
|
},
|
|
@@ -484,9 +535,10 @@ let rules = {
|
|
|
484
535
|
fatal: true,
|
|
485
536
|
rule: `The <code>{{#if author.*}}</code> block helper should be replaced with <code>{{#if primary_author.*}}</code>
|
|
486
537
|
or <code>{{#if authors.[#].*}}</code>`,
|
|
487
|
-
details: oneLineTrim`The usage of <code>{{#if author.*}}</code> is
|
|
538
|
+
details: oneLineTrim`The usage of <code>{{#if author.*}}</code> is no longer supported and should be replaced with <code>{{#if primary_author.*}}</code>
|
|
488
539
|
or <code>{{#if authors.[#].*}}</code>.<br>
|
|
489
|
-
|
|
540
|
+
${multiAuthorDesc}<br>
|
|
541
|
+
${authorHelperDocs}`,
|
|
490
542
|
regex: /{{\s*?#if\s*?(author)(?:\.\w+)*?\s*?}}/g,
|
|
491
543
|
helper: '{{#if author.*}}'
|
|
492
544
|
},
|
|
@@ -495,60 +547,69 @@ let rules = {
|
|
|
495
547
|
fatal: true,
|
|
496
548
|
rule: `The <code>{{#if post.author.*}}</code> block helper should be replaced with <code>{{#if post.primary_author.*}}</code>
|
|
497
549
|
or <code>{{#if post.authors.[#].*}}</code>`,
|
|
498
|
-
details: oneLineTrim`The usage of <code>{{#if post.author.*}}</code> is
|
|
550
|
+
details: oneLineTrim`The usage of <code>{{#if post.author.*}}</code> is no longer supported and should be replaced with <code>{{#if post.primary_author.*}}</code>
|
|
499
551
|
or <code>{{#if post.authors.[#].*}}</code>.<br>
|
|
500
|
-
|
|
552
|
+
${multiAuthorDesc}<br>
|
|
553
|
+
${authorHelperDocs}`,
|
|
501
554
|
regex: /{{\s*?#if\s*?(?:post\.)(author)(?:\.\w+)*?\s*?}}/g,
|
|
502
555
|
helper: '{{#if post.author.*}}'
|
|
503
556
|
},
|
|
504
557
|
'GS001-DEPR-CON-AC': {
|
|
505
558
|
level: 'error',
|
|
506
559
|
fatal: true,
|
|
507
|
-
rule: 'Replace
|
|
560
|
+
rule: 'Replace <code>{{#if author.cover}}</code> with <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>',
|
|
508
561
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
509
562
|
Instead of <code>{{#if author.cover}}</code>, you need to use
|
|
510
563
|
<code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>.<br>
|
|
511
|
-
|
|
564
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
512
565
|
regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
|
|
513
566
|
helper: '{{#if author.cover}}'
|
|
514
567
|
},
|
|
515
568
|
'GS001-DEPR-CON-AIMG': {
|
|
516
569
|
level: 'error',
|
|
517
570
|
fatal: true,
|
|
518
|
-
rule: 'Replace
|
|
571
|
+
rule: 'Replace <code>{{#if author.image}}</code> with <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>',
|
|
519
572
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
520
573
|
Instead of <code>{{#if author.image}}</code>, you need to use
|
|
521
574
|
<code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>.<br>
|
|
522
|
-
|
|
575
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
523
576
|
regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
|
|
524
577
|
helper: '{{#if author.image}}'
|
|
525
578
|
},
|
|
526
579
|
'GS001-DEPR-CON-PAC': {
|
|
527
580
|
level: 'error',
|
|
528
581
|
fatal: true,
|
|
529
|
-
rule: 'Replace
|
|
582
|
+
rule: 'Replace <code>{{#if post.author.cover}}</code> with <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>',
|
|
530
583
|
details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
|
|
531
584
|
Instead of <code>{{#if post.author.cover}}</code>, you need to use
|
|
532
585
|
<code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>.<br>
|
|
533
|
-
|
|
586
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
534
587
|
regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
|
|
535
588
|
helper: '{{#if post.author.cover}}'
|
|
536
589
|
},
|
|
537
590
|
'GS001-DEPR-CON-PAIMG': {
|
|
538
591
|
level: 'error',
|
|
539
592
|
fatal: true,
|
|
540
|
-
rule: 'Replace
|
|
593
|
+
rule: 'Replace <code>{{#if post.author.image}}</code> with <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>',
|
|
541
594
|
details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
|
|
542
595
|
Instead of <code>{{#if post.author.image}}</code>, you need to use
|
|
543
596
|
<code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>.<br>
|
|
544
|
-
|
|
597
|
+
Find more information about the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
|
|
545
598
|
regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
|
|
546
599
|
helper: '{{#if post.author.image}}'
|
|
547
600
|
},
|
|
601
|
+
'GS001-DEPR-LABS-MEMBERS': {
|
|
602
|
+
level: 'error',
|
|
603
|
+
rule: 'Replace <code>{{@labs.members}}</code> with <code>{{@site.members_enabled}}</code>',
|
|
604
|
+
details: oneLineTrim`Usage of <code>{{@labs.members}}</code> is no longer supported and should be replaced with <code>{{@site.members_enabled}}</code><br>
|
|
605
|
+
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
606
|
+
regex: /@labs\.members/g,
|
|
607
|
+
helper: '{{@labs.members}}'
|
|
608
|
+
},
|
|
548
609
|
'GS001-DEPR-SPL': {
|
|
549
610
|
level: 'error',
|
|
550
611
|
fatal: true,
|
|
551
|
-
rule: '<code>{{@site.permalinks}}</code>
|
|
612
|
+
rule: 'Remove uses of <code>{{@site.permalinks}}</code>',
|
|
552
613
|
details: oneLineTrim`With the introduction of Dynamic Routing, you can define multiple permalinks.<br>
|
|
553
614
|
The <code>{{@site.permalinks}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
554
615
|
Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
@@ -558,7 +619,7 @@ let rules = {
|
|
|
558
619
|
'GS001-DEPR-BPL': {
|
|
559
620
|
level: 'error',
|
|
560
621
|
fatal: true,
|
|
561
|
-
rule: '<code>{{@blog.permalinks}}</code>
|
|
622
|
+
rule: 'Remove uses of <code>{{@blog.permalinks}}</code>',
|
|
562
623
|
details: oneLineTrim`With the introduction of Dynamic Routing, you can define multiple permalinks.<br>
|
|
563
624
|
The <code>{{@blog.permalinks}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
564
625
|
Find more information about Ghost data helpers <a href="${docsBaseUrl}/helpers/#data-helpers" target=_blank>here</a>.`,
|
|
@@ -569,8 +630,7 @@ let rules = {
|
|
|
569
630
|
level: 'error',
|
|
570
631
|
fatal: true,
|
|
571
632
|
rule: 'Replace <code>{{@site.ghost_foot}}</code> with <code>{{ghost_foot}}</code>',
|
|
572
|
-
details: oneLineTrim`The usage of <code>{{@site.ghost_foot}}</code> is
|
|
573
|
-
The <code>{{@site.ghost_foot}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
633
|
+
details: oneLineTrim`The usage of <code>{{@site.ghost_foot}}</code> is no longer supported and should be replaced with <code>{{ghost_foot}}</code>.<br>
|
|
574
634
|
Find more information about the <code>{{ghost_foot}}</code> property <a href="${docsBaseUrl}helpers/ghost_head_foot/" target=_blank>here</a>.`,
|
|
575
635
|
regex: /{{\s*?@site\.ghost_foot\s*?}}/g,
|
|
576
636
|
helper: '{{@site.ghost_foot}}'
|
|
@@ -579,8 +639,7 @@ let rules = {
|
|
|
579
639
|
level: 'error',
|
|
580
640
|
fatal: true,
|
|
581
641
|
rule: 'Replace <code>{{@site.ghost_head}}</code> with <code>{{ghost_head}}</code>',
|
|
582
|
-
details: oneLineTrim`The usage of <code>{{@site.ghost_head}}</code> is
|
|
583
|
-
The <code>{{@site.ghost_head}}</code> property will therefore no longer be used and should be removed from the theme.
|
|
642
|
+
details: oneLineTrim`The usage of <code>{{@site.ghost_head}}</code> is no longer supported and should be replaced with <code>{{ghost_head}}</code>.<br>
|
|
584
643
|
Find more information about the <code>{{ghost_head}}</code> property <a href="${docsBaseUrl}helpers/ghost_head_foot/" target=_blank>here</a>.`,
|
|
585
644
|
regex: /{{\s*?@site\.ghost_head\s*?}}/g,
|
|
586
645
|
helper: '{{@site.ghost_head}}'
|
|
@@ -588,19 +647,17 @@ let rules = {
|
|
|
588
647
|
'GS001-DEPR-LANG': {
|
|
589
648
|
level: 'error',
|
|
590
649
|
fatal: true,
|
|
591
|
-
rule: '
|
|
592
|
-
details: oneLineTrim`
|
|
593
|
-
The <code>{{lang}}</code> helper is removed in v5 version of Ghost and should not be used.
|
|
650
|
+
rule: 'Replace <code>{{lang}}</code> with <code>{{@site.locale}}</code>',
|
|
651
|
+
details: oneLineTrim`The usage of <code>{{lang}}</code> is no longer supported and should be replaced with <code>{{@site.locale}}</code>.<br>
|
|
594
652
|
Find more information about the <code>@site.locale</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
595
653
|
regex: /{{\s*?lang\s*?}}/g,
|
|
596
654
|
helper: '{{lang}}'
|
|
597
655
|
},
|
|
598
656
|
'GS001-DEPR-SITE-LANG': {
|
|
599
657
|
level: 'error',
|
|
600
|
-
fatal:
|
|
601
|
-
rule: '
|
|
602
|
-
details: oneLineTrim`
|
|
603
|
-
The <code>{{@site.lang}}</code> helper is removed in v5 version of Ghost and should not be used.
|
|
658
|
+
fatal: false,
|
|
659
|
+
rule: 'Replace <code>{{@site.lang}}</code> with <code>{{@site.locale}}</code>',
|
|
660
|
+
details: oneLineTrim`The usage of <code>{{@site.lang}}</code> is no longer supported and shoud be replaced with <code>{{@site.locale}}</code>.<br>
|
|
604
661
|
Find more information about the <code>@site.locale</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
|
|
605
662
|
regex: /@site\.lang/g,
|
|
606
663
|
helper: '{{@site.lang}}'
|
|
@@ -608,8 +665,8 @@ let rules = {
|
|
|
608
665
|
'GS001-DEPR-USER-GET': {
|
|
609
666
|
level: 'error',
|
|
610
667
|
fatal: true,
|
|
611
|
-
rule:
|
|
612
|
-
details: oneLineTrim`The usage of <code>{{#get "users"}}</code> is
|
|
668
|
+
rule: `Replace <code>{{#get "users"}}</code> with <code>{{#get "authors"}}</code>`,
|
|
669
|
+
details: oneLineTrim`The usage of <code>{{#get "users"}}</code> is no longer supported and should be replaced with <code>{{#get "authors"}}</code>.<br>
|
|
613
670
|
Find more information about the <code>{{get}}</code> helper <a href="${docsBaseUrl}helpers/get/" target=_blank>here</a>.`,
|
|
614
671
|
regex: /{{\s*?#get ("|')\s*users("|')\s*/g,
|
|
615
672
|
helper: '{{#get "users"}}'
|
|
@@ -618,7 +675,7 @@ let rules = {
|
|
|
618
675
|
level: 'error',
|
|
619
676
|
fatal: true,
|
|
620
677
|
rule: 'Replace <code>{{error.code}}</code> with <code>{{error.statusCode}}</code>',
|
|
621
|
-
details: oneLineTrim`The usage of <code>{{error.code}}</code> is
|
|
678
|
+
details: oneLineTrim`The usage of <code>{{error.code}}</code> is no longer supported and should be replaced with <code>{{error.statusCode}}</code>.<br>
|
|
622
679
|
When in <code>error</code> context, e. g. in the <code>error.hbs</code> template, replace <code>{{code}}</code> with <code>{{statusCode}}</code>.<br>
|
|
623
680
|
Find more information about the <code>error.hbs</code> template <a href="${docsBaseUrl}structure/#errorhbs" target=_blank>here</a>.`,
|
|
624
681
|
regex: /{{\s*?(?:error\.)?(code)\s*?}}/g,
|
|
@@ -628,7 +685,7 @@ let rules = {
|
|
|
628
685
|
level: 'error',
|
|
629
686
|
fatal: true,
|
|
630
687
|
rule: 'Replace <code>{{[#].currency_symbol}}</code> with <code>{{price currency=currency}}</code>.',
|
|
631
|
-
details: oneLineTrim`The hardcoded <code>currency_symbol</code> attribute
|
|
688
|
+
details: oneLineTrim`The hardcoded <code>currency_symbol</code> attribute is no longer supported in favour of passing the currency to updated <code>{{price}}</code> helper.
|
|
632
689
|
Find more information about the updated <code>{{price}}</code> helper <a href="${docsBaseUrl}members/#the-price-helper" target=_blank>here</a>.`,
|
|
633
690
|
helper: '{{[#].currency_symbol}}',
|
|
634
691
|
regex: /currency_symbol/g
|
|
@@ -651,5 +708,12 @@ rules = _.each(_.merge({}, previousRules, rules), function replaceDocsUrl(value)
|
|
|
651
708
|
module.exports = {
|
|
652
709
|
knownHelpers: knownHelpers,
|
|
653
710
|
templates: templates,
|
|
654
|
-
rules: rules
|
|
711
|
+
rules: rules,
|
|
712
|
+
/**
|
|
713
|
+
* Copy of Ghost defaults for https://github.com/TryGhost/Ghost/blob/e25f1df0ae551c447da0d319bae06eadf9665444/core/frontend/services/theme-engine/config/defaults.json
|
|
714
|
+
*/
|
|
715
|
+
defaultPackageJSON: {
|
|
716
|
+
posts_per_page: 5,
|
|
717
|
+
card_assets: true
|
|
718
|
+
}
|
|
655
719
|
};
|