-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
doc: use eslint #5053
doc: use eslint #5053
Conversation
Excellent work! The Docs WG is looking at doing this through remark ultimately, but that shouldn't block this since it gets the docs in a good state for the other tool. |
081771e
to
7f2baf4
Compare
@chrisdickinson, thanks. Started out with over 1500 linting errors... I've just added |
I pulled this PR locally with
as shown in https://help.github.com/articles/checking-out-pull-requests-locally/. And then I listed out the changed files with
as shown in http://stackoverflow.com/a/25071749/1903116. And then I filtered the files which had
which gave me
As decided in the docs WG meeting today, if we can get LGTM atleast to the modules listed above, we are okay to land this. cc @nodejs/documentation Please correct me if I am wrong |
@thefourtheye that list looks correct. I wasn't sure what to do with the |
Sending this comment while on the go, forgive me if this is where they already are — There should be a |
@chrisdickinson not sure how you would solve the |
I would favor |
Of course, the downside there is that someone will probably have to reinstall the plugin there every time we upgrade |
If it's possible, I'd prefer plugins to live in |
3a908bb
to
d1e07be
Compare
@silverwind, @chrisdickinson, @Trott How does this look? It essentially just renames Wasn't sure how else to accomplish this. Little ugly, but gets it done |
I pulled in the latest changes, and I got the following error.
|
@tflanagan Works for me if it works and no one else objects. We can always switch it to some other layout later if a more elegant solution presents itself. |
@thefourtheye, I'm sorry about that - I was developing (and testing) on Windows when I made this change, my linux box was still compiling when I dozed off for the night Should be all set now. |
-1 on using NODE_PATH. That is something we are trying to get rid of. If people see us use it, they will think it is ok for them to use. What's the problem with just using node_modules? |
@@ -160,7 +162,7 @@ to be an error. | |||
The `options` argument may be passed as the second argument to customize how | |||
the process is spawned. The default options are: | |||
|
|||
```js | |||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be aware that changing the markdown from js
to json
requires a valid JSON object, with all the keys and string values having double quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a0viedo, ah, thank you! I will fix this shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@a0viedo, I've addressed all the "```json"s
@evanlucas I see no problem with using it, I foresee other tools requiring this need as well, but I also understand why |
As I can see other tools requiring a Hoping to get some LGTM's and get this landed soon after to avoid further conflicts |
Adds the esling-plugin-markdown module and its' dependencies to the tools/node_modules/ directory for use by tools/eslint.
Add the "jslint-docs" command to Makefile and vcbuild.bat. This command adds linting of the documentation javascript code blocks
9a77e41
to
3f7de23
Compare
Fix code examples to pass eslint
Fix vm.markdown so that it passes eslint
To further explain my reasoning, it much easier to detect and knowingly, manually declare something as |
Here is a breakdown of how many instances of inline linter comments:
|
Any thoughts? Trying not to stall out |
@nodejs/ctc @nodejs/documentation ... ping |
@thefourtheye had some stake, I believe. |
part of |
5fbc910
to
e14f00f
Compare
e14f00f
to
5d58b3f
Compare
Looks like we need another rebase against master. |
@silverwind Im busy now, but I'll have it rebased tomorrow, thanks for your help |
ping... @tflanagan .. just checking in with you on this. Any updates? |
Note that |
7da4fd4
to
c7066fb
Compare
Any progress on this PR, guys? |
@tflanagan Any chance of calling you out of Node.js core retirement for a rebase on this? I'd kinda like to see something like this land, and I can try to push it forward if you are short on availability and/or interest right now. (I'd also like to see you come out of Node.js core retirement for a commit or two so we can get you onboarded as a collaborator, because we totally should have done that when you were more active. Apologies for the oversight.) |
I am gonna pick this up today and tomorrow during Collaborator Summit. Seems a good opportunity too get more active too and also I am responsible for the breakages. I'll cherry pick the structual changes, since everything else has move to much anyhow. |
Reviewed. It's not possible to go forward with since it requires remark. Gonna continue working on that issue. Was mentioned several times before. |
This PR enforces eslint on JavaScript code blocks in the documentation.
When the docs are generated as HTML, the inline eslint rules are removed from the output.
This PR also introduces the
make jslint-docs
command and theeslint-plugin-markdown
module intools/
i suppose
vcbuild.bat
could havejslint-docs
pulled out, like it is inMakefile