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

edf encourages bad code #62

Closed
dantman opened this issue Apr 20, 2019 · 1 comment
Closed

edf encourages bad code #62

dantman opened this issue Apr 20, 2019 · 1 comment

Comments

@dantman
Copy link

dantman commented Apr 20, 2019

Documentation says that edf outputs export default (parameter) => { console.log(parameter);};.

This isn't a very good snippet since no-one should ever write code like this. enf is ok because anonymous/arrow functions get names from variable declarations. But an anonymous function does not get any name.

As a result the default exported function from this snippet will have no name in logs/debugging and will not be smart-imported by vscode.

export default function ${1:${TM_FILENAME_BASE}}(parameter) { ... would work better.

xabikos added a commit that referenced this issue Apr 21, 2020
@xabikos
Copy link
Owner

xabikos commented Apr 21, 2020

Closed as implemented

@xabikos xabikos closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants