# Bought By Many - Stylelint Config

A set of shared configs for [Stylelint](https://stylelint.io/) to help avoid errors and maintain consistency of stylesheets accross the BBM apps. 

## Installation

```shell
npm install --save-dev @boughtbymany/stylelint-config-bbm
```

## Configuration

Create a `.stylelintrc` file in the root directory with the following content:

```json
{
  "extends": "@boughtbymany/stylelint-config-bbm"
}
```

## Ignoring Code

You can ingnore
  - within files
  - file entirely

### Within files

You can temporarily turn off rules using special comments in your CSS. For example, you can either turn all the rules off:

```scss
/* stylelint-disable */
a {}
/* stylelint-enable */
```

You can turn off individual rules:

```scss
/* stylelint-disable selector-no-id, declaration-no-important */
#id {
  color: pink !important;
}
/* stylelint-enable selector-no-id, declaration-no-important */
```

### Entire files

You can use a `.stylelintignore` file in the root directory to ignore specific files, using the same syntax as `.gitignore`:

```
**/*.js
vendor/**/*.css
```

See [the config documentation](https://stylelint.io/user-guide/configure) for more info.