Skip to content

[v6.x backport] build, doc, tools: use eslint-plugin-markdown - #14067

Closed
vsemozhetbyt wants to merge 4 commits into
nodejs:v6.x-stagingfrom
vsemozhetbyt:backport-eslint-md-to-v6.x
Closed

[v6.x backport] build, doc, tools: use eslint-plugin-markdown#14067
vsemozhetbyt wants to merge 4 commits into
nodejs:v6.x-stagingfrom
vsemozhetbyt:backport-eslint-md-to-v6.x

Conversation

@vsemozhetbyt

@vsemozhetbytvsemozhetbyt commented Jul 4, 2017

Copy link
Copy Markdown
Contributor
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

build, doc, tools

Backport of: #12563 + #12640 + #14047

@nodejs-github-botnodejs-github-bot added build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory. v6.x labels Jul 4, 2017
@vsemozhetbytvsemozhetbyt added the doc Issues and PRs related to the documentations. label Jul 4, 2017
@vsemozhetbytvsemozhetbyt changed the title [v6.x backport] doc, tools: use eslint-plugin-markdown[v6.x backport] build, doc, tools: use eslint-plugin-markdownJul 4, 2017
@vsemozhetbyt

vsemozhetbyt commented Jul 4, 2017

Copy link
Copy Markdown
ContributorAuthor

This backport departs from canonical way due to a complicated situation with all eslint-plugin-markdown history in Node.js repository.

1.+2. First and second commits from #12563 were backported as is (with conflicts resolved), metadata is preserved.

3. Conform more docs to eslint-plugin-markdown. There was a pretty different situation with docs in the v6.x-staging branch, so the last sweep needed a high-touch manual approach.

4. As all the commits after the third commit in #12563 were various patches, all of them were combined in one commit (i.e: the third and the fourth commits from #12563 + all the appropriate commits from #12640 and #14047). This commit has these changes in one transaction (without old metadata):

  • Install eslint-plugin-markdown@1.0.0-beta.7
  • Add doc/.eslintrc.yaml
  • Add plugins: [markdown] to the main .eslintrc.yaml
  • .js files in doc folder added to .eslintignore
  • Update Makefile, vcbuild.bat, and tools/jslint.js

As I used npm 5.0.3, I am not sure if tools/eslint/package-lock.json should be checked and corrected/deleted.

@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

@gibfahngibfahn self-assigned this Jul 4, 2017
@MylesBorins

Copy link
Copy Markdown
Contributor

Failures look unrelated. It might be nice to have the changes to the doc files in their own commit prior to landing the linter. Thoguhts?

@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

@MylesBorins I've split the last commit in doc commit + other changes commit.

CI: https://ci.nodejs.org/job/node-test-pull-request/9061/

@vsemozhetbyt

vsemozhetbyt commented Jul 11, 2017

Copy link
Copy Markdown
ContributorAuthor

Something wrong has happened with the PR since my last push.

@MylesBorins

MylesBorins commented Jul 11, 2017 via email

Copy link
Copy Markdown
Contributor

@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

It is strange. After rebasing I have this commit order:

$ git log --oneline49b9634453 (HEAD -> backport-eslint-md-to-v6.x, origin/backport-eslint-md-to-v6.x) build, doc, tools: add eslint-plugin-markdowndce79a4b49 doc: conform more docs to eslint-plugin-markdown74d2932751 doc: conform to rules for eslint-plugin-markdown59b93bccb0 doc: prepare js code for eslint-plugin-markdown8860117600 (upstream/v6.x-staging) addons: remove semicolons from after module definition...

But after pushing, in the PR the last two commit are swapped. How can I fix this?

@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

Fixed by re-push after interactive quasi-rebase.
CI: https://ci.nodejs.org/job/node-test-pull-request/9070/

@MylesBorins

Copy link
Copy Markdown
Contributor

this will have to be rebased again. Thanks for patience.

Some of the commits are missing meta data... are some of them new to this backport?

This is an initial step to eliminate most of parsing errors.
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
* Install eslint-plugin-markdown@1.0.0-beta.7
* Add doc/.eslintrc.yaml
* Add `plugins: [markdown]` to the main .eslintrc.yaml
* .js files in doc folder added to .eslintignore
* Update Makefile, vcbuild.bat, and tools/jslint.js
Refs: #12563
Refs: #12640
Refs: #14047
@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

@MylesBorins Rebased. PR has a complicated story (see the second comment), so the metadata from the original commits would not be completely proper here.

CI: https://ci.nodejs.org/job/node-test-pull-request/9235/

@jasnelljasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubber stamp LGTM

@MylesBorinsMylesBorins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
This is an initial step to eliminate most of parsing errors.
Backport-PR-URL: #14067
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
Backport-PR-URL: #14067
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
* Install eslint-plugin-markdown@1.0.0-beta.7
* Add doc/.eslintrc.yaml
* Add `plugins: [markdown]` to the main .eslintrc.yaml
* .js files in doc folder added to .eslintignore
* Update Makefile, vcbuild.bat, and tools/jslint.js
Refs: #12563
Refs: #12640
Refs: #14047
PR-URL: #14067
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

landed in 0b17a45...ce4718f

@vsemozhetbyt

Copy link
Copy Markdown
ContributorAuthor

@nodejs/collaborators, if you have any x6 backports with new/edited code fragments in docs, you may need re-run linter CI after this landing.

@vsemozhetbyt
vsemozhetbyt deleted the backport-eslint-md-to-v6.x branch July 21, 2017 18:02
@sam-github

Copy link
Copy Markdown
Contributor

@vsemozhetbyt I assume make lint will lint docs?

MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
This is an initial step to eliminate most of parsing errors.
Backport-PR-URL: #14067
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
Backport-PR-URL: #14067
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
* Install eslint-plugin-markdown@1.0.0-beta.7
* Add doc/.eslintrc.yaml
* Add `plugins: [markdown]` to the main .eslintrc.yaml
* .js files in doc folder added to .eslintignore
* Update Makefile, vcbuild.bat, and tools/jslint.js
Refs: #12563
Refs: #12640
Refs: #14047
PR-URL: #14067
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
@vsemozhetbyt

vsemozhetbyt commented Jul 21, 2017

Copy link
Copy Markdown
ContributorAuthor

@sam-github Maybe, I am not sure.

I usually do tools/eslint/bin/eslint.js --rulesdir tools/eslint-rules/ --ext=.js,.md benchmark doc lib test tools
locally or do https://ci.nodejs.org/job/node-test-linter/ with refs/pull/<PR_ID>/head in GIT_REMOTE_REF in CI.

@sam-github

Copy link
Copy Markdown
Contributor

That's what make lint does, and I confirmed it works.

@MylesBorinsMylesBorins mentioned this pull request Jul 21, 2017
MylesBorins pushed a commit that referenced this pull request Jul 31, 2017
This is an initial step to eliminate most of parsing errors.
Backport-PR-URL: #14067
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Jul 31, 2017
Backport-PR-URL: #14067
PR-URL: #12563
Refs: #12557 (comment)
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
MylesBorins pushed a commit that referenced this pull request Jul 31, 2017
* Install eslint-plugin-markdown@1.0.0-beta.7
* Add doc/.eslintrc.yaml
* Add `plugins: [markdown]` to the main .eslintrc.yaml
* .js files in doc folder added to .eslintignore
* Update Makefile, vcbuild.bat, and tools/jslint.js
Refs: #12563
Refs: #12640
Refs: #14047
PR-URL: #14067
Reviewed-By: James Snell <jasnell@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.docIssues and PRs related to the documentations.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@vsemozhetbyt@MylesBorins@sam-github@jasnell@gibfahn@nodejs-github-bot