Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Add lint rules from main nodejs project. #44

Closed
hhellyer opened this issue Jan 24, 2017 · 8 comments
Closed

Add lint rules from main nodejs project. #44

hhellyer opened this issue Jan 24, 2017 · 8 comments

Comments

@hhellyer
Copy link
Contributor

Nodereport should have a lint target developers can run to check the source code formatting rather that having reviewers find the issues.
This would help prevent pull requests from being cluttered up with formatting changes and allow us to focus more on the technical discussions.

Since nodereport (node-report) is a project under Nodejs the rules should be copied over from there so the format is consistent with the main project.

@richardlau
Copy link
Member

There was some previous discussion of this in #15.

https://github.com/nodejs/node uses eslint (with custom rules) for JavaScript and cpplint.py for C++ (majority of node(-)report is C++). We most definitely want to follow the same rules to reduce the barriers to entry for contributors and to smooth future integration of this project with the runtime.

For JavaScript, @geek offered a PR (#15 (comment)) but this was raised against my fork of nodereport instead of this repository.

n.b. https://github.com/nodejs/node-inspect did something similar (nodejs/node-inspect@d669dc5)

@richardlau
Copy link
Member

We currently have #45 and #46 as two different approaches to linting the JavaScript source, but neither of them add the custom eslint rules in https://github.com/nodejs/node/tree/master/tools/eslint-rules. Do we need those?

@mhdawson
Copy link
Member

I think the rules we apply should be exactly the same as applied to node core.

@geek
Copy link
Member

geek commented Jan 28, 2017

@mhdawson I updated node-style to be exactly the same as the rules applied to node core. It was missing the custom node-core rules before, those are now included.

@Fishrock123
Copy link
Contributor

Since nodereport (node-report) is a project under Nodejs the rules should be copied over from there so the format is consistent with the main project.

Please do not copy core's styles. They exist in that specific form only for legacy reasons.

@cjihrig
Copy link

cjihrig commented Jan 30, 2017

I also think that we should stick to the rules used by core.

@mhdawson
Copy link
Member

Went ahead and approved #45 (review)

@gibfahn
Copy link
Member

gibfahn commented Jan 30, 2017

@Fishrock123 could you be more specific about which rules you think shouldn't be followed?

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

No branches or pull requests

7 participants