eslint-plugin-filename-rules
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -13,3 +13,3 @@ const { aliases } = require('./aliases'); | ||
if (ix > 0) { | ||
const regex = new RegExp(value.substring(1, ix - 1), value.substring(ix + 1)); | ||
const regex = new RegExp(value.substring(1, ix), value.substring(ix + 1)); | ||
return [regex, value]; | ||
@@ -16,0 +16,0 @@ } |
{ | ||
"name": "eslint-plugin-filename-rules", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Enforce filename conventions for linted files", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -49,2 +49,18 @@ # eslint-plugin-filename-rules | ||
You can use the `includePath: true` option to have the pattern matched against the full file path (instead of only the file basename): | ||
```js | ||
... | ||
'filename-rules/match': [2, { includePath: true, pattern: /^([a-z]+-)*[a-z]+(?:\..*)?$/ }], | ||
... | ||
``` | ||
The inverse rule `not-match` checks that the files do NOT match the given pattern. Supports all the same options: | ||
```js | ||
... | ||
'filename-rules/not-match': [2, 'camelCase'], | ||
... | ||
``` | ||
## License | ||
@@ -51,0 +67,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8124
79