gscan 6.2.0 → 6.2.1
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.
|
@@ -6,7 +6,7 @@ module.exports = class NoUnknownCustomThemeSettings extends Rule {
|
|
|
6
6
|
const name = node.parts[1];
|
|
7
7
|
if (!this.isValidCustomThemeSettingReference(name)) {
|
|
8
8
|
this.log({
|
|
9
|
-
message: `
|
|
9
|
+
message: `Unknown {{@custom.${name}}} on line ${node.loc && node.loc.start.line}: ${this.sourceForNode(node)}`,
|
|
10
10
|
line: node.loc && node.loc.start.line,
|
|
11
11
|
column: node.loc && node.loc.start.column,
|
|
12
12
|
source: this.sourceForNode(node)
|
|
@@ -26,12 +26,12 @@ const ruleImplementations = {
|
|
|
26
26
|
const config = Object.keys(theme.customSettings);
|
|
27
27
|
const notUsedVariable = config.filter(x => !result.customThemeSettings.has(x));
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
notUsedVariable.forEach((name) => {
|
|
30
30
|
log.failure({
|
|
31
|
-
message: `
|
|
31
|
+
message: `config.custom.${name} is declared but never referenced from a template`,
|
|
32
32
|
ref: 'package.json'
|
|
33
33
|
});
|
|
34
|
-
}
|
|
34
|
+
});
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
};
|
package/lib/specs/v4.js
CHANGED
|
@@ -172,9 +172,9 @@ let rules = {
|
|
|
172
172
|
},
|
|
173
173
|
'GS090-NO-UNKNOWN-CUSTOM-THEME-SETTINGS': {
|
|
174
174
|
level: 'error',
|
|
175
|
-
rule: 'An unknown custom theme setting has been used.',
|
|
176
175
|
fatal: false,
|
|
177
|
-
|
|
176
|
+
rule: 'Remove or correct the unknown <code>{{@custom}}</code> setting',
|
|
177
|
+
details: oneLineTrim`Every <code>{{@custom.<i>name</i>}}</code> reference in a template needs a matching entry in <code>config.custom</code> in <code>package.json</code>. An unrecognised setting renders as empty. See the <a href="${docsBaseUrl}custom-settings/" target=_blank>custom settings documentation</a> for details.`
|
|
178
178
|
},
|
|
179
179
|
'GS090-NO-UNKNOWN-CUSTOM-THEME-SELECT-VALUE-IN-MATCH': {
|
|
180
180
|
level: 'error',
|
|
@@ -209,8 +209,8 @@ let rules = {
|
|
|
209
209
|
|
|
210
210
|
'GS100-NO-UNUSED-CUSTOM-THEME-SETTING': {
|
|
211
211
|
level: 'error',
|
|
212
|
-
rule: '
|
|
213
|
-
details: oneLineTrim`
|
|
212
|
+
rule: 'Use or remove the unused <code>config.custom</code> setting',
|
|
213
|
+
details: oneLineTrim`A setting declared in <code>config.custom</code> in <code>package.json</code> appears in the admin Customize panel but has no effect unless referenced from a template with <code>{{@custom.<i>name</i>}}</code>. Either use the setting from a template or drop it from <code>package.json</code>. See the <a href="${docsBaseUrl}custom-settings/" target=_blank>custom settings documentation</a> for details.`
|
|
214
214
|
},
|
|
215
215
|
|
|
216
216
|
'GS050-CSS-KGCO': cssCardRule('callout', 'kg-callout-card'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gscan",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.1",
|
|
4
4
|
"description": "Scans Ghost themes looking for errors, deprecations, features and compatibility",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ghost",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@sentry/node": "10.53.1",
|
|
47
|
-
"@tryghost/config": "2.2.
|
|
48
|
-
"@tryghost/debug": "2.2.
|
|
49
|
-
"@tryghost/errors": "3.2.
|
|
50
|
-
"@tryghost/logging": "
|
|
47
|
+
"@tryghost/config": "2.2.1",
|
|
48
|
+
"@tryghost/debug": "2.2.1",
|
|
49
|
+
"@tryghost/errors": "3.2.2",
|
|
50
|
+
"@tryghost/logging": "5.0.1",
|
|
51
51
|
"@tryghost/nql": "0.12.10",
|
|
52
|
-
"@tryghost/pretty-cli": "3.2.
|
|
53
|
-
"@tryghost/server": "
|
|
54
|
-
"@tryghost/zip": "3.3.
|
|
52
|
+
"@tryghost/pretty-cli": "3.2.1",
|
|
53
|
+
"@tryghost/server": "3.0.1",
|
|
54
|
+
"@tryghost/zip": "3.3.2",
|
|
55
55
|
"chalk": "5.6.2",
|
|
56
56
|
"express": "5.2.1",
|
|
57
57
|
"express-handlebars": "8.0.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"handlebars": "4.7.9",
|
|
60
60
|
"lodash": "4.18.1",
|
|
61
61
|
"multer": "2.1.1",
|
|
62
|
-
"semver": "7.8.
|
|
62
|
+
"semver": "7.8.1",
|
|
63
63
|
"validator": "^13.0.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -67,16 +67,11 @@
|
|
|
67
67
|
"@eslint/eslintrc": "3.3.5",
|
|
68
68
|
"@eslint/js": "10.0.1",
|
|
69
69
|
"@tryghost/pro-ship": "1.0.10",
|
|
70
|
-
"@vitest/coverage-v8": "4.1.
|
|
70
|
+
"@vitest/coverage-v8": "4.1.7",
|
|
71
71
|
"eslint": "10.4.0",
|
|
72
72
|
"eslint-plugin-ghost": "3.5.0",
|
|
73
73
|
"nodemon": "3.1.14",
|
|
74
|
-
"vitest": "4.1.
|
|
75
|
-
},
|
|
76
|
-
"resolutions": {
|
|
77
|
-
"node-loggly-bulk": "4.0.2",
|
|
78
|
-
"node-loggly-bulk/axios": "1.16.0",
|
|
79
|
-
"**/handlebars": "4.7.9"
|
|
74
|
+
"vitest": "4.1.7"
|
|
80
75
|
},
|
|
81
76
|
"files": [
|
|
82
77
|
"lib",
|