Skip to content

Conversation

@Trott
Copy link
Member

ESLint 4.0.0 provides stricter (and more granular) indentation checking
than previous versions. Apply the stricter indentation rules to the
tools directory.

In preparation for applying the more strict indentation linting
available in ESLint 4.0.0, correct minor indentation issues in
tools/eslint-rules/required-modules.js.

This is the only file with indentation that does not conform to the
stricter checks.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

tools

@TrottTrott added the tools Issues and PRs related to the tools directory. label Jun 18, 2017
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR: Should this line be return foundModules.indexOf(module) === -1; instead?

Copy link
Member

Choose a reason for hiding this comment

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

or even requiredModules.filter(module => !foundModules.includes(module))

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ack, fixed.

@gibfahn
Copy link
Member

Oh cool, I wonder how this applies to test/...

./node tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules --ext=.js test ✖ 2460 problems (2460 errors, 0 warnings) 2460 errors, 0 warnings potentially fixable with the `--fix` option.

Okay, wonder how many can be --fix ed

./node tools/eslint/bin/eslint.js --cache --fix --rulesdir=tools/eslint-rules --ext=.js test ✖ 1923 problems (1923 errors, 0 warnings) 1917 errors, 0 warnings potentially fixable with the `--fix` option.

@not-an-aardvark do you know why things like this can't be --fixed? Is it just a question of someone implementing it, or is is more complex (i.e. the surrounding lines would have to be refactored)?

/Users/gib/wrk/com/node/test/sequential/test-pipe.js104:1errorExpectedindentationof6spacesbutfound4indent105:1errorExpectedindentationof6spacesbutfound4indent106:9errorExpectedindentationof6spacesbutfound8indent-legacy107:9errorExpectedindentationof6spacesbutfound8indent-legacy108:7errorExpectedindentationof4spacesbutfound6indent-legacy109:1errorExpectedindentationof4spacesbutfound2indent

@targos
Copy link
Member

I guess you need to disable indent-legacy.

@gibfahn
Copy link
Member

Looking at the docs, I thought indent was a superset of indent-legacy, so I assumed that wouldn't be an issue, but I could be wrong.

@not-an-aardvark
Copy link
Contributor

It is mostly a superset, but I think there are a few cases where indent-legacy has a bug and tries to enforce the wrong indentation.

Trott added 3 commits June 19, 2017 11:11
In preparation for applying the more strict indentation linting available in ESLint 4.0.0, correct minor indentation issues in tools/eslint-rules/required-modules.js. This is the only file with indentation that does not conform to the stricter checks.
ESLint 4.0.0 provides stricter (and more granular) indentation checking than previous versions. Apply the stricter indentation rules to the tools directory.
Fix previously-unnoticed typo in `required-modules.js`. Refs: nodejs#13758 (comment)
@Trott
Copy link
MemberAuthor

Copy link
Member

@mhdawsonmhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

Trott added a commit to Trott/io.js that referenced this pull request Jun 23, 2017
In preparation for applying the more strict indentation linting available in ESLint 4.0.0, correct minor indentation issues in tools/eslint-rules/required-modules.js. This is the only file with indentation that does not conform to the stricter checks. PR-URL: nodejs#13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Jun 23, 2017
ESLint 4.0.0 provides stricter (and more granular) indentation checking than previous versions. Apply the stricter indentation rules to the tools directory. PR-URL: nodejs#13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Jun 23, 2017
Fix previously-unnoticed typo in `required-modules.js`. Refs: nodejs#13758 (comment) PR-URL: nodejs#13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@Trott
Copy link
MemberAuthor

Landed in 491f838, ea36609, and 25b4d87

@TrottTrott closed this Jun 23, 2017
@addaleaxaddaleax mentioned this pull request Jun 24, 2017
addaleax pushed a commit that referenced this pull request Jun 24, 2017
In preparation for applying the more strict indentation linting available in ESLint 4.0.0, correct minor indentation issues in tools/eslint-rules/required-modules.js. This is the only file with indentation that does not conform to the stricter checks. PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
addaleax pushed a commit that referenced this pull request Jun 24, 2017
ESLint 4.0.0 provides stricter (and more granular) indentation checking than previous versions. Apply the stricter indentation rules to the tools directory. PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
addaleax pushed a commit that referenced this pull request Jun 24, 2017
Fix previously-unnoticed typo in `required-modules.js`. Refs: #13758 (comment) PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@addaleaxaddaleax mentioned this pull request Jun 24, 2017
@MylesBorins
Copy link
Contributor

This does not land cleanly in LTS. Please feel free to manually backport. Please also feel free to replace the backport request label with do-not-land if it shouldn't land

@Trott
Copy link
MemberAuthor

@MylesBorins Some required stuff probably landed in the last 12 hours, as all three commits here cherry-pick cleanly for me to v6.x-staging now. Can you try again?

