Skip to content

Commit 390ff58

Browse files
committed
Fix match-regex
1 parent dad6786 commit 390ff58

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ exporting files can be ignored with a second configuration parameter.
4343

4444
With these configuration options, `camelCase.js` will be reported as an error while `snake_case.js` will pass.
4545
Additionally the files that have a named default export (according to the logic in the `match-exported` rule) will be
46-
ignored. They could be linted with the `match-exported` rule.
46+
ignored. They could be linted with the `match-exported` rule. Please note that exported function calls are not
47+
respected in this case.
4748

4849
### Matching Exported Values (match-exported)
4950

@@ -124,6 +125,10 @@ opening files by name. When enabling this rule. `index.js` files will always be
124125

125126
## Changelog
126127

128+
#### 1.3.2
129+
130+
- Fix issue with `match-regex` and `getExportedName`
131+
127132
#### 1.3.1
128133

129134
- Put breaking change from `1.3.0` behind a flag

lib/common/getExportedName.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
function getNodeName(node, options) {
2+
var op = options || [];
3+
24
if (node.type === "Identifier") {
35
return node.name;
46
}
@@ -7,7 +9,7 @@ function getNodeName(node, options) {
79
return node.id.name;
810
}
911

10-
if (options[2] && node.type === "CallExpression" && node.callee.type === "Identifier") {
12+
if (op[2] && node.type === "CallExpression" && node.callee.type === "Identifier") {
1113
return node.callee.name;
1214
}
1315
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-filenames",
3-
"version": "1.3.1",
3+
"version": "1.3.2",
44
"description": "Eslint rule for consistent filenames.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)