-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: lint for iceworks-server #2426
Conversation
@@ -2,7 +2,7 @@ const { eslintTS, deepmerge } = require('@ice/spec'); | |||
|
|||
module.exports = deepmerge(eslintTS, { | |||
rules: { | |||
// 禁止用var引入模块:取消 | |||
"@typescript-eslint/no-var-requires": 0 | |||
"@typescript-eslint/no-var-requires": 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
规则改动都加上注释说明吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
啥意思?我觉得这些规则都比较明确,不需要再注释说明了。
你的意思是加上注释为什么 取消?
const pages = await this.scanPages(this.path); | ||
return _.orderBy(pages, 'name', 'asc'); | ||
} | ||
|
||
async getOne(): Promise<any> { } | ||
public async getOne(): Promise<any> { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些空函数的意义是什么?如果业务没有需要可以删除吧,没必要为了加这个还改写规则
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -1,3 +1,4 @@ | |||
/* eslint no-eval: 0 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成单行取消
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Background
Notes
dist/
to .eslintignore, this is the directory of the build results of typescript;class-methods-use-this
to warning, I think this is a very controversial rule,this
is not used in many controllers;/* eslint */
to ignore some rules for file and// eslint-disable-line
for line, please check the specific scenario.