提交 1e77356d 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

fix(lint): tslint force aligned

上级 dcf603a8
......@@ -64,14 +64,14 @@ bot
// co(function* () {
// const msg = yield m.load()
const room = m.room()
const room = m.room()
if (room && /Wechaty/i.test(room.topic())) {
log.info('Bot', 'talk: %s' , m)
talk(m)
} else {
log.info('Bot', 'recv: %s' , m)
}
if (room && /Wechaty/i.test(room.topic())) {
log.info('Bot', 'talk: %s' , m)
talk(m)
} else {
log.info('Bot', 'recv: %s' , m)
}
// })
// .catch(e => log.error('Bot', 'on message rejected: %s' , e))
})
......
......@@ -457,16 +457,16 @@ export class Message implements Sayable {
// convert 'hello@a@b@c' to [ 'c', 'b@c', 'a@b@c' ]
function multipleAt(str: string) {
str = str.replace(/^.*?@/, '@')
let name = ''
const nameList: string[] = []
str.split('@')
.filter(mentionName => !!mentionName)
.reverse()
.forEach(mentionName => {
name = mentionName + '@' + name
nameList.push(name.slice(0, -1)) // get rid of the `@` at beginning
})
return nameList
let name = ''
const nameList: string[] = []
str.split('@')
.filter(mentionName => !!mentionName)
.reverse()
.forEach(mentionName => {
name = mentionName + '@' + name
nameList.push(name.slice(0, -1)) // get rid of the `@` at beginning
})
return nameList
}
// flatten array, see http://stackoverflow.com/a/10865042/1123955
......
......@@ -133,7 +133,8 @@ export class Server extends EventEmitter {
})
// Events from Wechaty@Broswer --to--> Server
; [
; // MUST KEEP: seprator
[
'message',
'scan',
'login',
......
......@@ -40,7 +40,8 @@ test.skip('Phantomjs replace javascript source file content test', async t => {
.build()
// http://stackoverflow.com/questions/24834403/phantomjs-change-webpage-content-before-evaluating
; (driver as any).executePhantomJS(`
;
(driver as any).executePhantomJS(`
this.onResourceRequested = function(request, net) {
console.log('REQUEST ' + request.url);
alert('REQUEST ' + request.url);
......
......@@ -4,7 +4,7 @@
],
"rules": {
"align": [
false,
true,
"parameters",
"arguments",
"statements"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册