-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ feat: add eslint preset #20
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,34 @@ | |||
{ | |||
"name": "@doctors/eslint", | |||
"version": "0.0.3", |
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.
版本可以同步一下其他包
"license": "MIT", | ||
"files": [ | ||
"./dist", | ||
"./bin" |
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.
除了 @doctors/core 之外不需要 bin 字段 可以删除一下
* @return {*} | ||
* @param api | ||
*/ | ||
export function getConfigFile(api: IApi) { |
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.
这个函数可以单独放一个文件
// getEslintConfigFile.ts
export default getEslntConfigFile(){}
api.addDoctorEslintCheck((meta) => { | ||
const { eslintConfig } = meta; | ||
let isEsLintOk: boolean = true; | ||
const prerequisites = ["env", "extends", "parserOptions", "rules"]; |
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.
对于 esolint 预设来说 这四个缺一不可吗?
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.
应该有哪些必备预设呢
No description provided.