gscan 4.12.0 → 4.13.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/lib/specs/canary.js +26 -1
- package/package.json +1 -1
package/lib/specs/canary.js
CHANGED
|
@@ -10,6 +10,19 @@ 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 wide images 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
|
+
|
|
13
26
|
// assign new or overwrite existing knownHelpers, templates, or rules here:
|
|
14
27
|
let knownHelpers = ['match'];
|
|
15
28
|
let templates = [];
|
|
@@ -171,7 +184,19 @@ let rules = {
|
|
|
171
184
|
level: 'error',
|
|
172
185
|
rule: 'A custom theme setting defined in <code>package.json</code> hasn\'t been used in any theme file.',
|
|
173
186
|
details: oneLineTrim`Custom theme settings defined in <code>package.json</code> must be used at least once in the theme templates.`
|
|
174
|
-
}
|
|
187
|
+
},
|
|
188
|
+
'GS050-CSS-KGCO': cssCardRule('callout', 'kg-card-callout'),
|
|
189
|
+
'GS050-CSS-KGCOE': cssCardRule('callout', 'kg-card-callout-emoji'),
|
|
190
|
+
'GS050-CSS-KGCOT': cssCardRule('callout', 'kg-card-callout-text'),
|
|
191
|
+
'GS050-CSS-KGCOBGGY': cssCardRule('callout', 'kg-card-callout-background-grey'),
|
|
192
|
+
'GS050-CSS-KGCOBGW': cssCardRule('callout', 'kg-card-callout-background-white'),
|
|
193
|
+
'GS050-CSS-KGCOBGB': cssCardRule('callout', 'kg-card-callout-background-blue'),
|
|
194
|
+
'GS050-CSS-KGCOBGGN': cssCardRule('callout', 'kg-card-callout-background-green'),
|
|
195
|
+
'GS050-CSS-KGCOBGY': cssCardRule('callout', 'kg-card-callout-background-yellow'),
|
|
196
|
+
'GS050-CSS-KGCOBGR': cssCardRule('callout', 'kg-card-callout-background-red'),
|
|
197
|
+
'GS050-CSS-KGCOBGPK': cssCardRule('callout', 'kg-card-callout-background-pink'),
|
|
198
|
+
'GS050-CSS-KGCOBGPE': cssCardRule('callout', 'kg-card-callout-background-purple'),
|
|
199
|
+
'GS050-CSS-KGCOBGA': cssCardRule('callout', 'kg-card-callout-background-accent')
|
|
175
200
|
};
|
|
176
201
|
|
|
177
202
|
knownHelpers = _.union(previousKnownHelpers, knownHelpers);
|