Add named-function-expressions-instead-of-function-declarations#4
Open
masihjahangiri wants to merge 1 commit intoamirhossein693:masterfrom
Open
Add named-function-expressions-instead-of-function-declarations#4masihjahangiri wants to merge 1 commit intoamirhossein693:masterfrom
masihjahangiri wants to merge 1 commit intoamirhossein693:masterfrom
Conversation
amirhossein693
requested changes
Feb 1, 2020
Owner
amirhossein693
left a comment
There was a problem hiding this comment.
And last comment :d
Please add your items at the end of array.
Thank you
| title: 'w3schools', | ||
| url: 'https://w3schools.com/', | ||
| }, | ||
| ], |
Owner
There was a problem hiding this comment.
Please remove all trailing commas (comma-dangle)
https://eslint.org/docs/rules/comma-dangle
| title: 'Use named function expressions instead of function declarations', | ||
| slug: 'named-function-expressions-instead-of-function-declarations', | ||
| description: | ||
| 'Why? Function declarations are hoisted, which means that it’s easy - too easy - to reference the function before it is defined in the file. This harms readability and maintainability. If you find that a function’s definition is large or complex enough that it is interfering with understanding the rest of the file, then perhaps it’s time to extract it to its own module! Don’t forget to explicitly name the expression, regardless of whether or not the name is inferred from the containing variable (which is often the case in modern browsers or when using compilers such as Babel). This eliminates any assumptions made about the Error’s call stack.', |
Owner
There was a problem hiding this comment.
Description are to long, It needs a TLDR alternative.
We want to show a quick description. more info can be found in the reference link.
Thanks
| description: `When executing lengthy "for" statements, don't make the engine work any harder than it must`, | ||
| codes: [ | ||
| `for(var i = 0; i < someArray.length; i++) { | ||
| `for(var i = 0; i < someArray.length; i++) { |
Owner
There was a problem hiding this comment.
Please remove this space
It cause some issues in html pre tag
| '1 === "1";', | ||
| '1 === true;' | ||
| ] | ||
| codes: ['0 === "";', '1 === "1";', '1 === true;'], |
Owner
There was a problem hiding this comment.
Please do not change this lines
It cause some issues in html pre tag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.