<commit_before># brave-mouse

[![Node.js package](http://img.shields.io/npm/v/brave-mouse.svg)](https://www.npmjs.com/package/brave-mouse)
[![Linux Build Status](http://img.shields.io/travis/SonicHedgehog/brave-mouse/develop.svg)](https://travis-ci.org/SonicHedgehog/brave-mouse)
[![Windows Build Status](http://img.shields.io/appveyor/ci/SonicHedgehog/brave-mouse.svg)](https://ci.appveyor.com/project/SonicHedgehog/brave-mouse)

Validate your code against your EditorConfig.

## Getting started

Install brave-mouse using:

```shell
$ npm install brave-mouse --save
```

Use it like this:

```js
var braveMouse = require('brave-mouse')

braveMouse.validate('your-file.js', function(err, results) {
  // `err` will only be set for actual errors, e.g. it will
  // not be set if your file isn’t valid.
  
  if(results === true) {
    // Your file is valid
  } else {
    console.log(results)
    // {
    //   "indent_style": {
    //     "expected": "tab"
    //     "is": "space"
    //   }
    // }
  }
})
```

## Supported EditorConfig properties

See [EditorConfig’s wiki](https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties) for a complete list of properties.

brave-mouse currently supports validating the following properties:

- `indent_style`
- `indent_size`
- `end_of_line` (only `lf` and `crlf` are supported)
- `trim_trailing_whitespace`

`tab_width` can’t be validated as it only applies to editors.

## Running tests

First, install all dependencies:

```shell<commit_msg>Use semicolons in JavaScript example in README.md<commit_after># brave-mouse

[![Node.js package](http://img.shields.io/npm/v/brave-mouse.svg)](https://www.npmjs.com/package/brave-mouse)
[![Linux Build Status](http://img.shields.io/travis/SonicHedgehog/brave-mouse/develop.svg)](https://travis-ci.org/SonicHedgehog/brave-mouse)
[![Windows Build Status](http://img.shields.io/appveyor/ci/SonicHedgehog/brave-mouse.svg)](https://ci.appveyor.com/project/SonicHedgehog/brave-mouse)

Validate your code against your EditorConfig.

## Getting started

Install brave-mouse using:

```shell
$ npm install brave-mouse --save
```

Use it like this:

```js
var braveMouse = require('brave-mouse');

braveMouse.validate('your-file.js', function(err, results) {
  // `err` will only be set for actual errors, e.g. it will
  // not be set if your file isn’t valid.
  
  if(results === true) {
    // Your file is valid
  } else {
    console.log(results);
    // {
    //   "indent_style": {
    //     "expected": "tab"
    //     "is": "space"
    //   }
    // }
  }
});
```

## Supported EditorConfig properties

See [EditorConfig’s wiki](https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties) for a complete list of properties.

brave-mouse currently supports validating the following properties:

- `indent_style`
- `indent_size`
- `end_of_line` (only `lf` and `crlf` are supported)
- `trim_trailing_whitespace`

`tab_width` can’t be validated as it only applies to editors.

## Running tests

First, install all dependencies:

```shell
{'fraction_non_alphanumeric': 0.15374550212626759, 'fraction_numerical': 0.0, 'mean_word_length': 3.763239875389408, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '547054', 'n_tokens_mistral': 1078, 'n_tokens_neox': 1033, 'n_words': 235}