mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Anchored gscan rules to be checked against v2 rules
no issue - This allows to bump gscan version in the future without breaking changes. The rule set will stay the same across versions
This commit is contained in:
parent
9ca367f019
commit
c34c8e9611
1 changed files with 7 additions and 3 deletions
|
@ -17,16 +17,20 @@ const check = function check(theme, isZip) {
|
|||
|
||||
if (isZip) {
|
||||
checkPromise = gscan.checkZip(theme, {
|
||||
keepExtractedDir: true
|
||||
keepExtractedDir: true,
|
||||
checkVersion: 'v2'
|
||||
});
|
||||
} else {
|
||||
checkPromise = gscan.check(theme.path);
|
||||
checkPromise = gscan.check(theme.path, {
|
||||
checkVersion: 'v2'
|
||||
});
|
||||
}
|
||||
|
||||
return checkPromise
|
||||
.then(function resultHandler(checkedTheme) {
|
||||
checkedTheme = gscan.format(checkedTheme, {
|
||||
onlyFatalErrors: config.get('env') === 'production'
|
||||
onlyFatalErrors: config.get('env') === 'production',
|
||||
checkVersion: 'v2'
|
||||
});
|
||||
|
||||
return checkedTheme;
|
||||
|
|
Loading…
Add table
Reference in a new issue