@detroit-labs/tslint-config
v2.0.0
Published
Shared TSLint configuration used in Detroit Labs' TypeScript projects
Downloads
5
Readme
@detroit-labs/tslint-config
TSLint configurations used in Detroit Labs' TypeScript projects
Installation
$ yarn add @detroit-labs/tslint-config --dev
Usage
To use the lint configuration with the default preset, use configuration inheritance via the extends
keyword.
Here's a sample configuration where tslint.json
lives adjacent to your node_modules
folder:
{
"extends": ["@detroit-labs/tslint-config"],
"rules": {
// override rules here
"semicolon": false
}
}
There are two primary configurations supplied for convenience:
@detroit-labs/tslint-config/react
: contains extra configuration for a TypeScript React project@detroit-labs/tslint-config/node
: contains extra configuration for a Node server project
Usage is the same as above:
{
"extends": ["@detroit-labs/tslint-config/react"],
"rules": {
// override rules here
"semicolon": false
}
}
To lint all TypeScript files in the src/
directory, for example, run tslint -c tslint.json 'src/**/*.{ts,tsx}'
.
Development
Note
This project uses semantic-release for fully automated NPM package publishing. Instead of using git commit
, please use yarn commit
and follow the prompts for entering a conventional changelog message. This is crucial for letting tools manage package publishing and semantic versioning. :robot: Please see this blog post for a run through of the tooling used in this repo. If you are using GitHub Desktop to commit to this repo, please refer to the AngularJS Git Commit Message Conventions (or use the command-line to commit :nerd_face:).
Workflow
- Install dependencies and commit hooks with
yarn install
- Make changes to the TSLint configuration(s)
- Stage changes -
git add .
- Create a conventional commit -
yarn commit
- Push to GitHub and open a pull request
Changelog
See the GitHub release history.