From 813592d2d741115a9b0f576799edf31a248eb238 Mon Sep 17 00:00:00 2001 From: Grace Park Date: Mon, 25 Nov 2024 13:15:49 -0800 Subject: [PATCH] rule docs for filenames match regex --- docs/rules/filenames-match-regex.md | 35 +++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/rules/filenames-match-regex.md diff --git a/docs/rules/filenames-match-regex.md b/docs/rules/filenames-match-regex.md new file mode 100644 index 00000000..317a465f --- /dev/null +++ b/docs/rules/filenames-match-regex.md @@ -0,0 +1,35 @@ +# Ensure filenames match a regex naming convention (`github/filenames-match-regex`) + +💼 This rule is enabled in the ✅ `recommended` config. + + + +## 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