Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 813592d

Browse files
committed
rule docs for filenames match regex
1 parent 725f1a1 commit 813592d

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/rules/filenames-match-regex.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Ensure filenames match a regex naming convention (`github/filenames-match-regex`)
2+
3+
💼 This rule is enabled in the ✅ `recommended` config.
4+
5+
<!-- end auto-generated rule header -->
6+
7+
## Rule Details
8+
9+
TRule to ensure that filenames match a convention, with a default of camelCase.
10+
11+
👎 Examples of **incorrect** filename for this default rule:
12+
13+
`file-name.js`
14+
15+
👍 Examples of **correct** code for this rule:
16+
17+
`fileName.js`
18+
19+
## Options
20+
21+
regex - Regex to match the filename structure. Defaults to camelCase.
22+
23+
24+
```json
25+
{
26+
"filenames-match-regex": [
27+
"error",
28+
"^[a-z0-9-]+(.[a-z0-9-]+)?$"
29+
]
30+
}
31+
```
32+
33+
## Version
34+
35+
4.3.2

0 commit comments

Comments
 (0)