B
B
BonBon Slick2020-01-03 17:56:31
JavaScript
BonBon Slick, 2020-01-03 17:56:31

JSLint: Expected '{' and instead saw '=>' for anonymous function?

https://jslint.com/

export default ({
                    title,
                    description,
                    imageUrl: imageUrl = 'static/favico/android-chrome-512x512.png',
                    lang:     lang = LANG
                }) => {
    return facebook({title, description, imageUrl, lang,});
};

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shohruh Shaimardonov, 2020-01-03
@joeberetta

JSLint wants you to export functions not in the arrow style (() => {}), but in the good old function() {}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question