Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add no-anon-default-export Babel lint rule #14519

Merged
merged 8 commits into from
Jun 30, 2020

Conversation

Timer
Copy link
Member

@Timer Timer commented Jun 24, 2020

Fixes #12291

image

@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

Janpot
Janpot previously approved these changes Jun 24, 2020
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

timneutkens
timneutkens previously approved these changes Jun 29, 2020
@Timer Timer dismissed stale reviews from timneutkens and Janpot via 815d575 June 30, 2020 05:21
@Timer Timer requested review from timneutkens and Janpot June 30, 2020 05:22
@ijjk

This comment has been minimized.

@ijjk

This comment has been minimized.

@ijjk
Copy link
Member

ijjk commented Jun 30, 2020

Stats from current PR

Default Server Mode (Decrease detected ✓)
General Overall increase ⚠️
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
buildDuration 12.1s 11.9s -204ms
nodeModulesSize 66 MB 66 MB ⚠️ +8.2 kB
Page Load Tests Overall decrease ⚠️
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
/ failed reqs 0 0
/ total time (seconds) 1.958 2.001 ⚠️ +0.04
/ avg req/sec 1277.04 1249.23 ⚠️ -27.81
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.185 1.174 -0.01
/error-in-render avg req/sec 2109.74 2129.11 +19.37
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..769f.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
index.html gzip 951 B 951 B
link.html gzip 960 B 960 B
withRouter.html gzip 943 B 943 B
Overall change 2.85 kB 2.85 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
buildDuration 13.1s 12.9s -216ms
nodeModulesSize 66 MB 66 MB ⚠️ +8.2 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..769f.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Serverless bundles
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 915 kB 915 kB
routerDirect.js 907 kB 907 kB
withRouter.js 907 kB 907 kB
Overall change 4.49 MB 4.49 MB
Commit: bc79807

@ijjk
Copy link
Member

ijjk commented Jun 30, 2020

Stats from current PR

Default Server Mode (Increase detected ⚠️)
General Overall increase ⚠️
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
buildDuration 13.1s 13s -65ms
nodeModulesSize 66 MB 66 MB ⚠️ +8.2 kB
Page Load Tests Overall increase ✓
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
/ failed reqs 0 0
/ total time (seconds) 2.172 2.148 -0.02
/ avg req/sec 1151.2 1163.73 +12.53
/error-in-render failed reqs 0 0
/error-in-render total time (seconds) 1.499 1.471 -0.03
/error-in-render avg req/sec 1667.32 1699.59 +32.27
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..769f.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Rendered Page Sizes
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
index.html gzip 951 B 951 B
link.html gzip 960 B 960 B
withRouter.html gzip 943 B 943 B
Overall change 2.85 kB 2.85 kB

Serverless Mode
General Overall increase ⚠️
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
buildDuration 13.9s 13.7s -198ms
nodeModulesSize 66 MB 66 MB ⚠️ +8.2 kB
Client Bundles (main, webpack, commons)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.js gzip 6.59 kB 6.59 kB
webpack-HASH.js gzip 751 B 751 B
19b7e98f51cc..769f.js gzip 10.7 kB 10.7 kB
framework.HASH.js gzip 39.1 kB 39.1 kB
Overall change 57.2 kB 57.2 kB
Client Bundles (main, webpack, commons) Modern
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
main-HASH.module.js gzip 5.68 kB 5.68 kB
webpack-HASH..dule.js gzip 751 B 751 B
19b7e98f51cc..dule.js gzip 7.09 kB 7.09 kB
framework.HA..dule.js gzip 39.1 kB 39.1 kB
Overall change 52.7 kB 52.7 kB
Legacy Client Bundles (polyfills)
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
polyfills-HASH.js gzip 26.3 kB 26.3 kB
Overall change 26.3 kB 26.3 kB
Client Build Manifests
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
_buildManifest.js gzip 268 B 268 B
_buildManife..dule.js gzip 272 B 272 B
Overall change 540 B 540 B
Serverless bundles
vercel/next.js canary Timer/next.js feat/no-anon-default-export Change
_error.js 875 kB 875 kB
404.html 4.17 kB 4.17 kB
hooks.html 3.79 kB 3.79 kB
index.js 876 kB 876 kB
link.js 915 kB 915 kB
routerDirect.js 907 kB 907 kB
withRouter.js 907 kB 907 kB
Overall change 4.49 MB 4.49 MB
Commit: b78c2eb

@kodiakhq kodiakhq bot merged commit ea1f45a into vercel:canary Jun 30, 2020
@Timer Timer deleted the feat/no-anon-default-export branch June 30, 2020 13:05
@angusd3v
Copy link

angusd3v commented Jul 22, 2020

This error is showing up on .svg files for me, using react-svg-loader. Any tips on conditionally disabling it? I believe react-svg-loader converts SVGs to default exported React components, having trouble figuring out what I can do to solve on the plugin side.

@sphilee sphilee mentioned this pull request Nov 13, 2020
kodiakhq bot pushed a commit that referenced this pull request Nov 16, 2020
ref. #14519, #15062
Add limitation for Anonymous arrow functions.
@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add no-anonymous-default-export to default rule set
5 participants