From d6f24535c5c7886e25fd2a36980222a968e59248 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 7 May 2019 21:14:43 -0700 Subject: [PATCH 1/2] tools: switch to camelcasing in apilinks.js Use camelcasing in tools/doc/apilinks.js. --- tools/doc/apilinks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/doc/apilinks.js b/tools/doc/apilinks.js index 514d22e8dcd375..461805dac3a811 100644 --- a/tools/doc/apilinks.js +++ b/tools/doc/apilinks.js @@ -36,10 +36,10 @@ function execSync(command) { } // Determine origin repo and tag (or hash) of the most recent commit. -const local_branch = execSync('git name-rev --name-only HEAD'); -const tracking_remote = execSync(`git config branch.${local_branch}.remote`); -const remote_url = execSync(`git config remote.${tracking_remote}.url`); -const repo = (remote_url.match(/(\w+\/\w+)\.git\r?\n?$/) || +const localBranch = execSync('git name-rev --name-only HEAD'); +const trackingRemote = execSync(`git config branch.${localBranch}.remote`); +const remoteUrl = execSync(`git config remote.${trackingRemote}.url`); +const repo = (remoteUrl.match(/(\w+\/\w+)\.git\r?\n?$/) || ['', 'nodejs/node'])[1]; const hash = execSync('git log -1 --pretty=%H') || 'master'; From 34ac8519ecef4e6c536b01d05fd939c4cf6d4bfc Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 7 May 2019 21:28:37 -0700 Subject: [PATCH 2/2] tools: enable camelcase linting in tools --- tools/.eslintrc.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/.eslintrc.yaml b/tools/.eslintrc.yaml index ffc36c66bdfc9d..fbc3738465169f 100644 --- a/tools/.eslintrc.yaml +++ b/tools/.eslintrc.yaml @@ -3,6 +3,11 @@ env: es6: true rules: + camelcase: + - error + - properties: 'never' + ignoreDestructuring: true + allow: ['child_process'] comma-dangle: - error - arrays: 'always-multiline'