@MylesBorins
Copy link
Contributor

@Trott getting failures when landing this

/usr/local/opt/python/bin/python2.7 tools/test.py --mode=release -J \ doctool inspector known_issues message pseudo-tty parallel sequential addons [02:04|% 100|+ 1357|- 0]: Done /Applications/Xcode.app/Contents/Developer/usr/bin/make lint Running JS linter... ./node tools/eslint/bin/eslint.js --cache --rulesdir=tools/eslint-rules \ benchmark lib test tools /Users/mborins/code/node/v6.x/tools/.eslintrc.yaml: Configuration for rule "indent" is invalid: Value "off" is the wrong type. Error: /Users/mborins/code/node/v6.x/tools/.eslintrc.yaml: Configuration for rule "indent" is invalid: Value "off" is the wrong type. at validateRuleOptions (/Users/mborins/code/node/v6.x/tools/eslint/lib/config/config-validator.js:109:15) at Object.keys.forEach.id (/Users/mborins/code/node/v6.x/tools/eslint/lib/config/config-validator.js:156:13) at Array.forEach (native) at Object.validate (/Users/mborins/code/node/v6.x/tools/eslint/lib/config/config-validator.js:155:35) at Object.load (/Users/mborins/code/node/v6.x/tools/eslint/lib/config/config-file.js:559:19) at loadConfig (/Users/mborins/code/node/v6.x/tools/eslint/lib/config.js:63:33) at getLocalConfig (/Users/mborins/code/node/v6.x/tools/eslint/lib/config.js:130:29) at Config.getConfig (/Users/mborins/code/node/v6.x/tools/eslint/lib/config.js:260:26) at hashOfConfigFor (/Users/mborins/code/node/v6.x/tools/eslint/lib/cli-engine.js:599:41) at executeOnFile (/Users/mborins/code/node/v6.x/tools/eslint/lib/cli-engine.js:648:32) 

Trott added a commit to Trott/io.js that referenced this pull request Jul 19, 2017
In preparation for applying the more strict indentation linting available in ESLint 4.0.0, correct minor indentation issues in tools/eslint-rules/required-modules.js. This is the only file with indentation that does not conform to the stricter checks. PR-URL: nodejs#13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Jul 19, 2017
ESLint 4.0.0 provides stricter (and more granular) indentation checking than previous versions. Apply the stricter indentation rules to the tools directory. PR-URL: nodejs#13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Trott added a commit to Trott/io.js that referenced this pull request Jul 19, 2017
Fix previously-unnoticed typo in `required-modules.js`. Refs: nodejs#13758 (comment) PR-URL: nodejs#13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@Trott
Copy link
MemberAuthor

@MylesBorins Backport in #14360

MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
In preparation for applying the more strict indentation linting available in ESLint 4.0.0, correct minor indentation issues in tools/eslint-rules/required-modules.js. This is the only file with indentation that does not conform to the stricter checks. Backport-PR-URL: #14360 PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
ESLint 4.0.0 provides stricter (and more granular) indentation checking than previous versions. Apply the stricter indentation rules to the tools directory. Backport-PR-URL: #14360 PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
Fix previously-unnoticed typo in `required-modules.js`. Backport-PR-URL: #14360 Refs: #13758 (comment) PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
In preparation for applying the more strict indentation linting available in ESLint 4.0.0, correct minor indentation issues in tools/eslint-rules/required-modules.js. This is the only file with indentation that does not conform to the stricter checks. Backport-PR-URL: #14360 PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
ESLint 4.0.0 provides stricter (and more granular) indentation checking than previous versions. Apply the stricter indentation rules to the tools directory. Backport-PR-URL: #14360 PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 21, 2017
Fix previously-unnoticed typo in `required-modules.js`. Backport-PR-URL: #14360 Refs: #13758 (comment) PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jul 21, 2017
MylesBorins pushed a commit that referenced this pull request Jul 31, 2017
In preparation for applying the more strict indentation linting available in ESLint 4.0.0, correct minor indentation issues in tools/eslint-rules/required-modules.js. This is the only file with indentation that does not conform to the stricter checks. Backport-PR-URL: #14360 PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 31, 2017
ESLint 4.0.0 provides stricter (and more granular) indentation checking than previous versions. Apply the stricter indentation rules to the tools directory. Backport-PR-URL: #14360 PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 31, 2017
Fix previously-unnoticed typo in `required-modules.js`. Backport-PR-URL: #14360 Refs: #13758 (comment) PR-URL: #13758 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
@TrottTrott deleted the tools-indenting branch January 13, 2022 22:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@Trott@gibfahn@targos@not-an-aardvark@MylesBorins@jasnell@TimothyGu@cjihrig@mhdawson@vsemozhetbyt