@plenty-ag/styleguides-typescript
v1.0.0
Published
TS shareable config
Downloads
1
Readme
TSLint Config
TSLint shareable config
TODO
- [ ] Add jest tests
Install
yarn global add \
@plenty-ag/styleguides-typescript \
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
- You DO NOT need to change your:
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/@plenty-ag/styleguides-typescript"]
}
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/@plenty-ag/styleguides-typescript/base-tsconfig.json"
]
}
NOT IMPORTANT - Usage in CLI
tslint --config @plenty-ag/styleguides-typescript
Note: It is not necessary to create the
tslint.json
file.