<commit_before>[![Build Status](https://travis-ci.org/jwbay/tslint-misc-rules.svg?branch=master)](https://travis-ci.org/jwbay/tslint-misc-rules)
[![npm version](https://img.shields.io/npm/v/tslint-misc-rules.svg?style=flat-square)](https://www.npmjs.com/package/tslint-misc-rules)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/jwbay/tslint-misc-rules/pulls)
# misc-tslint-rules

Collection of miscellaneous TSLint rules

1. `$ npm install tslint-misc-rules --save-dev`
2. Add the path to it to your tslint.json and add some rules:

```json
{
  "rules": {
    "sort-imports": true,
    "prefer-es6-imports": [
      true,
      "module1",
      "module2"
    ],
    "jsx-attribute-spacing": true,
    "jsx-no-braces-for-string-attributes": true,
    "jsx-attribute-value-spacing": true
  },
  "rulesDirectory": [
    "./node_modules/tslint-misc-rules/rules"
  ]
}
```

# Rules
## "sort-imports"
Fails:<commit_msg>update example rule config with renamed rule<commit_after>[![Build Status](https://travis-ci.org/jwbay/tslint-misc-rules.svg?branch=master)](https://travis-ci.org/jwbay/tslint-misc-rules)
[![npm version](https://img.shields.io/npm/v/tslint-misc-rules.svg?style=flat-square)](https://www.npmjs.com/package/tslint-misc-rules)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/jwbay/tslint-misc-rules/pulls)
# misc-tslint-rules

Collection of miscellaneous TSLint rules

1. `$ npm install tslint-misc-rules --save-dev`
2. Add the path to it to your tslint.json and add some rules:

```json
{
  "rules": {
    "sort-imports": true,
    "prefer-es6-imports": [
      true,
      "module1",
      "module2"
    ],
    "jsx-attribute-spacing": true,
    "jsx-expression-spacing": true,
    "jsx-no-braces-for-string-attributes": true
  },
  "rulesDirectory": [
    "./node_modules/tslint-misc-rules/rules"
  ]
}
```

# Rules
## "sort-imports"
Fails:
{'fraction_non_alphanumeric': 0.18653648509763618, 'fraction_numerical': 0.0051387461459403904, 'mean_word_length': 3.7487804878048783, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7258565', 'n_tokens_mistral': 783, 'n_tokens_neox': 738, 'n_words': 103}