https://github.com/dabapps/tslint-config-dabapps
https://github.com/dabapps/tslint-config-dabapps
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/dabapps/tslint-config-dabapps
- Owner: dabapps
- License: bsd-3-clause
- Created: 2017-04-18T12:59:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-08-10T22:51:48.000Z (almost 5 years ago)
- Last Synced: 2025-02-25T16:13:56.031Z (over 1 year ago)
- Language: TypeScript
- Size: 83 KB
- Stars: 0
- Watchers: 25
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TSLint Config
## About
This repository includes a default tslint config based on tslint's recommended rules with some adjustments to closer match our eslint rules.
## Install
Install a specific version of the tslint config with NPM. You can see a full list of versions [here](https://github.com/dabapps/tslint-config-dabapps/releases).
```shell
npm i tslint-config-dabapps@x.x.x -D
```
Note: `-D` is shorthand for `--save-dev`.
This will update your `package.json` automatically, as seen below.
```json
"devDependencies": {
"tslint-config-dabapps": "x.x.x",
}
```
## Configuration
### NPM Scripts
Add the following scripts to your `package.json`.
Note: You must not have a `files` key defined in your `tsconfig.json` or your globs will be ignored.
```json
{
"scripts": {
"lint": "tslint --project tsconfig.json '{src,tests}/**/*.{ts,tsx}'"
}
}
```
### Default Config
Create a `tslint.json` in the route of the project and extend the default config:
```json
{
"extends": [
"tslint-config-dabapps"
]
}
```
If you are using `react-native` you should extend the following:
```json
{
"extends": [
"tslint-config-dabapps/react-native"
]
}
```
## Code of conduct
For guidelines regarding the code of conduct when contributing to this repository please review [https://www.dabapps.com/open-source/code-of-conduct/](https://www.dabapps.com/open-source/code-of-conduct/)