Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSome code examples use function declarations even though guide says to only use expressions? #1813
Comments
|
It's more likely that when we switched from "use declarations" to "use expressions", we failed to clean up all the examples. |
|
Would you like some help changing it? I am just getting into using this tool and could set aside some time to do it. I thought about running ESLint with this style guide on all of the "Good" portion of the examples. |
|
Sure, that'd be great. I've looked into linting the markdown - see https://github.com/ljharb/javascript/tree/lint_markdown - but ran into trouble with being able to skip, or "expect to fail", the "bad" examples. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Section 7.1 says: "Use named function expressions instead of function declarations"
But I see a lot of code examples that are still using declarations. Ex: 12.2 and 13.4 as "Good" - is this just for simplicity sake?