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

build: add linter to make code style closer to Node.js' #15

Merged
merged 4 commits into from
Nov 16, 2021
Merged

Conversation

bcoe
Copy link
Collaborator

@bcoe bcoe commented Nov 14, 2021

adds a linter that enforces a coding style closer to Node core's.

Note: this will make it easy to drop code directly into the codebase when the time comes.

Fixes #3

Copy link
Collaborator

@iansu iansu left a comment

Choose a reason for hiding this comment

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

Nice! Do we want to publish the eslint plugin and/or move it to the pkgjs org before merging this?

@bcoe
Copy link
Collaborator Author

bcoe commented Nov 14, 2021

@iansu perhaps that's worth doing, @mhdawson are you able to transfer @iansu's eslint preset into pkgjs, and give his npm user access to the organization on npm?

Alternatively, if you gave oss-bot write access to the org, I could setup automated publication, like I have for yargs, see:

https://www.npmjs.com/package/yargs

@bcoe bcoe requested a review from joesepi November 14, 2021 18:41
@bcoe
Copy link
Collaborator Author

bcoe commented Nov 14, 2021

_Note: we should probably opt for @pkgjs/eslint-plugin-node-core, rather than eslint-plugin-node-core, as eslint-plugin-node-core was published a few years ago by Joyee.

Copy link
Collaborator

@joesepi joesepi left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

}

let result = {
const result = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be a const?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think so, this edit was made automatically by linter.

@bcoe bcoe merged commit 886e99c into main Nov 16, 2021
@bcoe bcoe deleted the linting branch November 16, 2021 02:43
@bcoe
Copy link
Collaborator Author

bcoe commented Nov 16, 2021

@iansu we can follow up getting rid of the git dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What is our linter preference
4 participants