Skip to content

Commit

Permalink
fix: 修复 eslint 风格问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Nov 27, 2022
1 parent a027682 commit e74e03e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
allowArgumentsExplicitlyTypedAsAny: true,
}], // 要求导出函数和类的公共类方法的显式返回和参数类型
'@typescript-eslint/comma-dangle': [2, 'always-multiline'], // 要求或禁止使用拖尾逗号
'@typescript-eslint/prefer-as-const': 1,
'import/no-unresolved': 0,
'import/order': 1,
'require-await': 0,
Expand Down
2 changes: 1 addition & 1 deletion src/push/wechat/MarkdownMsg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class MarkdownMsg {
constructor(obj: MarkdownMsg) {
Object.assign(this, obj)
}
msgtype: 'markdown' = 'markdown'
msgtype: 'markdown' = 'markdown' as const
markdown: Markdown
}

2 changes: 1 addition & 1 deletion src/push/wechat/TextMsg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class TextMsg {
constructor(obj: TextMsg) {
Object.assign(this, obj)
}
msgtype: 'text' = 'text'
msgtype: 'text' = 'text' as const
text: Text
}

0 comments on commit e74e03e

Please sign in to comment.