-
Notifications
You must be signed in to change notification settings - Fork 737
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 TypeScript framework-ts example #68
base: master
Are you sure you want to change the base?
Conversation
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.
参考 hackernews-async-ts,以及根据天猪的博文改一下吧,好像这风格不太一样
|
||
|
||
export class DefaultConfig { | ||
} |
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.
用新的写法吧,不要用这种旧的了,看一下天猪那篇文档
framework-ts/yadan/tslint.json
Outdated
"block-spacing": [true, "always"], // 强制在单行代码块中使用一致的空格 | ||
"brace-style": [true, "stroustrup", { "allowSingleLine": true }], // 大括号风格要求 | ||
"comment-format": [true, "check-space", {"ignore-words": ["-", "+"]}], // 强制在注释中 // 或 /* 使用一致的空格 | ||
"curly": [true, "ignore-same-line"], // 要求遵循大括号约定 |
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.
tslint 的规则感觉很多冗余代码
framework-ts/yadan/tsconfig.json
Outdated
"module": "commonjs", /* 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ | ||
"newLine": "lf", | ||
"noFallthroughCasesInSwitch": true, | ||
// "outDir": "./dist", |
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.
为什么是注释而不是删掉?
framework-ts/yadan/tsconfig.json
Outdated
"emitDecoratorMetadata": true, | ||
"importHelpers": false, | ||
"inlineSourceMap": true, | ||
"module": "commonjs", /* 'commonjs', 'amd', 'system', 'umd' or 'es2015'. */ |
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.
应该还少了个 moduleResolution
?
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.
moduleResolution 在 'commonjs' 模块值时默认是 'node', 可以不用显示设置了
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.
ok
c8ed882
to
0f9e8da
Compare
有空再按照茶叶蛋的规范更新 |
need commits of eggjs/egg#2321
0f9e8da
to
880204a
Compare
need commits of eggjs/egg#2321
Checklist
npm test
passesAffected core subsystem(s)
Description of change