Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 626 Bytes

filenames-match-regex.md

File metadata and controls

35 lines (21 loc) · 626 Bytes

Ensure filenames match a regex naming convention (github/filenames-match-regex)

💼 This rule is enabled in the ✅ recommended config.

Rule Details

Rule 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.

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

Version

4.3.2