open-index/open-npm huggingface dataset:
npm package: @grammarly/tslint-config
Description: TSLint configuration for Grammarly TypeScript projects
Author: Grammarly
Latest version: 0.6.0

# grammarly-tslint-config

This repository contains a configuration for [TSLint](http://palantir.github.io/tslint/) that is shared between our TypeScript projects. This configuration can be considered a *recommended* set of rules for any TypeScript project. However, you can still extend this configuration (see [this article](http://palantir.github.io/tslint/2016/03/31/sharable-configurations-rules.html)) for custom, per-project settings.

Apart from built-in set of rules (see more docs [here](http://palantir.github.io/tslint/rules/)), we also use some third-party TSLint rules:
- [tslint-eslint-rules](https://github.com/buzinas/tslint-eslint-rules)
- [tslint-microsoft-contrib](https://github.com/Microsoft/tslint-microsoft-contrib)
- [tslint-react](https://github.com/palantir/tslint-react)

We have also implemented a couple of custom rules.

## Usage

Install in a new project:

```
$ yarn add typescript tslint @grammarly/tslint-config
$ cp ./node_modules/@grammarly/tslint-config/default-tslint.json ./tslint.json
```

OR

```
$ npm i -D typescript tslint @grammarly/tslint-config
$ cp ./node_modules/@grammarly/tslint-config/default-tslint.json ./tslint.json
```

Use:

```
$ ./node_modules/bin/tslint ./src/**/*.ts*
```

Or in an npm script:

```
{
  ...
  "scripts": {
    "lint": "tslint ./src/**/*.ts*"
  }
  ...
}
```

It is also recommended to run TSLint on every build, so you can detect and fix problems earlier:

```
{
  ...
  "scripts": {
    "build": "tsc && tslint ./src/**/*.ts*"
  }
  ...
}
```

## Contributing

As usual, pull-requests are welcome. Constructive discussions are welcome too. If you want to discuss, add or change this configuration, please file an issue.