Skip to content

Commit

Permalink
Merge pull request #874 from hoverinc/feature/allow-some-default-exports
Browse files Browse the repository at this point in the history
✨ Allow default exports in some specific cases
  • Loading branch information
jrolfs authored Feb 28, 2023
2 parents 9a3be51 + ffaf7e8 commit b08c0ab
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
16 changes: 14 additions & 2 deletions src/config/__tests__/__snapshots__/eslintrc.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Object {
"jest/**",
"test/**",
"e2e/**",
"**/*.config.{js,cjs,ts}",
"**/*.config.{js,cjs,ts,mjs}",
],
"optionalDependencies": false,
},
Expand Down Expand Up @@ -246,7 +246,7 @@ Object {
"jest/**",
"test/**",
"e2e/**",
"**/*.config.{js,cjs,ts}",
"**/*.config.{js,cjs,ts,mjs}",
],
"optionalDependencies": false,
},
Expand Down Expand Up @@ -288,6 +288,18 @@ Object {
exports[`Strict ESLint configuration 1`] = `
Object {
"overrides": Array [
Object {
"files": Array [
"**/*.d.ts",
"**/__mocks__/**/*",
"**/*.config.{js,cjs,ts,mjs}",
],
"rules": Object {
"import/no-default-export": "off",
},
},
],
"rules": Object {
"import/no-default-export": "error",
"import/order": Array [
Expand Down
8 changes: 8 additions & 0 deletions src/config/eslintrc-strict.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,12 @@ module.exports = {
],
'sort-imports': ['error', {ignoreDeclarationSort: true}],
},
overrides: [
{
files: ['**/*.d.ts', '**/__mocks__/**/*', '**/*.config.{js,cjs,ts,mjs}'],
rules: {
'import/no-default-export': 'off',
},
},
],
}
2 changes: 1 addition & 1 deletion src/config/helpers/build-eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const buildConfig = ({withReact = false} = {}) => {
'jest/**',
'test/**',
'e2e/**',
'**/*.config.{js,cjs,ts}',
'**/*.config.{js,cjs,ts,mjs}',
]),
optionalDependencies: false,
},
Expand Down

0 comments on commit b08c0ab

Please sign in to comment.