gscan 4.22.0 → 4.24.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.
@@ -1,291 +1,456 @@
1
1
  const _ = require('lodash');
2
2
  const oneLineTrim = require('common-tags/lib/oneLineTrim');
3
- const previousSpec = require('./v3');
3
+ const previousSpec = require('./v4');
4
4
  const ghostVersions = require('../utils').versions;
5
5
  const docsBaseUrl = `https://ghost.org/docs/api/handlebars-themes/`;
6
- const prevDocsBaseUrl = `https://themes.ghost.org/v${ghostVersions.v3.docs}/docs/`;
6
+ const prevDocsBaseUrl = `https://themes.ghost.org/v${ghostVersions.canary.docs}/docs/`;
7
7
  const prevDocsBaseUrlRegEx = new RegExp(prevDocsBaseUrl, 'g');
8
8
 
9
9
  const previousKnownHelpers = previousSpec.knownHelpers;
10
10
  const previousTemplates = previousSpec.templates;
11
11
  const previousRules = previousSpec.rules;
12
12
 
13
- function cssCardRule(cardName, className) {
14
- return {
15
- level: 'warning',
16
- rule: `The <code>.${className}</code> CSS class is required to appear styled in your theme`,
17
- details: oneLineTrim`The <code>.${className}</code> CSS class is required otherwise the ${cardName} card will appear unstyled.
18
- Find out more about required theme changes for the Koenig editor <a href="${docsBaseUrl}editor/" target=_blank>here</a>.`,
19
- regex: new RegExp(`\\.${className}`, 'g'),
20
- className: `.${className}`,
21
- css: true,
22
- cardAsset: cardName
23
- };
24
- }
25
-
26
13
  // assign new or overwrite existing knownHelpers, templates, or rules here:
27
- let knownHelpers = ['match'];
14
+ let knownHelpers = [];
28
15
  let templates = [];
