Skip to content

Commit b08c0ab

Browse files
authored
Merge pull request #874 from hoverinc/feature/allow-some-default-exports
✨ Allow default exports in some specific cases
2 parents 9a3be51 + ffaf7e8 commit b08c0ab

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

src/config/__tests__/__snapshots__/eslintrc.js.snap

+14-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Object {
113113
"jest/**",
114114
"test/**",
115115
"e2e/**",
116-
"**/*.config.{js,cjs,ts}",
116+
"**/*.config.{js,cjs,ts,mjs}",
117117
],
118118
"optionalDependencies": false,
119119
},
@@ -246,7 +246,7 @@ Object {
246246
"jest/**",
247247
"test/**",
248248
"e2e/**",
249-
"**/*.config.{js,cjs,ts}",
249+
"**/*.config.{js,cjs,ts,mjs}",
250250
],
251251
"optionalDependencies": false,
252252
},
@@ -288,6 +288,18 @@ Object {
288288
289289
exports[`Strict ESLint configuration 1`] = `
290290
Object {
291+
"overrides": Array [
292+
Object {
293+
"files": Array [
294+
"**/*.d.ts",
295+
"**/__mocks__/**/*",
296+
"**/*.config.{js,cjs,ts,mjs}",
297+
],
298+
"rules": Object {
299+
"import/no-default-export": "off",
300+
},
301+
},
302+
],
291303
"rules": Object {
292304
"import/no-default-export": "error",
293305
"import/order": Array [

src/config/eslintrc-strict.js

+8
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@ module.exports = {
1616
],
1717
'sort-imports': ['error', {ignoreDeclarationSort: true}],
1818
},
19+
overrides: [
20+
{
21+
files: ['**/*.d.ts', '**/__mocks__/**/*', '**/*.config.{js,cjs,ts,mjs}'],
22+
rules: {
23+
'import/no-default-export': 'off',
24+
},
25+
},
26+
],
1927
}

src/config/helpers/build-eslint.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const buildConfig = ({withReact = false} = {}) => {
6262
'jest/**',
6363
'test/**',
6464
'e2e/**',
65-
'**/*.config.{js,cjs,ts}',
65+
'**/*.config.{js,cjs,ts,mjs}',
6666
]),
6767
optionalDependencies: false,
6868
},

0 commit comments

Comments
 (0)