Skip to content

Commit 0b9b5a3

Browse files
committed
chore: fix annoying eslint issue
eslint would report nonsense like opentelemetry-js-distribution/src/2.x/detectors/node/opentelemetry-resource-detector-kubernetes-pod/.index_test.ts.swp 1:0 error Parsing error: Unexpected keyword or identifier due to rules with a `files` pattern without file type suffix. Adding file type suffixes to the patterns fixes that.
1 parent 274ad9b commit 0b9b5a3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

eslint.config.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ export default tseslint.config(
4747
},
4848
},
4949
{
50-
files: ['src/**/*_test.*', 'test/**/*'],
50+
// Note: These patterns need to have a file type extension, otherwise they will match temp files like `.swp` from
51+
// vim.
52+
files: ['src/**/*_test*.ts', 'test/**/*.ts', 'test/**/*.js'],
5153
rules: {
5254
'@typescript-eslint/no-unused-expressions': 'off',
5355
},
5456
},
5557
{
56-
files: ['**/.mocharc.*'],
58+
// Note: These patterns need to have a file type extension, otherwise they will match temp files like `.swp` from
59+
// vim.
60+
files: ['**/.mocharc.*.js'],
5761
rules: {
5862
'@typescript-eslint/no-require-imports': 'off',
5963
},

0 commit comments

Comments
 (0)