29
16
  let rules = {
30
17
  // New rules
31
- 'GS010-PJ-GHOST-API': {
32
- level: 'warning',
33
- rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is recommended. Otherwise, it falls back to "v4"',
34
- details: oneLineTrim`Add <code>"ghost-api"</code> to your <code>package.json</code>. E.g. <code>{"engines": {"ghost-api": "v4"}}</code>.<br>
35
- If no <code>"ghost-api"</code> property is provided, Ghost will use its default setting of "v4" Ghost API.<br>
18
+ 'GS010-PJ-GHOST-API-PRESENT': {
19
+ level: 'error',
20
+ rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is not supported.',
21
+ details: oneLineTrim`Remove <code>"ghost-api"</code> from your <code>package.json</code>.<br>
22
+ The <code>ghost-api</code> is not supported starting Ghost v5 and should not be used.
36
23
  Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
37
24
  },
38
- 'GS010-PJ-GHOST-API-V01': {
25
+ 'GS090-NO-AUTHOR-HELPER-IN-POST-CONTEXT': {
39
26
  level: 'error',
40
- rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is incompatible with current version of Ghost API and will fall back to "v4"',
41
- details: oneLineTrim`Change <code>"ghost-api"</code> in your <code>package.json</code> to higher version. E.g. <code>{"engines": {"ghost-api": "v4"}}</code>.<br>
42
- If <code>"ghost-api"</code> property is left at "v0.1", Ghost will use its default setting of "v4".<br>
43
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
27
+ fatal: true,
28
+ rule: 'The <code>{{author}}</code> helper should be replaces with <code>{{authors}}</code>',
29
+ details: oneLineTrim`The <code>{{author}}</code> helper has been deprecated since Ghost 1.22.0 in favor of <code>{{<authors>}}</code><br>
30
+ The <code>{{author}}</code> helper was removed in Ghost v5 and should not be used.
31
+ Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
32
+ helper: '{{author}}'
44
33
  },
45
- 'GS010-PJ-GHOST-API-V2': {
46
- level: 'warning',
47
- rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is using a deprecated version of Ghost API',
48
- details: oneLineTrim`Change <code>"ghost-api"</code> in your <code>package.json</code> to higher version. E.g. <code>{"engines": {"ghost-api": "v4"}}</code>.<br>
49
- If <code>"ghost-api"</code> property is left at "v2", it will stop working with next major version upgrade and default to v5.<br>
50
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
34
+
35
+ // Updated v1 & v2 rules
36
+ 'GS001-DEPR-BLOG': {
37
+ level: 'error',
38
+ fatal: true,
39
+ rule: 'The <code>{{@blog}}</code> helper should be replaced with <code>{{@site}}</code>',
40
+ details: oneLineTrim`With the introduction of the Content API <code>{{@blog}}</code> became deprecated in favour of <code>{{@site}}</code>.<br>
41
+ The <code>{{@blog}}</code> helper was removed in Ghost v5 and should not be used.
42
+ Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
43
+ regex: /{{\s*?@blog\.[a-zA-Z0-9_]+\s*?}}/g,
44
+ helper: '{{@blog}}'
51
45
  },
52
- 'GS010-PJ-CUST-THEME-TOTAL-SETTINGS': {
46
+ 'GS001-DEPR-AUTH-ID': {
53
47
  level: 'error',
54
- rule: '<code>package.json</code> property <code>"config.custom"</code> contains too many settings',
55
- details: oneLineTrim`Remove key from <code>"config.custom"</code> in your <code>package.json</code> to have less than or exactly 15 settings.<br>
56
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
48
+ fatal: true,
49
+ rule: 'Replace the <code>{{author.id}}</code> helper with <code>{{primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
50
+ details: oneLineTrim`The usage of <code>{{author.id}}</code> is deprecated and should be replaced with either <code>{{primary_author.id}}</code>
51
+ or <code>{{authors.[#].id}}</code>.<br>
52
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
53
+ regex: /{{\s*?author\.id\s*?}}/g,
54
+ helper: '{{author.id}}'
57
55
  },
58
- 'GS010-PJ-CUST-THEME-SETTINGS-CASE': {
56
+ 'GS001-DEPR-AUTH-SLUG': {
59
57
  level: 'error',
60
- rule: '<code>package.json</code> property <code>"config.custom"</code> contains a property that isn\'t snake-cased',
61
- details: oneLineTrim`Rewrite all property in <code>"config.custom"</code> in your <code>package.json</code> in snake case.<br>
62
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
58
+ fatal: true,
59
+ rule: 'Replace the <code>{{author.slug}}</code> helper with <code>{{primary_author.slug}}</code> or <code>{{authors.[#].slug}}</code>',
60
+ details: oneLineTrim`The usage of <code>{{author.slug}}</code> is deprecated and should be replaced with either <code>{{primary_author.slug}}</code>
61
+ or <code>{{authors.[#].slug}}</code>.<br>
62
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
63
+ regex: /{{\s*?author\.slug\s*?}}/g,
64
+ helper: '{{author.slug}}'
63
65
  },
64
- 'GS010-PJ-CUST-THEME-SETTINGS-TYPE': {
66
+ 'GS001-DEPR-AUTH-MAIL': {
65
67
  level: 'error',
66
- rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> should have a known <code>"type"</code>.',
67
- details: oneLineTrim`Only use the following types: <code>"select"</code>, <code>"boolean"</code>, <code>"color"</code>, <code>"image"</code>, <code>"text"</code>.<br>
68
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
68
+ fatal: true,
69
+ rule: 'Replace the <code>{{author.email}}</code> helper with <code>{{primary_author.email}}</code> or <code>{{authors.[#].email}}</code>',
70
+ details: oneLineTrim`The usage of <code>{{author.email}}</code> is deprecated and should be replaced with either <code>{{primary_author.email}}</code>
71
+ or <code>{{authors.[#].email}}</code>.<br>
72
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
73
+ regex: /{{\s*?author\.email\s*?}}/g,
74
+ helper: '{{author.email}}'
69
75
  },
70
- 'GS010-PJ-CUST-THEME-SETTINGS-GROUP': {
71
- level: 'recommendation',
72
- rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> should have a known <code>"group"</code>.',
73
- details: oneLineTrim`Only use the following groups: <code>"post"</code>, <code>"homepage"</code>.<br>
74
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
76
+ 'GS001-DEPR-AUTH-MT': {
77
+ level: 'error',
78
+ fatal: true,
79
+ rule: 'Replace the <code>{{author.meta_title}}</code> helper with <code>{{primary_author.meta_title}}</code> or <code>{{authors.[#].meta_title}}</code>',
80
+ details: oneLineTrim`The usage of <code>{{author.meta_title}}</code> is deprecated and should be replaced with either <code>{{primary_author.meta_title}}</code>
81
+ or <code>{{authors.[#].meta_title}}</code>.<br>
82
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
83
+ regex: /{{\s*?author\.meta_title\s*?}}/g,
84
+ helper: '{{author.meta_title}}'
75
85
  },
76
- 'GS010-PJ-CUST-THEME-SETTINGS-SELECT-OPTIONS': {
86
+ 'GS001-DEPR-AUTH-MD': {
77
87
  level: 'error',
78
- rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"select"</code> need to have at least 2 <code>"options"</code>.',
79
- details: oneLineTrim`Make sure there is at least 2 <code>"options"</code> in each <code>"select"</code> custom theme property.<br>
80
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
88
+ fatal: true,
89
+ rule: 'Replace the <code>{{author.meta_description}}</code> helper with <code>{{primary_author.meta_description}}</code> or <code>{{authors.[#].meta_description}}</code>',
90
+ details: oneLineTrim`The usage of <code>{{author.meta_description}}</code> is deprecated and should be replaced with either <code>{{primary_author.meta_description}}</code>
91
+ or <code>{{authors.[#].meta_description}}</code>.<br>
92
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
93
+ regex: /{{\s*?author\.meta_description\s*?}}/g,
94
+ helper: '{{author.meta_description}}'
81
95
  },
82
- 'GS010-PJ-CUST-THEME-SETTINGS-SELECT-DEFAULT': {
96
+ 'GS001-DEPR-AUTH-NAME': {
83
97
  level: 'error',
84
- rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"select"</code> need to have a valid <code>"default"</code>.',
85
- details: oneLineTrim`Make sure the <code>"default"</code> property matches a value in <code>"options"</code> of the same <code>"select"</code>.<br>
86
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
98
+ fatal: true,
99
+ rule: 'Replace the <code>{{author.name}}</code> helper with <code>{{primary_author.name}}</code> or <code>{{authors.[#].name}}</code>',
100
+ details: oneLineTrim`The usage of <code>{{author.name}}</code> is deprecated and should be replaced with either <code>{{primary_author.name}}</code>
101
+ or <code>{{authors.[#].name}}</code>.<br>
102
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
103
+ regex: /{{\s*?author\.name\s*?}}/g,
104
+ helper: '{{author.name}}'
87
105
  },
88
- 'GS010-PJ-CUST-THEME-SETTINGS-BOOLEAN-DEFAULT': {
106
+ 'GS001-DEPR-AUTH-BIO': {
89
107
  level: 'error',
90
- rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"boolean"</code> need to have a valid <code>"default"</code>.',
91
- details: oneLineTrim`Make sure the <code>"default"</code> property is either <code>true</code> or <code>false</code>.<br>
92
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
108
+ fatal: true,
109
+ rule: 'Replace the <code>{{author.bio}}</code> helper with <code>{{primary_author.bio}}</code> or <code>{{authors.[#].bio}}</code>',
110
+ details: oneLineTrim`The usage of <code>{{author.bio}}</code> is deprecated and should be replaced with either <code>{{primary_author.bio}}</code>
111
+ or <code>{{authors.[#].bio}}</code>.<br>
112
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
113
+ regex: /{{\s*?author\.bio\s*?}}/g,
114
+ helper: '{{author.bio}}'
93
115
  },
94
- 'GS010-PJ-CUST-THEME-SETTINGS-COLOR-DEFAULT': {
116
+ 'GS001-DEPR-AUTH-LOC': {
95
117
  level: 'error',
96
- rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"color"</code> need to have a valid <code>"default"</code>.',
97
- details: oneLineTrim`Make sure the <code>"default"</code> property is a valid 6-hexadecimal-digit color code like <code>#15171a</code>.<br>
98
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
118
+ fatal: true,
119
+ rule: 'Replace the <code>{{author.location}}</code> helper with <code>{{primary_author.location}}</code> or <code>{{authors.[#].location}}</code>',
120
+ details: oneLineTrim`The usage of <code>{{author.location}}</code> is deprecated and should be replaced with either <code>{{primary_author.location}}</code>
121
+ or <code>{{authors.[#].location}}</code>.<br>
122
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
123
+ regex: /{{\s*?author\.location\s*?}}/g,
124
+ helper: '{{author.location}}'
99
125
  },
100
- 'GS010-PJ-CUST-THEME-SETTINGS-IMAGE-DEFAULT': {
126
+ 'GS001-DEPR-AUTH-WEB': {
101
127
  level: 'error',
102
- rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> of type <code>"image"</code> can\'t have a <code>"default"</code> value.',
103
- details: oneLineTrim`Make sure the <code>"default"</code> property is either <code>null</code>, an empty string <code>''</code> or isn't present.<br>
104
- Check the <a href="${docsBaseUrl}packagejson/" target=_blank><code>package.json</code> documentation</a> for further information.`
128
+ fatal: true,
129
+ rule: 'Replace the <code>{{author.website}}</code> helper with <code>{{primary_author.website}}</code> or <code>{{authors.[#].website}}</code>',
130
+ details: oneLineTrim`The usage of <code>{{author.website}}</code> is deprecated and should be replaced with either <code>{{primary_author.website}}</code>
131
+ or <code>{{authors.[#].website}}</code>.<br>
132
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
133
+ regex: /{{\s*?author\.website\s*?}}/g,
134
+ helper: '{{author.website}}'
105
135
  },
106
- 'GS001-DEPR-LABS-MEMBERS': {
107
- level: 'warning',
108
- rule: 'The <code>{{@labs.members}}</code> helper should not be used.',
109
- details: oneLineTrim`Remove <code>{{@labs.members}}</code> from the theme.<br>
110
- The <code>{{@labs.members}}</code> helper will always return <code>true</code> in Ghost v4 and will be removed from Ghost v5, at which point it will return <code>null</code> and evaluate to <code>false</code>.
111
- Find more information about the <code>@labs</code> property <a href="${docsBaseUrl}helpers/labs/" target=_blank>here</a>.`,
112
- regex: /@labs\.members/g,
113
- helper: '{{@labs.members}}'
114
- },
115
- 'GS080-FEACH-POSTS': {
116
- level: 'warning',
117
- rule: 'The default visibility for posts in <code>{{#foreach}}</code> block helper has changed in v4.',
118
- details: oneLineTrim`The default visibility for posts in <code>{{#foreach}}</code> block helper has changed from <code>public</code> to <code>all</code> in Ghost v4.
119
- Find more information about the <code>{{foreach}}</code> helper <a href="${docsBaseUrl}helpers/foreach/" target=_blank>here</a>.`,
120
- regex: /{{\s*?#foreach\s*?\w*?\s*?}}/g,
121
- helper: '{{#foreach}}',
122
- validInAPI: ['v3']
123
- },
124
- 'GS080-CARD-LAST4': {
125
- level: 'warning',
126
- rule: 'The <code>default_payment_card_last4</code> field now coalesces to <code>****</code> in Ghost 4.x instead of null.',
127
- details: oneLineTrim`The <code>default_payment_card_last4</code> field no longer outputs a falsy(null) value in case of missing card details starting from Ghost 4.x and instead coalesces to <code>****</code>
128
- Find more information about the <code>default_payment_card_last4</code> attribute <a href="${docsBaseUrl}members/#subscription-attributes" target=_blank>here</a>.`,
129
- regex: /default_payment_card_last4/g,
130
- helper: '{{default_payment_card_last4}}',
131
- validInAPI: ['v3']
132
- },
133
- 'GS080-FEACH-PV': {
134
- level: 'recommendation',
135
- rule: 'The use of <code>visibility="all"</code> is no longer required for posts in <code>{{#foreach}}</code> helper.',
136
- details: oneLineTrim`The default visibility in <code>{{#foreach}}</code> helper for posts has changed in v4 from "public" to "all" and is no longer required when looping over posts.
137
- Check out the documentation for <code>{{#foreach}}</code> <a href="${docsBaseUrl}helpers/foreach/" target=_blank>here</a>.`,
138
- regex: /{{\s*?#foreach\b[\w\s='"]*?visibility=("|')all("|')[\w\s='"]*?}}/g,
139
- helper: '{{#foreach}}',
140
- validInAPI: ['v3']
141
- },
142
- 'GS001-DEPR-CURR-SYM': {
143
- level: 'warning',
144
- rule: 'Replace <code>{{[#].currency_symbol}}</code> with <code>{{price currency=currency}}</code>.',
145
- details: oneLineTrim`The hardcoded <code>currency_symbol</code> attribute was removed in favour of passing the currency to updated <code>{{price}}</code> helper.
146
- Find more information about the updated <code>{{price}}</code> helper <a href="${docsBaseUrl}members/#the-price-helper" target=_blank>here</a>.`,
147
- helper: '{{[#].currency_symbol}}',
148
- regex: /currency_symbol/g
149
- },
150
- 'GS001-DEPR-SITE-LANG': {
151
- level: 'warning',
152
- rule: 'The <code>{{@site.lang}}</code> helper should be replaced with <code>{{@site.locale}}</code>',
153
- details: oneLineTrim`Replace <code>{{@site.lang}}</code> helper with <code>{{@site.locale}}</code>.<br>
154
- The <code>{{@site.lang}}</code> helper will be removed in next version of Ghost and should not be used.
155
- Find more information about the <code>@site</code> property <a href="${docsBaseUrl}helpers/site/" target=_blank>here</a>.`,
156
- regex: /@site\.lang/g,
157
- helper: '{{@site.lang}}'
136
+ 'GS001-DEPR-AUTH-TW': {
137
+ level: 'error',
138
+ fatal: true,
139
+ rule: 'Replace the <code>{{author.twitter}}</code> helper with <code>{{primary_author.twitter}}</code> or <code>{{authors.[#].twitter}}</code>',
140
+ details: oneLineTrim`The usage of <code>{{author.twitter}}</code> is deprecated and should be replaced with either <code>{{primary_author.twitter}}</code>
141
+ or <code>{{authors.[#].twitter}}</code>.<br>
142
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
143
+ regex: /{{\s*?author\.twitter\s*?}}/g,
144
+ helper: '{{author.twitter}}'
158
145
  },
159
- 'GS070-VALID-TRANSLATIONS': {
146
+ 'GS001-DEPR-AUTH-FB': {
160
147
  level: 'error',
161
- rule: 'Theme translations must be parsable',
162
- fatal: true, // overwritten from v3 to be fatal
163
- details: oneLineTrim`Theme translations (located in <code>locales/*.json</code>) need to be readable by the node JSON parser, or they will not be applied.`
148
+ fatal: true,
149
+ rule: 'Replace the <code>{{author.facebook}}</code> helper with <code>{{primary_author.facebook}}</code> or <code>{{authors.[#].facebook}}</code>',
150
+ details: oneLineTrim`The usage of <code>{{author.facebook}}</code> is deprecated and should be replaced with either <code>{{primary_author.facebook}}</code>
151
+ or <code>{{authors.[#].facebook}}</code>.<br>
152
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
153
+ regex: /{{\s*?author\.facebook\s*?}}/g,
154
+ helper: '{{author.facebook}}'
164
155
  },
165
- 'GS090-NO-IMG-URL-IN-CONDITIONALS': {
166
- level: 'warning',
167
- rule: 'The {{img_url}} helper should not be used as a parameter to {{#if}} or {{#unless}}',
168
- fatal: false,
169
- details: oneLineTrim`The {{img_url}} helper should not be used as a parameter to {{#if}} or {{#unless}}`
156
+ 'GS001-DEPR-AUTH-PIMG': {
157
+ level: 'error',
158
+ fatal: true,
159
+ rule: 'Replace the <code>{{author.profile_image}}</code> helper with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
160
+ details: oneLineTrim`The usage of <code>{{author.profile_image}}</code> is deprecated and should be replaced with either <code>{{primary_author.profile_image}}</code>
161
+ or <code>{{authors.[#].profile_image}}</code>.<br>
162
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
163
+ regex: /{{\s*?author\.profile_image\s*?}}/g,
164
+ helper: '{{author.profile_image}}'
170
165
  },
171
- 'GS090-NO-UNKNOWN-CUSTOM-THEME-SETTINGS': {
166
+ 'GS001-DEPR-AUTH-CIMG': {
172
167
  level: 'error',
173
- rule: 'An unkown custom theme setting has been used.',
174
- fatal: false,
175
- details: oneLineTrim`The custom theme setting should all be defined in the package.json <code>config.custom</code> object.`
168
+ fatal: true,
169
+ rule: 'Replace the <code>{{author.cover_image}}</code> helper with <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>',
170
+ details: oneLineTrim`The usage of <code>{{author.cover_image}}</code> is deprecated and should be replaced with either <code>{{primary_author.cover_image}}</code>
171
+ or <code>{{authors.[#].cover_image}}</code>.<br>
172
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
173
+ regex: /{{\s*?author\.cover_image\s*?}}/g,
174
+ helper: '{{author.cover_image}}'
176
175
  },
177
- 'GS090-NO-UNKNOWN-CUSTOM-THEME-SELECT-VALUE-IN-MATCH': {
176
+ 'GS001-DEPR-AUTH-URL': {
178
177
  level: 'error',
179
- rule: 'A custom theme setting of type <code>select</code> has been compared to a value that isn\'t defined.',
180
- fatal: false,
181
- details: oneLineTrim`Custom theme settings of type <code>select</code> can only be compared to their defined <code>options</code> when used in a <code>match</code> block.`
178
+ fatal: true,
179
+ rule: 'Replace the <code>{{author.url}}</code> helper with <code>{{primary_author.url}}</code> or <code>{{authors.[#].url}}</code>',
180
+ details: oneLineTrim`The usage of <code>{{author.url}}</code> is deprecated and should be replaced with either <code>{{primary_author.url}}</code>
181
+ or <code>{{authors.[#].url}}</code>.<br>
182
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
183
+ regex: /{{\s*?author\.url\s*?}}/g,
184
+ helper: '{{author.url}}'
182
185
  },
183
- 'GS100-NO-UNUSED-CUSTOM-THEME-SETTING': {
186
+ 'GS001-DEPR-PAUTH': {
184
187
  level: 'error',
185
- rule: 'A custom theme setting defined in <code>package.json</code> hasn\'t been used in any theme file.',
186
- details: oneLineTrim`Custom theme settings defined in <code>package.json</code> must be used at least once in the theme templates.`
188
+ fatal: true,
189
+ rule: 'Replace the <code>{{post.author}}</code> helper with <code>{{post.primary_author}}</code> or <code>{{authors.[#]}}</code>',
190
+ details: oneLineTrim`The usage of <code>{{post.author}}</code> is deprecated and should be replaced with either <code>{{post.primary_author}}</code>
191
+ or <code>{{post.authors.[#]}}</code>.<br>
192
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
193
+ regex: /{{\s*?post\.author\s*?}}/g,
194
+ helper: '{{post.author}}'
187
195
  },
188
-
189
- 'GS050-CSS-KGCO': cssCardRule('callout', 'kg-callout-card'),
190
- 'GS050-CSS-KGCOE': cssCardRule('callout', 'kg-callout-card-emoji'),
191
- 'GS050-CSS-KGCOT': cssCardRule('callout', 'kg-callout-card-text'),
192
- 'GS050-CSS-KGCOBGGY': cssCardRule('callout', 'kg-callout-card-background-grey'),
193
- 'GS050-CSS-KGCOBGW': cssCardRule('callout', 'kg-callout-card-background-white'),
194
- 'GS050-CSS-KGCOBGB': cssCardRule('callout', 'kg-callout-card-background-blue'),
195
- 'GS050-CSS-KGCOBGGN': cssCardRule('callout', 'kg-callout-card-background-green'),
196
- 'GS050-CSS-KGCOBGY': cssCardRule('callout', 'kg-callout-card-background-yellow'),
197
- 'GS050-CSS-KGCOBGR': cssCardRule('callout', 'kg-callout-card-background-red'),
198
- 'GS050-CSS-KGCOBGPK': cssCardRule('callout', 'kg-callout-card-background-pink'),
199
- 'GS050-CSS-KGCOBGPE': cssCardRule('callout', 'kg-callout-card-background-purple'),
200
- 'GS050-CSS-KGCOBGA': cssCardRule('callout', 'kg-callout-card-background-accent'),
201
-
202
- 'GS050-CSS-KG-NFT': cssCardRule('nft', 'kg-nft-card'),
203
- 'GS050-CSS-KG-NFTCO': cssCardRule('nft', 'kg-nft-card-container'),
204
- 'GS050-CSS-KG-NFTMD': cssCardRule('nft', 'kg-nft-metadata'),
205
- 'GS050-CSS-KG-NFTIMG': cssCardRule('nft', 'kg-nft-image'),
206
- 'GS050-CSS-KG-NFTHD': cssCardRule('nft', 'kg-nft-header'),
207
- 'GS050-CSS-KG-NFTTIT': cssCardRule('nft', 'kg-nft-title'),
208
- 'GS050-CSS-KG-NFTLG': cssCardRule('nft', 'kg-nft-logo'),
209
- 'GS050-CSS-KG-NFTCTR': cssCardRule('nft', 'kg-nft-creator'),
210
- 'GS050-CSS-KG-NFTDSC': cssCardRule('nft', 'kg-nft-description'),
211
-
212
- 'GS050-CSS-KGTGL': cssCardRule('toggle', 'kg-toggle-card'),
213
- 'GS050-CSS-KGTGLH': cssCardRule('toggle', 'kg-toggle-heading'),
214
- 'GS050-CSS-KGTGLHT': cssCardRule('toggle', 'kg-toggle-heading-text'),
215
- 'GS050-CSS-KGTGLIC': cssCardRule('toggle', 'kg-toggle-card-icon'),
216
- 'GS050-CSS-KGTGLC': cssCardRule('toggle', 'kg-toggle-content'),
217
-
218
- 'GS050-CSS-KGAUD': cssCardRule('audio', 'kg-audio-card'),
219
- 'GS050-CSS-KGAUDTHUMB': cssCardRule('audio', 'kg-audio-thumbnail'),
220
- 'GS050-CSS-KGAUDTHUMBPL': cssCardRule('audio', 'kg-audio-thumbnail.placeholder'),
221
- 'GS050-CSS-KGAUDPLCNT': cssCardRule('audio', 'kg-audio-player-container'),
222
- 'GS050-CSS-KGAUDTI': cssCardRule('audio', 'kg-audio-title'),
223
- 'GS050-CSS-KGAUDPL': cssCardRule('audio', 'kg-audio-player'),
224
- 'GS050-CSS-KGAUDCURRTM': cssCardRule('audio', 'kg-audio-current-time'),
225
- 'GS050-CSS-KGAUDTM': cssCardRule('audio', 'kg-audio-time'),
226
- 'GS050-CSS-KGAUDDUR': cssCardRule('audio', 'kg-audio-duration'),
227
- 'GS050-CSS-KGAUDPLICO': cssCardRule('audio', 'kg-audio-play-icon'),
228
- 'GS050-CSS-KGAUDPAUICO': cssCardRule('audio', 'kg-audio-pause-icon'),
229
- 'GS050-CSS-KGAUDSKSL': cssCardRule('audio', 'kg-audio-seek-slider'),
230
- 'GS050-CSS-KGAUDPLRT': cssCardRule('audio', 'kg-audio-playback-rate'),
231
- 'GS050-CSS-KGAUDMTICO': cssCardRule('audio', 'kg-audio-mute-icon'),
232
- 'GS050-CSS-KGAUDUNMTICO': cssCardRule('audio', 'kg-audio-unmute-icon'),
233
- 'GS050-CSS-KGAUDVOLSL': cssCardRule('audio', 'kg-audio-volume-slider'),
234
-
235
- 'GS050-CSS-KGVID': cssCardRule('video', 'kg-video-card'),
236
- 'GS050-CSS-KGVIDHD': cssCardRule('video', 'kg-video-hide'),
237
- 'GS050-CSS-KGVIDCNT': cssCardRule('video', 'kg-video-container'),
238
- 'GS050-CSS-KGVIDOVL': cssCardRule('video', 'kg-video-overlay'),
239
- 'GS050-CSS-KGVIDLGPLICO': cssCardRule('video', 'kg-video-large-play-icon'),
240
- 'GS050-CSS-KGVIDTHUMB': cssCardRule('video', 'kg-video-thumbnail'),
241
- 'GS050-CSS-KGVIDTHUMBPL': cssCardRule('video', 'kg-video-thumbnail.placeholder'),
242
- 'GS050-CSS-KGVIDPLCNT': cssCardRule('video', 'kg-video-player-container'),
243
- 'GS050-CSS-KGVIDTI': cssCardRule('video', 'kg-video-title'),
244
- 'GS050-CSS-KGVIDPL': cssCardRule('video', 'kg-video-player'),
245
- 'GS050-CSS-KGVIDCURRTM': cssCardRule('video', 'kg-video-current-time'),
246
- 'GS050-CSS-KGVIDTM': cssCardRule('video', 'kg-video-time'),
247
- 'GS050-CSS-KGVIDDUR': cssCardRule('video', 'kg-video-duration'),
248
- 'GS050-CSS-KGVIDPLICO': cssCardRule('video', 'kg-video-play-icon'),
249
- 'GS050-CSS-KGVIDPAUICO': cssCardRule('video', 'kg-video-pause-icon'),
250
- 'GS050-CSS-KGVIDSKSL': cssCardRule('video', 'kg-video-seek-slider'),
251
- 'GS050-CSS-KGVIDPLRT': cssCardRule('video', 'kg-video-playback-rate'),
252
- 'GS050-CSS-KGVIDMTICO': cssCardRule('video', 'kg-video-mute-icon'),
253
- 'GS050-CSS-KGVIDUNMTICO': cssCardRule('video', 'kg-video-unmute-icon'),
254
- 'GS050-CSS-KGVIDVOLSL': cssCardRule('video', 'kg-video-volume-slider'),
255
-
256
- 'GS050-CSS-KGBTN': cssCardRule('button', 'kg-button-card'),
257
- 'GS050-CSS-KGBTNL': cssCardRule('button', 'kg-button-card.kg-align-left'),
258
- 'GS050-CSS-KGBTNC': cssCardRule('button', 'kg-button-card.kg-align-center'),
259
- 'GS050-CSS-KGBTNBTN': cssCardRule('button', 'kg-btn'),
260
- 'GS050-CSS-KGBTNBTNA': cssCardRule('button', 'kg-btn-accent'),
261
-
262
- 'GS050-CSS-KGPR': cssCardRule('product', 'kg-product-card'),
263
- 'GS050-CSS-KGPRBTNA': cssCardRule('product', 'kg-product-card-btn-accent'),
264
- 'GS050-CSS-KGPRBTN': cssCardRule('product', 'kg-product-card-button'),
265
- 'GS050-CSS-KGPRCO': cssCardRule('product', 'kg-product-card-container'),
266
- 'GS050-CSS-KGPRDE': cssCardRule('product', 'kg-product-card-description'),
267
- 'GS050-CSS-KGPRIM': cssCardRule('product', 'kg-product-card-image'),
268
- 'GS050-CSS-KGPRRA': cssCardRule('product', 'kg-product-card-rating'),
269
- 'GS050-CSS-KGPRRAA': cssCardRule('product', 'kg-product-card-rating-active'),
270
- 'GS050-CSS-KGPRRAS': cssCardRule('product', 'kg-product-card-rating-star'),
271
- 'GS050-CSS-KGPRTI': cssCardRule('product', 'kg-product-card-title'),
272
- 'GS050-CSS-KGPRTICO': cssCardRule('product', 'kg-product-card-title-container'),
273
-
274
- 'GS050-CSS-KGBA': cssCardRule('before-after', 'kg-before-after-card'),
275
- 'GS050-CSS-KGBAIA': cssCardRule('before-after', 'kg-before-after-card-image-before'),
276
- 'GS050-CSS-KGBAIB': cssCardRule('before-after', 'kg-before-after-card-image-after'),
277
-
278
- 'GS050-CSS-KGFL': cssCardRule('file', 'kg-file-card'),
279
- 'GS050-CSS-KGFLCON': cssCardRule('file', 'kg-file-card-container'),
280
- 'GS050-CSS-KGFLCNT': cssCardRule('file', 'kg-file-card-contents'),
281
- 'GS050-CSS-KGFLTTL': cssCardRule('file', 'kg-file-card-title'),
282
- 'GS050-CSS-KGFLCAP': cssCardRule('file', 'kg-file-card-caption'),
283
- 'GS050-CSS-KGFLNM': cssCardRule('file', 'kg-file-card-filename'),
284
- 'GS050-CSS-KGFLSZ': cssCardRule('file', 'kg-file-card-filesize'),
285
- 'GS050-CSS-KGFLMD': cssCardRule('file', 'kg-file-card-medium'),
286
- 'GS050-CSS-KGFLSM': cssCardRule('file', 'kg-file-card-small'),
287
-
288
- 'GS050-CSS-KGBQALT': cssCardRule('blockquote', 'kg-blockquote-alt')
196
+ 'GS001-DEPR-PAUTH-ID': {
197
+ level: 'error',
198
+ fatal: true,
199
+ rule: 'Replace the <code>{{post.author.id}}</code> helper with <code>{{post.primary_author.id}}</code> or <code>{{authors.[#].id}}</code>',
200
+ details: oneLineTrim`The usage of <code>{{post.author.id}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.id}}</code>
201
+ or <code>{{post.authors.[#].id}}</code>.<br>
202
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
203
+ regex: /{{\s*?post\.author\.id\s*?}}/g,
204
+ helper: '{{post.author.id}}'
205
+ },
206
+ 'GS001-DEPR-PAUTH-SLUG': {
207
+ level: 'error',
208
+ fatal: true,
209
+ rule: 'Replace the <code>{{post.author.slug}}</code> helper with <code>{{post.primary_author.slug}}</code> or <code>{{post.authors.[#].slug}}</code>',
210
+ details: oneLineTrim`The usage of <code>{{post.author.slug}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.slug}}</code>
211
+ or <code>{{post.authors.[#].slug}}</code>.<br>
212
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
213
+ regex: /{{\s*?post\.author\.slug\s*?}}/g,
214
+ helper: '{{post.author.slug}}'
215
+ },
216
+ 'GS001-DEPR-PAUTH-MAIL': {
217
+ level: 'error',
218
+ fatal: true,
219
+ rule: 'Replace the <code>{{post.author.email}}</code> helper with <code>{{post.primary_author.email}}</code> or <code>{{post.authors.[#].email}}</code>',
220
+ details: oneLineTrim`The usage of <code>{{post.author.email}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.email}}</code>
221
+ or <code>{{post.authors.[#].email}}</code>.<br>
222
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
223
+ regex: /{{\s*?post\.author\.email\s*?}}/g,
224
+ helper: '{{post.author.email}}'
225
+ },
226
+ 'GS001-DEPR-PAUTH-MT': {
227
+ level: 'error',
228
+ fatal: true,
229
+ rule: 'Replace the <code>{{post.author.meta_title}}</code> helper with <code>{{post.primary_author.meta_title}}</code> or <code>{{post.authors.[#].meta_title}}</code>',
230
+ details: oneLineTrim`The usage of <code>{{post.author.meta_title}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.meta_title}}</code>
231
+ or <code>{{post.authors.[#].meta_title}}</code>.<br>
232
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
233
+ regex: /{{\s*?post\.author\.meta_title\s*?}}/g,
234
+ helper: '{{post.author.meta_title}}'
235
+ },
236
+ 'GS001-DEPR-PAUTH-MD': {
237
+ level: 'error',
238
+ fatal: true,
239
+ rule: 'Replace the <code>{{post.author.meta_description}}</code> helper with <code>{{post.primary_author.meta_description}}</code> or <code>{{post.authors.[#].meta_description}}</code>',
240
+ details: oneLineTrim`The usage of <code>{{post.author.meta_description}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.meta_description}}</code>
241
+ or <code>{{post.authors.[#].meta_description}}</code>.<br>
242
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
243
+ regex: /{{\s*?post\.author\.meta_description\s*?}}/g,
244
+ helper: '{{post.author.meta_description}}'
245
+ },
246
+ 'GS001-DEPR-PAUTH-NAME': {
247
+ level: 'error',
248
+ fatal: true,
249
+ rule: 'Replace the <code>{{post.author.name}}</code> helper with <code>{{post.primary_author.name}}</code> or <code>{{post.authors.[#].name}}</code>',
250
+ details: oneLineTrim`The usage of <code>{{post.author.name}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.name}}</code>
251
+ or <code>{{post.authors.[#].name}}</code>.<br>
252
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
253
+ regex: /{{\s*?post\.author\.name\s*?}}/g,
254
+ helper: '{{post.author.name}}'
255
+ },
256
+ 'GS001-DEPR-PAUTH-BIO': {
257
+ level: 'error',
258
+ fatal: true,
259
+ rule: 'Replace the <code>{{post.author.bio}}</code> helper with <code>{{post.primary_author.bio}}</code> or <code>{{post.authors.[#].bio}}</code>',
260
+ details: oneLineTrim`The usage of <code>{{post.author.bio}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.bio}}</code>
261
+ or <code>{{post.authors.[#].bio}}</code>.<br>
262
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
263
+ regex: /{{\s*?post\.author\.bio\s*?}}/g,
264
+ helper: '{{post.author.bio}}'
265
+ },
266
+ 'GS001-DEPR-PAUTH-LOC': {
267
+ level: 'error',
268
+ fatal: true,
269
+ rule: 'Replace the <code>{{post.author.location}}</code> helper with <code>{{post.primary_author.location}}</code> or <code>{{post.authors.[#].location}}</code>',
270
+ details: oneLineTrim`The usage of <code>{{post.author.location}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.location}}</code>
271
+ or <code>{{post.authors.[#].location}}</code>.<br>
272
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
273
+ regex: /{{\s*?post\.author\.location\s*?}}/g,
274
+ helper: '{{post.author.location}}'
275
+ },
276
+ 'GS001-DEPR-PAUTH-WEB': {
277
+ level: 'error',
278
+ fatal: true,
279
+ rule: 'Replace the <code>{{post.author.website}}</code> helper with <code>{{post.primary_author.website}}</code> or <code>{{post.authors.[#].website}}</code>',
280
+ details: oneLineTrim`The usage of <code>{{post.author.website}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.website}}</code>
281
+ or <code>{{post.authors.[#].website}}</code>.<br>
282
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
283
+ regex: /{{\s*?post\.author\.website\s*?}}/g,
284
+ helper: '{{post.author.website}}'
285
+ },
286
+ 'GS001-DEPR-PAUTH-TW': {
287
+ level: 'error',
288
+ fatal: true,
289
+ rule: 'Replace the <code>{{post.author.twitter}}</code> helper with <code>{{post.primary_author.twitter}}</code> or <code>{{post.authors.[#].twitter}}</code>',
290
+ details: oneLineTrim`The usage of <code>{{post.author.twitter}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.twitter}}</code>
291
+ or <code>{{post.authors.[#].twitter}}</code>.<br>
292
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
293
+ regex: /{{\s*?post\.author\.twitter\s*?}}/g,
294
+ helper: '{{post.author.twitter}}'
295
+ },
296
+ 'GS001-DEPR-PAUTH-FB': {
297
+ level: 'error',
298
+ fatal: true,
299
+ rule: 'Replace the <code>{{post.author.facebook}}</code> helper with <code>{{post.primary_author.facebook}}</code> or <code>{{post.authors.[#].facebook}}</code>',
300
+ details: oneLineTrim`The usage of <code>{{post.author.facebook}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.facebook}}</code>
301
+ or <code>{{post.authors.[#].facebook}}</code>.<br>
302
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
303
+ regex: /{{\s*?post\.author\.facebook\s*?}}/g,
304
+ helper: '{{post.author.facebook}}'
305
+ },
306
+ 'GS001-DEPR-PAUTH-PIMG': {
307
+ level: 'error',
308
+ fatal: true,
309
+ rule: 'Replace the <code>{{post.author.profile_image}}</code> helper with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
310
+ details: oneLineTrim`The usage of <code>{{post.author.profile_image}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.profile_image}}</code>
311
+ or <code>{{post.authors.[#].profile_image}}</code>.<br>
312
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
313
+ regex: /{{\s*?post\.author\.profile_image\s*?}}/g,
314
+ helper: '{{post.author.profile_image}}'
315
+ },
316
+ 'GS001-DEPR-PAUTH-CIMG': {
317
+ level: 'error',
318
+ fatal: true,
319
+ rule: 'Replace the <code>{{post.author.cover_image}}</code> helper with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
320
+ details: oneLineTrim`The usage of <code>{{post.author.cover_image}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.cover_image}}</code>
321
+ or <code>{{post.authors.[#].cover_image}}</code>.<br>
322
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
323
+ regex: /{{\s*?post\.author\.cover_image\s*?}}/g,
324
+ helper: '{{post.author.cover_image}}'
325
+ },
326
+ 'GS001-DEPR-PAUTH-URL': {
327
+ level: 'error',
328
+ fatal: true,
329
+ rule: 'Replace the <code>{{post.author.url}}</code> helper with <code>{{post.primary_author.url}}</code> or <code>{{post.authors.[#].url}}</code>',
330
+ details: oneLineTrim`The usage of <code>{{post.author.url}}</code> is deprecated and should be replaced with either <code>{{post.primary_author.url}}</code>
331
+ or <code>{{post.authors.[#].url}}</code>.<br>
332
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
333
+ regex: /{{\s*?post\.author\.url\s*?}}/g,
334
+ helper: '{{post.author.url}}'
335
+ },
336
+ 'GS001-DEPR-PAID': {
337
+ level: 'error',
338
+ fatal: true,
339
+ rule: 'Replace <code>{{post.author_id}}</code> code with <code>{{post.primary_author.id}}</code>',
340
+ details: oneLineTrim`The <code>{{post.author_id}}</code> attribute in post context was removed<br>
341
+ Instead of <code>{{post.author_id}}</code> you need to use <code>{{post.primary_author.id}}</code>.<br>
342
+ See the object attributes of <code>post</code> <a href="${docsBaseUrl}context/post/#post-object-attributes" target=_blank>here</a>.`,
343
+ regex: /{{\s*?post\.author_id\s*?}}/g,
344
+ helper: '{{post.author_id}}'
345
+ },
346
+ 'GS001-DEPR-NAUTH': {
347
+ level: 'error',
348
+ fatal: true,
349
+ rule: 'Replace <code>../author</code> with <code>../primary_author</code> or <code>../authors.[#]</code>',
350
+ details: oneLineTrim`The usage of <code>../author</code> is deprecated and should be replaced with either <code>../primary_author</code>
351
+ or <code>../authors.[#]</code>.<br>
352
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
353
+ regex: /{{\s*?(?:#|#if)?\s*?\.\.\/author(?:\.\S*?)?\s*?}}/g,
354
+ helper: '{{../author}}'
355
+ },
356
+ 'GS001-DEPR-IUA': {
357
+ level: 'error',
358
+ fatal: true,
359
+ rule: 'Replace <code>{{img_url author.*}}</code> with <code>{{img_url primary_author.*}}</code> or <code>.{img_url author.[#].*}}</code>',
360
+ details: oneLineTrim`The usage of <code>{{img_url author.*}}</code> is deprecated and should be replaced with either <code>{{img_url primary_author.*}}</code>
361
+ or <code>{{img_url author.[#].*}}</code>.<br>
362
+ Find more information about the <code>{{authors}}</code> helper <a href="${docsBaseUrl}helpers/authors/" target=_blank>here</a>.`,
363
+ regex: /{{\s*?img_url\s*?(author.).*}}/g,
364
+ helper: '{{img_url author.*}}'
365
+ },
366
+ 'GS001-DEPR-AC': {
367
+ level: 'error',
368
+ fatal: true,
369
+ rule: 'Replace the <code>{{author.cover}}</code> helper with <code>{{primary_author.cover_image}}</code>',
370
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
371
+ Instead of <code>{{author.cover}}</code> you need to use
372
+ <code>{{primary_author.cover_image}}</code> or <code>{{authors.[#].cover_image}}</code>.<br>
373
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
374
+ regex: /{{\s*?author\.cover\s*?}}/g,
375
+ helper: '{{author.cover}}'
376
+ },
377
+ 'GS001-DEPR-AIMG': {
378
+ level: 'error',
379
+ fatal: true,
380
+ rule: 'Replace the <code>{{author.image}}</code> helper with <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>',
381
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
382
+ Instead of <code>{{author.image}}</code>, you need to use
383
+ <code>{{primary_author.profile_image}}</code> or <code>{{authors.[#].profile_image}}</code>.<br>
384
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
385
+ regex: /{{\s*?author\.image\s*?}}/g,
386
+ helper: '{{author.image}}'
387
+ },
388
+ 'GS001-DEPR-PAC': {
389
+ level: 'error',
390
+ fatal: true,
391
+ rule: 'Replace the <code>{{post.author.cover}}</code> helper with <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>',
392
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
393
+ Instead of <code>{{post.author.cover}}</code>, you need to use
394
+ <code>{{post.primary_author.cover_image}}</code> or <code>{{post.authors.[#].cover_image}}</code>.<br>
395
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
396
+ regex: /{{\s*?post\.author\.cover\s*?}}/g,
397
+ helper: '{{post.author.cover}}'
398
+ },
399
+ 'GS001-DEPR-PAIMG': {
400
+ level: 'error',
401
+ fatal: true,
402
+ rule: 'Replace the <code>{{post.author.image}}</code> helper with <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>',
403
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
404
+ Instead of <code>{{post.author.image}}</code>, you need to use
405
+ <code>{{post.primary_author.profile_image}}</code> or <code>{{post.authors.[#].profile_image}}</code>.<br>
406
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
407
+ regex: /{{\s*?post\.author\.image\s*?}}/g,
408
+ helper: '{{post.author.image}}'
409
+ },
410
+ 'GS001-DEPR-CON-AC': {
411
+ level: 'error',
412
+ fatal: true,
413
+ rule: 'Replace the <code>{{#if author.cover}}</code> helper with <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>',
414
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
415
+ Instead of <code>{{#if author.cover}}</code>, you need to use
416
+ <code>{{#if primary_author.cover_image}}</code> or <code>{{#if authors.[#].cover_image}}</code>.<br>
417
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
418
+ regex: /{{\s*?#if\s*?author\.cover\s*?}}/g,
419
+ helper: '{{#if author.cover}}'
420
+ },
421
+ 'GS001-DEPR-CON-AIMG': {
422
+ level: 'error',
423
+ fatal: true,
424
+ rule: 'Replace the <code>{{#if author.image}}</code> helper with <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>',
425
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
426
+ Instead of <code>{{#if author.image}}</code>, you need to use
427
+ <code>{{#if primary_author.profile_image}}</code> or <code>{{#if authors.[#].profile_image}}</code>.<br>
428
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
429
+ regex: /{{\s*?#if\s*?author\.image\s*?}}/g,
430
+ helper: '{{#if author.image}}'
431
+ },
432
+ 'GS001-DEPR-CON-PAC': {
433
+ level: 'error',
434
+ fatal: true,
435
+ rule: 'Replace the <code>{{#if post.author.cover}}</code> helper with <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>',
436
+ details: oneLineTrim`The <code>cover</code> attribute was replaced with <code>cover_image</code>.<br>
437
+ Instead of <code>{{#if post.author.cover}}</code>, you need to use
438
+ <code>{{#if post.primary_author.cover_image}}</code> or <code>{{#if post.authors.[#].cover_image}}</code>.<br>
439
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
440
+ regex: /{{\s*?#if\s*?post\.author\.cover\s*?}}/g,
441
+ helper: '{{#if post.author.cover}}'
442
+ },
443
+ 'GS001-DEPR-CON-PAIMG': {
444
+ level: 'error',
445
+ fatal: true,
446
+ rule: 'Replace the <code>{{#if post.author.image}}</code> helper with <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>',
447
+ details: oneLineTrim`The <code>image</code> attribute was replaced with <code>profile_image</code>.<br>
448
+ Instead of <code>{{#if post.author.image}}</code>, you need to use
449
+ <code>{{#if post.primary_author.profile_image}}</code> or <code>{{#if post.authors.[#].profile_image}}</code>.<br>
450
+ See the object attributes of <code>author</code> <a href="${docsBaseUrl}context/author/#author-object-attributes" target=_blank>here</a>.`,
451
+ regex: /{{\s*?#if\s*?post\.author\.image\s*?}}/g,
452
+ helper: '{{#if post.author.image}}'
453
+ }
289
454
  };
290
455
 
291
456
  knownHelpers = _.union(previousKnownHelpers, knownHelpers);