@10stars/styleguide-ts 中文文档教程
TSLint Config
TSLint 可共享配置
TODO
- [ ] Add jest tests
Install
npm i -g \
@10stars/styleguide-ts \
prettier \
typescript \
tslint \
tslint-config-prettier \
tslint-plugin-prettier \
tslint-react \
tslint-react-hooks
Usage
- If you use our bundler, then:
- You DO NOT need to change your:
tslint.json
andtsconfig.json
Read below if you use your own bundler
TSLint 配置文件格式
从 styleguide-ts/index.js
添加 tslint 配置到你的 tslint.json
:
{
// if you:
// - are on a MacOS
// - installed the package globally
// - do NOT use our bundler
"extends": ["/usr/local/lib/node_modules/@10stars/styleguide-ts"]
}
添加 base- tsconfig.json
到您的 tsconfig.json
:
{
// if you:
// - are on a MacOS
// - installed the package globally
// - do NOT use our bundler
"extends": [
"/usr/local/lib/node_modules/@10stars/styleguide-ts/base-tsconfig.json"
]
}
NOT IMPORTANT - Usage in CLI
tslint --config @10stars/styleguide-ts
注意 没有必要创建
tslint.json
文件。
TSLint Config
TSLint shareable config
TODO
- [ ] Add jest tests
Install
npm i -g \
@10stars/styleguide-ts \
prettier \
typescript \
tslint \
tslint-config-prettier \
tslint-plugin-prettier \
tslint-react \
tslint-react-hooks
Usage
- If you use our bundler, then:
- You DO NOT need to change your:
tslint.json
andtsconfig.json
Read below if you use your own bundler
TSLint Configuration File Formats
Add tslint config from styleguide-ts/index.js
to your tslint.json
:
{
// if you:
// - are on a MacOS
// - installed the package globally
// - do NOT use our bundler
"extends": ["/usr/local/lib/node_modules/@10stars/styleguide-ts"]
}
Add base-tsconfig.json
to your tsconfig.json
:
{
// if you:
// - are on a MacOS
// - installed the package globally
// - do NOT use our bundler
"extends": [
"/usr/local/lib/node_modules/@10stars/styleguide-ts/base-tsconfig.json"
]
}
NOT IMPORTANT - Usage in CLI
tslint --config @10stars/styleguide-ts
Note: It is not necessary to create the
tslint.json
file.
更多
你可能也喜欢
- 8080dasm 中文文档教程
- @1studio/utils 中文文档教程
- @2003scape/rsc-socket 中文文档教程
- @34r7h/google-translate-api 中文文档教程
- @3d-dice/dice-box 中文文档教程
- @4geit/rct-right-side-menu-component 中文文档教程
- @4geit/swg-allow-cross-domain-helper 中文文档教程
- @4success/tunnelhub-cli 中文文档教程
- @8base/web-api-token-auth-client 中文文档教程
- @_zaphod/scribejs 中文文档教程