---
title: VariableName
description: Identifies variable names that don't adhere to a selected naming convention.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/variable-name
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/variable-name.md
---

# VariableName

Identifies variable names that don't adhere to a selected naming convention. Supports snake\_case (default), camelCase, PascalCase, and kebab-case.

***

## Examples

The following examples contain code snippets that either fail or pass this check. In the following examples, the default snake\_case naming convention is used.

### ✗ Fail

```liquid
{% assign variable-name = 1 %}
```

### ✓ Pass

```liquid
{% assign variable_name = 1 %}
```

***

## Options

```yaml
VariableName:
enabled: true
severity: warning
format: snake_case
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. |
| `format` | The naming convention that the check uses to validate variable names. |

***

## Disabling this check

This check is safe to [disable](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration).

***
