Various adaptations for Phantomas v2
This commit is contained in:
@@ -312,7 +312,7 @@ var policies = {
|
||||
list: offenders.map(function(offender) {
|
||||
if (offender === '[inline CSS]') {
|
||||
return {
|
||||
error: 'Empty style tag',
|
||||
error: 'Empty <style> tag',
|
||||
file: null,
|
||||
line: null,
|
||||
column: null
|
||||
@@ -321,17 +321,19 @@ var policies = {
|
||||
|
||||
if (offender.value) {
|
||||
return {
|
||||
error: offender.value.message || 'Unknown parsing error' + (parts[1] ? '. The entire file was ignored. As a result, the other CSS metrics and scores are miscalculated.' : ''),
|
||||
file: offender.file || null,
|
||||
error: offender.value.message || 'Unknown parsing error. The entire file was ignored. As a result, the other CSS metrics and scores are miscalculated.',
|
||||
file: offender.url || null,
|
||||
line: offender.value.position ? offender.value.position.start.line : null,
|
||||
column: offender.value.position ? offender.value.position.start.column : null
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
error: 'Unknown parsing error. The entire file was ignored. As a result, the other CSS metrics and scores are miscalculated.',
|
||||
file: offender,
|
||||
line: null,
|
||||
column: null
|
||||
};
|
||||
}
|
||||
|
||||
debug('cssParsingErrors offenders transform function error with "%s"', offender);
|
||||
return {
|
||||
parseError: offender
|
||||
};
|
||||
})
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user