Skip to content

Commit c027e6e

Browse files
committed
generalize filenames/match-regex to allow any 'extension prefix'
For example, `file-name.server.tsx`, `file-name.d.ts`, `file-name.config.json` This allows any of the following: file-name file-name.d file-name.config file-name.server file-name.wild-card Note that the file extension is not part of the regex. I made this change because we are seeing more and more of this style of 'extension prefix` convention.
1 parent 1d1e833 commit c027e6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/configs/recommended.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
'eslint-comments/no-unused-disable': 'error',
1919
'eslint-comments/no-unused-enable': 'error',
2020
'eslint-comments/no-use': ['error', {allow: ['eslint', 'eslint-disable-next-line', 'eslint-env', 'globals']}],
21-
'filenames/match-regex': ['error', '^[a-z0-9-]+(.d|.config|.server)?$'],
21+
'filenames/match-regex': ['error', '^[a-z0-9-]+(.[a-z0-9-]+)?$'],
2222
'func-style': ['error', 'declaration', {allowArrowFunctions: true}],
2323
'github/array-foreach': 'error',
2424
'github/no-implicit-buggy-globals': 'error',

0 commit comments

Comments
 (0)