fix existing lint errors

pull/3095/head
43081j 6 years ago
parent 39623dbdef
commit 5d638d32ba

@ -39,6 +39,9 @@
}],
"@typescript-eslint/no-unused-vars": "off"
},
"globals": {
"globalThis": false
},
"env": {
"es6": true,
"browser": true,

@ -234,7 +234,7 @@ export default class Component {
}
helper(name: string) {
const alias = this.alias(name)
const alias = this.alias(name);
this.helpers.set(name, alias);
return alias;
}

@ -344,12 +344,10 @@ export default class ElementWrapper extends Wrapper {
parent.name === 'style'
);
return (raw
? wrapper.node.data
: escape_html(wrapper.node.data))
.replace(/\\/g, '\\\\')
.replace(/`/g, '\\`')
.replace(/\$/g, '\\$');
return (raw ? wrapper.node.data : escape_html(wrapper.node.data))
.replace(/\\/g, '\\\\')
.replace(/`/g, '\\`')
.replace(/\$/g, '\\$');
}
if (wrapper.node.name === 'noscript') return '';

@ -4,16 +4,14 @@ export default {
<div>&nbsp;hello&nbsp; &nbsp;hello</div>`,
test({ assert, component, target }) {
var divList = target.querySelectorAll('div')
const divList = target.querySelectorAll('div');
assert.equal( divList[0].textContent.charCodeAt( 0 ), 160 );
assert.equal( divList[1].textContent.charCodeAt( 0 ), 160 );
assert.equal( divList[1].textContent.charCodeAt( 6 ), 160 );
assert.equal( divList[1].textContent.charCodeAt( 7 ), 160 );
assert.equal( divList[2].textContent.charCodeAt( 0 ), 160 );
assert.equal( divList[2].textContent.charCodeAt( 6 ), 160 );
assert.equal( divList[2].textContent.charCodeAt( 7 ), 32 );//normal space
assert.equal( divList[2].textContent.charCodeAt( 7 ), 32 ); //normal space
assert.equal( divList[2].textContent.charCodeAt( 8 ), 160 );
}
};
};

Loading…
Cancel
Save