gscan 5.2.2 → 5.2.5

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2025 Ghost Foundation
1
+ Copyright (c) 2013-2026 Ghost Foundation
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
package/README.md CHANGED
@@ -114,4 +114,4 @@ When developing new rules or testing gscan following tools are great to have in
114
114
 
115
115
  # Copyright & License
116
116
 
117
- Copyright (c) 2013-2025 Ghost Foundation - Released under the [MIT license](LICENSE). Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our [trademark policy](https://ghost.org/trademark/) for info on acceptable usage.
117
+ Copyright (c) 2013-2026 Ghost Foundation - Released under the [MIT license](LICENSE). Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our [trademark policy](https://ghost.org/trademark/) for info on acceptable usage.
package/bin/cli.js CHANGED
@@ -146,7 +146,7 @@ function outputResult(result, options) {
146
146
  ui.log(message);
147
147
  });
148
148
  } else {
149
- ui.log(`${chalk.bold('Affected Files:')} ${_.map(result.failures, 'ref')}`);
149
+ ui.log(`${chalk.bold('Affected Files:')} ${_.uniq(_.map(result.failures, 'ref')).join(', ')}`);
150
150
  }
151
151
  }
152
152
 
@@ -34,9 +34,11 @@ function processFileFunction(files, failures, rules, partialVerificationCache) {
34
34
  });
35
35
 
