# The Rules

# Overview

ls-lint provides multiple rules out of the box:

Rule Alias Description
regex - Matches regex pattern: ^{pattern}$
lowercase - Every letter must be lowercase
Ignore non letters
camelcase camelCase String must be camelCase
Only letters and digits allowed
pascalcase PascalCase String must be Pascalcase
Only letters and digits allowed
snakecase snake_case String must be snake_case
Only lowercase letters, digits and _ allowed
screamingsnakecase SCREAMING_SNAKE_CASE String must be snake_case
Only uppercase letters, digits and _ allowed
kebabcase kebab-case String must be kebab-case
Only lowercase letters, digits and - allowed
pointcase point.case String must be "point case"
Only lowercase letters, digits and . allowed

# Regex

The regex rule provides full flexibility for your configuration and matches your file and directory names by the ^{pattern}$ pattern

# Example

.ls-lint.yml
ls:
  .js: regex:[a-z0-9]+ # the final regex pattern will be ^[a-z0-9]+$

# Using multiple regex rules

Multiple regex rules are supported by the | operator

.ls-lint.yml
ls:
  .js: regex:Schema(\.test)? | regex:Resolver(\.test)?

Using the regex alternation

In case of the | operator you can not use the regex alternation (opens new window) in your regex patterns - Please just use the | operator for this cases like in the example above