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

Split out core functionality #114

Open
rmccue opened this issue Feb 5, 2020 · 4 comments
Open

Split out core functionality #114

rmccue opened this issue Feb 5, 2020 · 4 comments
Assignees

Comments

@rmccue
Copy link
Member

rmccue commented Feb 5, 2020

To allow for greater configurability and reuse, I'd like to split the following pieces out into separate packages:

  • The src/linters/ directory into a new @humanmade/linter-core package
  • src/format.js and src/hooks.js into a new @humanmade/linter-github package (and maybe some other bits too)

Ideally, I'd like to switch this repo over to a Lerna repo so we don't have to faff about with synchronising packages everywhere, and so that this is basically just a minor internal refactor. I'll need to test that this is working properly with our complex AWS deployment system though.

@mikeselander before I start on this, any objections?

@rmccue rmccue self-assigned this Feb 5, 2020
@rmccue
Copy link
Member Author

rmccue commented Feb 5, 2020

Part of splitting this out would allow us to potentially offer easier ways to run the linter locally, e.g. npx @humanmade/linter.

@mikeselander
Copy link
Contributor

I have no general objections, but I'm also not sure I understand why you'd like to make the split along those lines. Will our next linter bot not be a Probot and you'd like to keep the linter-core code available to another type of checker?

@rmccue
Copy link
Member Author

rmccue commented Feb 12, 2020

I'd like to make the linting available for two further purposes:

  • Running locally. I want a combined CLI command that replicates hm-linter without the need to set up phpcs or ESLint, so that it's easy to test if your code passes before you push.
  • Checking via a web service. I want a page where I can paste some code and quickly check if it passes the standards or not.

Beyond that, for the code review stuff I'm working on (see issue linked above), the Probot functionality may need to differ from hm-linter. Rather than making linter-bot infinitely adaptable to try and make that work, splitting into packages should allow that flexibility.

@mikeselander
Copy link
Contributor

Got it, thanks for the added clarity! Running these locally would be a huge boon 💯

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

No branches or pull requests

2 participants