Skip to content

Commit f3c9639

Browse files
knpwrsljharb
authored andcommitted
[eslint config] [base] [patch] Allow jsx extensions for test files
1 parent 0f8f30d commit f3c9639

File tree

1 file changed

+3
-4
lines changed
  • packages/eslint-config-airbnb-base/rules

1 file changed

+3
-4
lines changed

packages/eslint-config-airbnb-base/rules/imports.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,9 @@ module.exports = {
7373
'tests/**', // also common npm pattern
7474
'spec/**', // mocha, rspec-like pattern
7575
'**/__tests__/**', // jest pattern
76-
'test.js', // repos with a single test file
77-
'test-*.js', // repos with multiple top-level test files
78-
'**/*.test.js', // tests where the extension denotes that it is a test
79-
'**/*.spec.js', // tests where the extension denotes that it is a test
76+
'test.{js,jsx}', // repos with a single test file
77+
'test-*.{js,jsx}', // repos with multiple top-level test files
78+
'**/*.{test,spec}.{js,jsx}', // tests where the extension denotes that it is a test
8079
'**/webpack.config.js', // webpack config
8180
'**/webpack.config.*.js', // webpack config
8281
'**/rollup.config.js', // rollup config

0 commit comments

Comments
 (0)