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

tools: enable camelcase linting in tools #27607

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tools/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ env:
es6: true

rules:
camelcase:
- error
- properties: 'never'
ignoreDestructuring: true
allow: ['child_process']
comma-dangle:
- error
- arrays: 'always-multiline'
Expand Down
8 changes: 4 additions & 4 deletions tools/doc/apilinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down