36
36
  if (astResults.length) {
37
- failures.push({
38
- ref: themeFile.file,
39
- message: astResults[0].message
37
+ astResults.forEach((result) => {
38
+ failures.push({
39
+ ref: themeFile.file,
40
+ message: `${result.message} (L${result.line})`
41
+ });
40
42
  });
41
43
  }
42
44
 
package/lib/specs/v1.js CHANGED
@@ -323,7 +323,7 @@ rules = {
323
323
  rule: 'Replace <code>{{@blog.posts_per_page}}</code> with <code>{{@config.posts_per_page}}</code>',
324
324
  details: oneLineTrim`The global <code>{{@blog.posts_per_page}}</code> property was replaced with <code>{{@config.posts_per_page}}</code>.<br>
325
325
  Read <a href="${docsBaseUrl}helpers/config/" target=_blank>here</a> about the attribute and
326
- check <a href="${docsBaseUrl}structure/#packagejson" target=_blank>here</a> where you can customise the posts per page setting, as this is now adjustable in your theme.`,
326
+ check <a href="${docsBaseUrl}structure/#package-json" target=_blank>here</a> where you can customise the posts per page setting, as this is now adjustable in your theme.`,
327
327
  regex: /{{\s*?@blog\.posts_per_page\s*?}}/g,
328
328
  helper: '{{@blog.posts_per_page}}'
329
329
  },
@@ -394,65 +394,64 @@ rules = {
394
394
  level: 'error',
395
395
  rule: '<code>package.json</code> file should be present',
396
396
  details: oneLineTrim`You should provide a <code>package.json</code> file for your theme.<br>
397
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
397
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
398
398
  },
399
399
  'GS010-PJ-PARSE': {
400
400
  level: 'error',
401
401
  rule: '<code>package.json</code> file can be parsed',
402
402
  details: oneLineTrim`Your <code>package.json</code> file couldn't be parsed. This is mostly caused by a missing or unnecessary <code>','</code> or the wrong usage of <code>'""'</code>.<br>
403
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.<br>
404
- A good reference for your <code>package.json</code> file is always the latest version of <a href="https://github.com/TryGhost/Casper/blob/master/package.json" target=_blank>Casper</a>.`
403
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
405
404
  },
406
405
  'GS010-PJ-NAME-LC': {
407
406
  level: 'error',
408
407
  rule: '<code>package.json</code> property <code>"name"</code> must be lowercase',
409
408
  details: oneLineTrim`The property <code>"name"</code> in your <code>package.json</code> file must be lowercase.<br>
410
409
  Good examples are: <code>"my-theme"</code> or <code>"theme"</code> rather than <code>"My Theme"</code> or <code>"Theme"</code>.<br>
411
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
410
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
412
411
  },
413
412
  'GS010-PJ-NAME-HY': {
414
413
  level: 'error',
415
414
  rule: '<code>package.json</code> property <code>"name"</code> must be hyphenated',
416
415
  details: oneLineTrim`The property <code>"name"</code> in your <code>package.json</code> file must be hyphenated.<br>
417
416
  Please use <code>"my-theme"</code> rather than <code>"My Theme"</code> or <code>"my theme"</code>.<br>
418
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
417
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
419
418
  },
420
419
  'GS010-PJ-NAME-REQ': {
421
420
  level: 'error',
422
421
  rule: '<code>package.json</code> property <code>"name"</code> is required',
423
422
  details: oneLineTrim`Please add the property <code>"name"</code> to your <code>package.json</code>. E.g. <code>{"name": "my-theme"}</code>.<br>
424
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
423
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
425
424
  },
426
425
  'GS010-PJ-VERSION-SEM': {
427
426
  level: 'error',
428
427
  rule: '<code>package.json</code> property <code>"version"</code> must be semver compliant',
429
428
  details: oneLineTrim`The property <code>"version"</code> in your <code>package.json</code> file must be semver compliant. E.g. <code>{"version": "1.0.0"}</code>.<br>
430
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
429
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
431
430
  },
432
431
  'GS010-PJ-VERSION-REQ': {
433
432
  level: 'error',
434
433
  rule: '<code>package.json</code> property <code>"version"</code> is required',
435
434
  details: oneLineTrim`Please add the property <code>"version"</code> to your <code>package.json</code>. E.g. <code>{"version": "1.0.0"}</code>.<br>
436
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
435
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
437
436
  },
438
437
  'GS010-PJ-AUT-EM-VAL': {
439
438
  level: 'error',
440
439
  rule: '<code>package.json</code> property <code>"author.email"</code> must be valid',
441
440
  details: oneLineTrim`The property <code>"author.email"</code> in your <code>package.json</code> file must a valid email. E.g. <code>{"author": {"email": "hello@example.com"}}</code>.<br>
442
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
441
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
443
442
  },
444
443
  'GS010-PJ-CONF-PPP': {
445
444
  level: 'recommendation',
446
445
  rule: '<code>package.json</code> property <code>"config.posts_per_page"</code> is recommended. Otherwise, it falls back to 5',
447
446
  details: oneLineTrim`Please add <code>"posts_per_page"</code> to your <code>package.json</code>. E.g. <code>{"config": { "posts_per_page": 5}}</code>.<br>
448
447
  If no <code>"posts_per_page"</code> property is provided, Ghost will use its default setting of 5 posts per page.<br>
449
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
448
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
450
449
  },
451
450
  'GS010-PJ-CONF-PPP-INT': {
452
451
  level: 'error',
453
452
  rule: '<code>package.json</code> property <code>"config.posts_per_page"</code> must be a number above 0',
454
453
  details: oneLineTrim`The property <code>"config.posts_per_page"</code> in your <code>package.json</code> file must be a number greater than zero. E.g. <code>{"config": { "posts_per_page": 5}}</code>.<br>
455
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
454
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
456
455
  },
457
456
  'GS010-PJ-AUT-EM-REQ': {
458
457
  level: 'error',
@@ -461,7 +460,7 @@ rules = {
461
460
  The email is required so that themes which are distributed (either free or paid) have a method of contacting the author so users can get support and more importantly so that>
462
461
  Ghost can reach out about breaking changes and security updates.<br>
463
462
  The <code>package.json</code> file is <strong>NOT</strong> accessible when uploaded to a blog so if the theme is only uploaded to a single blog, no one will see this email address.<br>
464
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
463
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> to see which properties are required and which are recommended.`
465
464
  },
466
465
  'GS020-INDEX-REQ': {
467
466
  level: 'error',
@@ -476,14 +475,14 @@ rules = {
476
475
  rule: 'A template file called <code>post.hbs</code> must be present',
477
476
  fatal: true,
478
477
  details: oneLineTrim`Your theme must have a template file called <code>index.hbs</code>.<br>
479
- Read <a href="${docsBaseUrl}structure/#templates" target=_blank>here</a> more about the required template structure and <code>post.hbs</code> in <a href="${docsBaseUrl}structure/#posthbs" target=_blank>particular</a>.`,
478
+ Read <a href="${docsBaseUrl}structure/#templates" target=_blank>here</a> more about the required template structure and <code>post.hbs</code> in <a href="${docsBaseUrl}structure/#post-hbs" target=_blank>particular</a>.`,
480
479
  path: 'post.hbs'
481
480
  },
482
481
  'GS020-DEF-REC': {
483
482
  level: 'recommendation',
484
483
  rule: 'Provide a default layout template called default.hbs',
485
484
  details: oneLineTrim`It is recommended that your theme has a template file called <code>default.hbs</code>.<br>
486
- Read <a href="${docsBaseUrl}structure/#templates" target=_blank>here</a> more about the recommended template structure and <code>default.hbs</code> in <a href="${docsBaseUrl}structure/#defaulthbs" target=_blank>particular</a>.`,
485
+ Read <a href="${docsBaseUrl}structure/#templates" target=_blank>here</a> more about the recommended template structure and <code>default.hbs</code> in <a href="${docsBaseUrl}structure/#default-hbs" target=_blank>particular</a>.`,
487
486
  path: 'default.hbs'
488
487
  },
489
488
  'GS030-ASSET-REQ': {
@@ -491,7 +490,7 @@ rules = {
491
490
  rule: 'Assets such as CSS & JS must use the <code>{{asset}}</code> helper',
492
491
  details: oneLineTrim`The listed files should be included using the <code>{{asset}}</code> helper.<br>
493
492
  For more information, please see the <a href="${docsBaseUrl}helpers/asset/" target=_blank><code>{{asset}}</code> helper documentation</a>.`,
494
- regex: /(src|href)=['"](.*?\/assets\/.*?)['"]/gmi
493
+ regex: /(src|href)=['"](?!https?:\/\/|\/\/)(.*?\/assets\/.*?)['"]/gmi
495
494
  },
496
495
  'GS030-ASSET-SYM': {
497
496
  level: 'error',
package/lib/specs/v2.js CHANGED
@@ -405,7 +405,7 @@ let rules = {
405
405
  rule: '<code>{{@blog.permalinks}}</code> was removed',
406
406
  details: oneLineTrim`With the introduction of Dynamic Routing, you can define multiple permalinks.<br>
407
407
  The <code>{{@blog.permalinks}}</code> property will therefore no longer be used and should be removed from the theme.
408
- Find more information about Ghost data helpers <a href="${docsBaseUrl}/helpers/#data-helpers" target=_blank>here</a>.`,
408
+ Find more information about Ghost data helpers <a href="${docsBaseUrl}helpers/data/" target=_blank>here</a>.`,
409
409
  regex: /{{\s*?@blog\.permalinks\s*?}}/g,
410
410
  helper: '{{@blog.permalinks}}'
411
411
  },
@@ -843,7 +843,7 @@ let rules = {
843
843
  level: 'warning',
844
844
  rule: '<code>package.json</code> property <code>keywords</code> should contain <code>ghost-theme</code>',
845
845
  details: oneLineTrim`The property <code>keywords</code> in your <code>package.json</code> file must contain <code>ghost-theme</code>. E.g. <code>{"keywords": ["ghost-theme"]}</code>.<br>
846
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
846
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
847
847
  }
848
848
  };
849
849
 
package/lib/specs/v3.js CHANGED
@@ -22,21 +22,21 @@ let rules = {
22
22
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is recommended. Otherwise, it falls back to "v3"',
23
23
  details: oneLineTrim`Please add <code>"ghost-api"</code> to your <code>package.json</code>. E.g. <code>{"engines": {"ghost-api": "v3"}}</code>.<br>
24
24
  If no <code>"ghost-api"</code> property is provided, Ghost will use its default setting of "v3" Ghost API.<br>
25
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
25
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
26
26
  },
27
27
  'GS010-PJ-GHOST-API-V01': {
28
28
  level: 'error',
29
29
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is incompatible with current version of Ghost API and will fall back to "v3"',
30
30
  details: oneLineTrim`Please change <code>"ghost-api"</code> in your <code>package.json</code> to higher version. E.g. <code>{"engines": {"ghost-api": "v3"}}</code>.<br>
31
31
  If <code>"ghost-api"</code> property is left at "v0.1", Ghost will use its default setting of "v3".<br>
32
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
32
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
33
33
  },
34
34
  'GS001-DEPR-ESC': {
35
35
  level: 'error',
36
36
  rule: 'Replace <code>{{error.code}}</code> with <code>{{error.statusCode}}</code>',
37
37
  details: oneLineTrim`The usage of <code>{{error.code}}</code> is deprecated and should be replaced with <code>{{error.statusCode}}</code>.<br>
38
38
  When in <code>error</code> context, e. g. in the <code>error.hbs</code> template, replace <code>{{code}}</code> with <code>{{statusCode}}</code>.<br>
39
- Find more information about the <code>error.hbs</code> template <a href="${docsBaseUrl}structure/#errorhbs" target=_blank>here</a>.`,
39
+ Find more information about the <code>error.hbs</code> template <a href="${docsBaseUrl}structure/#error-hbs" target=_blank>here</a>.`,
40
40
  regex: /{{\s*?(?:error\.)?(code)\s*?}}/g,
41
41
  helper: '{{error.code}}'
42
42
  },
package/lib/specs/v4.js CHANGED
@@ -35,75 +35,75 @@ let rules = {
35
35
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is deprecated.',
36
36
  details: oneLineTrim`Remove <code>"ghost-api"</code> from your <code>package.json</code>.<br>
37
37
  The <code>ghost-api</code> support will be removed in next major version of Ghost and should not be used.
38
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
38
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
39
39
  },
40
40
  'GS010-PJ-GHOST-API-V01': {
41
41
  level: 'error',
42
42
  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"',
43
43
  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>
44
44
  If <code>"ghost-api"</code> property is left at "v0.1", Ghost will use its default setting of "v4".<br>
45
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
45
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
46
46
  },
47
47
  'GS010-PJ-GHOST-API-V2': {
48
48
  level: 'warning',
49
49
  rule: '<code>package.json</code> property <code>"engines.ghost-api"</code> is using a deprecated version of Ghost API',
50
50
  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>
51
51
  If <code>"ghost-api"</code> property is left at "v2", it will stop working with next major version upgrade and default to v5.<br>
52
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
52
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
53
53
  },
54
54
  'GS010-PJ-CUST-THEME-TOTAL-SETTINGS': {
55
55
  level: 'error',
56
56
  rule: '<code>package.json</code> property <code>"config.custom"</code> contains too many settings',
57
57
  details: oneLineTrim`Remove key from <code>"config.custom"</code> in your <code>package.json</code> to have less than or exactly 20 settings.<br>
58
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
58
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
59
59
  },
60
60
  'GS010-PJ-CUST-THEME-SETTINGS-CASE': {
61
61
  level: 'error',
62
62
  rule: '<code>package.json</code> property <code>"config.custom"</code> contains a property that isn\'t snake-cased',
63
63
  details: oneLineTrim`Rewrite all property in <code>"config.custom"</code> in your <code>package.json</code> in snake case.<br>
64
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
64
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
65
65
  },
66
66
  'GS010-PJ-CUST-THEME-SETTINGS-TYPE': {
67
67
  level: 'error',
68
68
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> should have a known <code>"type"</code>.',
69
69
  details: oneLineTrim`Only use the following types: <code>"select"</code>, <code>"boolean"</code>, <code>"color"</code>, <code>"image"</code>, <code>"text"</code>.<br>
70
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
70
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
71
71
  },
72
72
  'GS010-PJ-CUST-THEME-SETTINGS-GROUP': {
73
73
  level: 'recommendation',
74
74
  rule: '<code>package.json</code> objects defined in <code>"config.custom"</code> should have a known <code>"group"</code>.',
75
75
  details: oneLineTrim`Only use the following groups: <code>"post"</code>, <code>"homepage"</code>.<br>
76
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
76
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
77
77
  },
78
78
  'GS010-PJ-CUST-THEME-SETTINGS-SELECT-OPTIONS': {
79
79
  level: 'error',
80
80
  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>.',
81
81
  details: oneLineTrim`Make sure there is at least 2 <code>"options"</code> in each <code>"select"</code> custom theme property.<br>
82
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
82
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
83
83
  },
84
84
  'GS010-PJ-CUST-THEME-SETTINGS-SELECT-DEFAULT': {
85
85
  level: 'error',
86
86
  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>.',
87
87
  details: oneLineTrim`Make sure the <code>"default"</code> property matches a value in <code>"options"</code> of the same <code>"select"</code>.<br>
88
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
88
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
89
89
  },
90
90
  'GS010-PJ-CUST-THEME-SETTINGS-BOOLEAN-DEFAULT': {
91
91
  level: 'error',
92
92
  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>.',
93
93
  details: oneLineTrim`Make sure the <code>"default"</code> property is either <code>true</code> or <code>false</code>.<br>
94
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
94
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
95
95
  },
96
96
  'GS010-PJ-CUST-THEME-SETTINGS-COLOR-DEFAULT': {
97
97
  level: 'error',
98
98
  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>.',
99
99
  details: oneLineTrim`Make sure the <code>"default"</code> property is a valid 6-hexadecimal-digit color code like <code>#15171a</code>.<br>
100
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
100
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
101
101
  },
102
102
  'GS010-PJ-CUST-THEME-SETTINGS-IMAGE-DEFAULT': {
103
103
  level: 'error',
104
104
  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.',
105
105
  details: oneLineTrim`Make sure the <code>"default"</code> property is either <code>null</code>, an empty string <code>''</code> or isn't present.<br>
106
- Check the <a href="${docsBaseUrl}structure/#packagejson" target=_blank><code>package.json</code> documentation</a> for further information.`
106
+ Check the <a href="${docsBaseUrl}structure/#package-json" target=_blank><code>package.json</code> documentation</a> for further information.`
107
107
  },
108
108
  'GS001-DEPR-LABS-MEMBERS': {
109
109
  level: 'warning',
package/lib/specs/v5.js CHANGED
@@ -23,7 +23,7 @@ let rules = {
23
23
  level: 'warning',
24
24
  rule: 'Remove <code>"engines.ghost-api"</code> from <code>package.json</code>',
25
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}structure/#packagejson" target=_blank>here</a>.`
26
+ Find more information about the <code>package.json</code> file <a href="${docsBaseUrl}structure/#package-json" target=_blank>here</a>.`
27
27
  },
28
28
  'GS010-PJ-GHOST-CARD-ASSETS-NOT-PRESENT': {
29
29
  level: 'warning',
@@ -650,7 +650,7 @@ let rules = {
650
650
  rule: 'Remove uses of <code>{{@blog.permalinks}}</code>',
651
651
  details: oneLineTrim`With the introduction of Dynamic Routing, you can define multiple permalinks.<br>
652
652
  The <code>{{@blog.permalinks}}</code> property will therefore no longer be used and should be removed from the theme.
653
- Find more information about Ghost data helpers <a href="${docsBaseUrl}/helpers/#data-helpers" target=_blank>here</a>.`,
653
+ Find more information about Ghost data helpers <a href="${docsBaseUrl}helpers/data/" target=_blank>here</a>.`,
654
654
  regex: /{{\s*?@blog\.permalinks\s*?}}/g,
655
655
  helper: '{{@blog.permalinks}}'
656
656
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gscan",
3
- "version": "5.2.2",
3
+ "version": "5.2.5",
4
4
  "description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
5
5
  "keywords": [
6
6
  "ghost",