eslint-plugin-filename-rules
Advanced tools
@@ -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 @@ } |
+1
-1
| { | ||
| "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", |
+16
-0
@@ -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 @@ |
8124
5.49%79
25.4%