lint: update rules and fix errors
This commit is contained in:
parent
95a8c31df9
commit
01211758b0
6 changed files with 7 additions and 9 deletions
|
|
@ -14,7 +14,8 @@
|
|||
"rules": {
|
||||
"no-console": "off",
|
||||
"no-undef": "off",
|
||||
"no-useless-escape": "warn",
|
||||
"no-useless-escape": "off",
|
||||
"no-self-assign": "off",
|
||||
"no-empty": [
|
||||
"error",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ var utils = require('../ui/utils'),
|
|||
{deepCopy} = require('../utils'),
|
||||
sidepanel = require('../ui/sidepanel'),
|
||||
{TRAVERSING_SAMEWIDGET} = require('../events/utils'),
|
||||
{enableTraversingGestures} = require('../events/drag'),
|
||||
raw = require('nanohtml/raw'),
|
||||
ipc = require('./')
|
||||
|
||||
|
|
|
|||
|
|
@ -774,7 +774,7 @@ class Widget extends EventEmitter {
|
|||
|
||||
// extra css "class" property
|
||||
css = css.replace(/^[^\S\n]*class[^\S\n]*:[^\S\n]*([^;\n\s]+);?/igm, (m, c)=>{
|
||||
if (c === 'widget' || c.includes('-container')) return
|
||||
if (c === 'widget' || c.includes('-container')) return
|
||||
extraCssClasses.push(c.replace(/"'/g,''))
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -44,13 +44,11 @@ class Gyroscope extends Widget {
|
|||
|
||||
constructor(options) {
|
||||
|
||||
var html = html`
|
||||
super({...options, html: html`
|
||||
<div class="gyroscope">
|
||||
${raw(icon('compass'))}
|
||||
</div>
|
||||
`
|
||||
|
||||
super({...options, html: html})
|
||||
`})
|
||||
|
||||
this.sensor = new GyroNorm()
|
||||
this.sensor.init({
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ function nodeMode() {
|
|||
|
||||
}
|
||||
|
||||
if (process.title === 'node' || process.title === 'node.exe') {
|
||||
if (process.title === 'node' || process.title === 'node.exe') {
|
||||
|
||||
nodeMode()
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ express.get('*', function(req, res){
|
|||
res.send('')
|
||||
}
|
||||
} else if (/(assets|client)\//.test(req.path)){
|
||||
res.sendFile(path.resolve(__dirname + '/..' + req.path))
|
||||
res.sendFile(path.resolve(__dirname + '/..' + req.path))
|
||||
} else {
|
||||
res.sendFile(path.resolve(req.path))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue