Skip to content
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

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

Closed
wants to merge 4 commits into from
Closed

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

wants to merge 4 commits into from

Conversation

vsemozhetbyt
Copy link
Contributor

@vsemozhetbyt vsemozhetbyt commented Jul 4, 2017

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-bot nodejs-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
@vsemozhetbyt vsemozhetbyt added the doc Issues and PRs related to the documentations. label Jul 4, 2017
@vsemozhetbyt vsemozhetbyt changed the title [v6.x backport] doc, tools: use eslint-plugin-markdown [v6.x backport] build, doc, tools: use eslint-plugin-markdown Jul 4, 2017
@vsemozhetbyt
Copy link
Contributor Author

vsemozhetbyt commented Jul 4, 2017

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
Contributor Author

@gibfahn gibfahn self-assigned this Jul 4, 2017
@MylesBorins
Copy link
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
Contributor Author

@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
Copy link
Contributor Author

vsemozhetbyt commented Jul 11, 2017

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

@MylesBorins
Copy link
Contributor

MylesBorins commented Jul 11, 2017 via email

@vsemozhetbyt
Copy link
Contributor Author

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

$ git log --oneline
49b9634453 (HEAD -> backport-eslint-md-to-v6.x, origin/backport-eslint-md-to-v6.x) build, doc, tools: add eslint-plugin-markdown
dce79a4b49 doc: conform more docs to eslint-plugin-markdown
74d2932751 doc: conform to rules for eslint-plugin-markdown
59b93bccb0 doc: prepare js code for eslint-plugin-markdown
8860117600 (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
Contributor Author

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

@MylesBorins
Copy link
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
Contributor Author

@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/

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

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

Rubber stamp LGTM

Copy link
Contributor

@MylesBorins MylesBorins left a comment

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
Contributor

landed in 0b17a45...ce4718f

@vsemozhetbyt
Copy link
Contributor Author

@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
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
Copy link
Contributor Author

vsemozhetbyt commented Jul 21, 2017

@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
Contributor

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

@MylesBorins MylesBorins 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants