# tslint-config-silind

> An opinionated TSLint configuration preset for writing scalable, clean and hygienic code

Latest version **1.0.23** (published 2020-02-09) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install tslint-config-silind
pnpm add tslint-config-silind
yarn add tslint-config-silind
bun add tslint-config-silind
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.23 |
| Published | 2020-02-09 |
| First published | 2019-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 54.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | Silind Software |
| Maintainers | silind |
| Keywords | tslint, typescript, clean code |

## Links

- npm: https://www.npmjs.com/package/tslint-config-silind
- Repository: https://github.com/Silind/tslint-config-silind
- Homepage: https://github.com/Silind/tslint-config-silind#readme
- Issues: https://github.com/Silind/tslint-config-silind/issues
- npm.io page: https://npm.io/package/tslint-config-silind

## Dependencies (3)

- [tslint](https://npm.io/package/tslint.md) ^5.20.1
- [tsutils](https://npm.io/package/tsutils.md) ^3.17.1
- [typescript](https://npm.io/package/typescript.md) ^3.7.2

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.0.23 (latest) — 2020-02-09
- 1.0.22 — 2019-11-07
- 1.0.21 — 2019-09-16
- 1.0.20 — 2019-09-02
- 1.0.19 — 2019-09-02
- 1.0.18 — 2019-08-23
- 1.0.17 — 2019-08-12
- 1.0.16 — 2019-08-12
- 1.0.15 — 2019-08-09
- 1.0.14 — 2019-07-30
- 1.0.13 — 2019-07-23
- 1.0.12 — 2019-07-19
- 1.0.11 — 2019-07-07
- 1.0.10 — 2019-07-07
- 1.0.9 — 2019-07-03
- … 9 more at https://npm.io/package/tslint-config-silind/versions

## README

# TSLint Config Silind [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Write%20scalable,%20clean%20and%20hygienic%20TypeScript%20code%20with%20TSlint%20Config%20Silind&url=https://github.com/Silind/tslint-config-silind&hashtags=tslint,typescript,frontend)

![NPM Version](https://img.shields.io/npm/v/tslint-config-silind.svg)
[![Github License](https://img.shields.io/github/license/Silind-Software/tslint-config-silind.svg)](https://github.com/Silind-Software/tslint-config-silind/blob/master/LICENSE)
![Build Status](https://github.com/Silind-Software/tslint-config-silind/workflows/build/badge.svg)
![Code Coverage](https://img.shields.io/codecov/c/github/Silind-Software/tslint-config-silind)

#### An opinionated TSLint configuration preset for writing *scalable*, *clean* and *hygienic* code

# :warning: This project is deprecated
TSLint has been deprecated.  
As a consequence, this project will no longer be maintained.

> Read more about TSLint deprecation [here](https://github.com/palantir/tslint/issues/4534)

## Table of content

- [Getting Started](#getting-started)
- [Configuration preset](#configuration-preset)
- [Custom rules](#custom-rules)
- [Contributing](#contributing)
- [License](#license)
- [Get Help](#get-help)

## Getting Started
### Install
Install `tslint-config-silind` as a dev dependency using npm or yarn

**npm**:
```console
npm install -D tslint-config-silind
```

**yarn**:
```console
yarn add -D tslint-config-silind
```

### Create TSLint configuration (`tslint.json`)
Create a file `tslint.json` in your project root, and add the following:
```js
{
  "extends": ["tslint-config-silind"],
  "linterOptions": {
    "exclude": ["node_modules/**/*.ts"]
  }
}

```
If you already have a `tslint.json` file in your project, make sure to add `tslint-config-silind` under `extends`.

## Configuration preset
`tslint-config-silind` comes pre-configured with the following rules.  
These can of course be overridden in `tslint.json` under `rules`.

```js
rules: {
  "curly": true,
  "max-classes-per-file": false,
  "variable-name": false,
  "member-ordering": false,
  "ordered-imports": [false],
  "object-literal-sort-keys": [false],
  "no-console": [false],
  "import-name": [false],
  "align": [false],
  "max-line-length": { "options": [120], "severity": "warning" },
  "no-consecutive-blank-lines": { "options": [1], "severity": "warning" },
  "quotemark": [true, "single"],
  "array-type": [true, "array-simple"],
  "prefer-array-literal": { 
    "options": [true, { "allow-type-parameters": true }], 
    "severity": "error" 
  },
  "ter-arrow-parens": { 
    "options": ["as-needed", { "requireForBlockBody": true }], 
    "severity": "warning" 
  },
  "trailing-comma": {
    "options": [
      {
        "multiline": {
          "objects": "always",
          "arrays": "always",
          "functions": "ignore",
          "typeLiterals": "ignore"
        },
        "esSpecCompliant": true
      }
    ],
    "severity": "error"
  }
}
```

## Custom rules
*Any custom rule can be disabled and severity level can be set individually*  
*In this example, the rule `no-lowlevel-commenting` is configured with a severity-level of `error`:*
```
"no-lowlevel-commenting": { "severity": "error" }
```
*To disable a rule, simply set its value to `false`:*
```
"no-lowlevel-commenting": false
```

### The following table shows the custom rules that comes with `tslint-config-silind`.
| TS Only | Rule Name | Description |
| :---           | :---:  | :---        |
| :heavy_check_mark: | `no-lowlevel-commenting` | Fails in the presence of low-level comments that are not part of JSDocs. [Read more](https://github.com/Silind/tslint-config-silind/blob/master/docs/noLowlevelCommentingRule.md) |
| :heavy_check_mark: | `discreet-ternary` | Prevents overuse of the ternary operator [Read more](https://github.com/Silind/tslint-config-silind/blob/master/docs/discreetTernaryRule.md) |
| :heavy_check_mark: | `structured-import`  | Requires import statements to be structured based on content and origin [Read more](https://github.com/Silind/tslint-config-silind/blob/master/docs/structuredImportRule.md) |

## Contributing

#### Issues
In the case of a bug report, bugfix or a suggestions, please feel very free to open an issue.

#### Pull request
Pull requests are always welcome, and I'll do my best to do reviews as fast as I can.

## License

This project is licensed under the [MIT License](https://github.com/Silind/tslint-config-silind/blob/master/LICENSE)

## Get Help
- Contact me on [Twitter](https://twitter.com/silindsoftware)
- If appropriate, [open an issue](https://github.com/Silind/tslint-config-silind/issues) on GitHub

---
_Source: https://npm.io/package/tslint-config-silind · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
