feat: Use prettier-eslint to format code
This commit is contained in:
committed by
mrugesh mohapatra
parent
1ba67c4e2b
commit
b13e5fb41a
@ -20,11 +20,13 @@ export default function() {
|
||||
return false;
|
||||
}
|
||||
const keys = Object.keys(value);
|
||||
return !!keys.length &&
|
||||
return (
|
||||
!!keys.length &&
|
||||
// every key is a file
|
||||
keys.every(key => isObject(value[key])) &&
|
||||
// every file has contents
|
||||
keys.map(key => value[key]).every(file => isPoly(file));
|
||||
keys.map(key => value[key]).every(file => isPoly(file))
|
||||
);
|
||||
}
|
||||
},
|
||||
customSanitizers: {
|
||||
@ -32,16 +34,20 @@ export default function() {
|
||||
trimTags(value) {
|
||||
const tagBody = '(?:[^"\'>]|"[^"]*"|\'[^\']*\')*';
|
||||
const tagOrComment = new RegExp(
|
||||
'<(?:'
|
||||
// Comment body.
|
||||
+ '!--(?:(?:-*[^->])*--+|-?)'
|
||||
// Special "raw text" elements whose content should be elided.
|
||||
+ '|script\\b' + tagBody + '>[\\s\\S]*?</script\\s*'
|
||||
+ '|style\\b' + tagBody + '>[\\s\\S]*?</style\\s*'
|
||||
// Regular name
|
||||
+ '|/?[a-z]'
|
||||
+ tagBody
|
||||
+ ')>',
|
||||
'<(?:' +
|
||||
// Comment body.
|
||||
'!--(?:(?:-*[^->])*--+|-?)' +
|
||||
// Special "raw text" elements whose content should be elided.
|
||||
'|script\\b' +
|
||||
tagBody +
|
||||
'>[\\s\\S]*?</script\\s*' +
|
||||
'|style\\b' +
|
||||
tagBody +
|
||||
'>[\\s\\S]*?</style\\s*' +
|
||||
// Regular name
|
||||
'|/?[a-z]' +
|
||||
tagBody +
|
||||
')>',
|
||||
'gi'
|
||||
);
|
||||
let rawValue;
|
||||
|
Reference in New Issue
Block a user