Skip to content

Commit deed48b

Browse files
timneutkensnatew
authored andcommitted
Remove anonymous default export rule from Babel (vercel#32763)
We didn't port this plugin to next-swc given that the eslint setup warns for this automatically. Given that we still get issues opened for this particular warning coming from the plugin it'd be good to remove it. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
1 parent 1ef30f7 commit deed48b

File tree

8 files changed

+0
-223
lines changed

8 files changed

+0
-223
lines changed

packages/next/build/babel/loader/get-config.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ function getPlugins(
8181
{ type: 'plugin' }
8282
)
8383
: null
84-
const noAnonymousDefaultExportItem =
85-
hasReactRefresh && !isServer
86-
? createConfigItem(
87-
[require('../plugins/no-anonymous-default-export'), {}],
88-
{ type: 'plugin' }
89-
)
90-
: null
9184
const pageConfigItem =
9285
!isServer && isPageFile
9386
? createConfigItem([require('../plugins/next-page-config')], {
@@ -127,7 +120,6 @@ function getPlugins(
127120
: null
128121

129122
return [
130-
noAnonymousDefaultExportItem,
131123
reactRefreshItem,
132124
pageConfigItem,
133125
disallowExportAllItem,

packages/next/build/babel/plugins/no-anonymous-default-export.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

test/integration/no-anon-default-export/.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/integration/no-anon-default-export/components/Child.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/integration/no-anon-default-export/pages/both.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/integration/no-anon-default-export/pages/child.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

test/integration/no-anon-default-export/pages/page.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/integration/no-anon-default-export/test/index.test.js

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)