<commit_before># Configuration

The linter _expects a configuration object_. You can either craft your own config or extend an existing one.

For the Node API and PostCSS plugin, you can either pass a configuration object directly or create a `.stylelintrc` JSON file.
For the CLI, you must use a `.stylelintrc` file or point to some other JSON file.

## The Configuration Object

The configuration object can have the following properties. Only `rules` is required.

### `rules`

[Rules](/docs/user-guide/rules.md) determine what the linter looks for and complains about.
*No rules are turned on by default*, so this is where you turn on everything you want to check.

**The `rules` property is an object whose keys are rule names and values are rule configurations.**
Each rule configuration is either a single severity number (0-2) or an array with the following information:
`[severity, primary option, secondary options]`.

```json
{
  "rules": {
    "color-no-invalid-hex": 2,
    "declaration-colon-space-after": [1, "always"],
    "indentation": [2, "tab", {
      "except": ["value"]
    }]
  }
}
```

### `extends`

Your configuration can *extend* an existing configuration (whether your own or a third-party config).
When one configuration extends another, it starts with the other's properties then adds to and overrides what's there.

You can extend an array of existing configurations, with each item in the array taking precedence over the following (so the first item overrides everything else, the second item overrides everything but the first, the last gets overridden by everything else, etc.).

For example, extending the `stylelint-config-suitcss` and then changing indentation to tabs and turning off the number-leading-zero rule:

```json
{
  "extends": "stylelint-config-suitcss",
  "rules": {
    "indentation": [2, "tab"],
    "number-leading-zero": 0,
  }
}
```

Or starting with `stylelint-config-suitcss`, then extending layering `myExtendableConfig` on top of that, and then overriding the indentation rule:

```json
{
  "extends": [
    "./myExtendableConfig",
    "stylelint-config-suitcss"  
  ],
  "rules": {
    "indentation": [2, "tab"],<commit_msg>Link to stylelint-config-suitcss<commit_after># Configuration

The linter _expects a configuration object_. You can either craft your own config or extend an existing one.

For the Node API and PostCSS plugin, you can either pass a configuration object directly or create a `.stylelintrc` JSON file.
For the CLI, you must use a `.stylelintrc` file or point to some other JSON file.

## The Configuration Object

The configuration object can have the following properties. Only `rules` is required.

### `rules`

[Rules](/docs/user-guide/rules.md) determine what the linter looks for and complains about.
*No rules are turned on by default*, so this is where you turn on everything you want to check.

**The `rules` property is an object whose keys are rule names and values are rule configurations.**
Each rule configuration is either a single severity number (0-2) or an array with the following information:
`[severity, primary option, secondary options]`.

```json
{
  "rules": {
    "color-no-invalid-hex": 2,
    "declaration-colon-space-after": [1, "always"],
    "indentation": [2, "tab", {
      "except": ["value"]
    }]
  }
}
```

### `extends`

Your configuration can *extend* an existing configuration (whether your own or a third-party config).
When one configuration extends another, it starts with the other's properties then adds to and overrides what's there.

You can extend an array of existing configurations, with each item in the array taking precedence over the following (so the first item overrides everything else, the second item overrides everything but the first, the last gets overridden by everything else, etc.).

For example, extending the [`stylelint-config-suitcss`](https://github.com/stylelint/stylelint-config-suitcss) and then changing indentation to tabs and turning off the number-leading-zero rule:

```json
{
  "extends": "stylelint-config-suitcss",
  "rules": {
    "indentation": [2, "tab"],
    "number-leading-zero": 0,
  }
}
```

Or starting with `stylelint-config-suitcss`, then extending layering `myExtendableConfig` on top of that, and then overriding the indentation rule:

```json
{
  "extends": [
    "./myExtendableConfig",
    "stylelint-config-suitcss"  
  ],
  "rules": {
    "indentation": [2, "tab"],
{'fraction_non_alphanumeric': 0.10071942446043165, 'fraction_numerical': 0.0035971223021582736, 'mean_word_length': 4.283847980997625, 'pattern_counts': {'":': 24, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, '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': '1663804', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1212, 'n_words': 559}