Skip to content

Commit

Permalink
rule docs for filenames match regex
Browse files Browse the repository at this point in the history
  • Loading branch information
gracepark committed Nov 25, 2024
1 parent 725f1a1 commit 813592d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/rules/filenames-match-regex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Ensure filenames match a regex naming convention (`github/filenames-match-regex`)

💼 This rule is enabled in the ✅ `recommended` config.

<!-- end auto-generated rule header -->

## Rule Details

TRule to ensure that filenames match a convention, with a default of camelCase.

👎 Examples of **incorrect** filename for this default rule:

`file-name.js`

👍 Examples of **correct** code for this rule:

`fileName.js`

## Options

regex - Regex to match the filename structure. Defaults to camelCase.


```json
{
"filenames-match-regex": [
"error",
"^[a-z0-9-]+(.[a-z0-9-]+)?$"
]
}
```

## Version

4.3.2

0 comments on commit 813592d

Please sign in to comment.