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

Features to implement in core #1

Open
4 tasks
mdcfe opened this issue Jul 4, 2017 · 20 comments
Open
4 tasks

Features to implement in core #1

mdcfe opened this issue Jul 4, 2017 · 20 comments

Comments

@mdcfe
Copy link
Collaborator

mdcfe commented Jul 4, 2017

As per Chaosthebot/Chaos#565, the general consensus seems to be to use Node.js for the core, so I've started to add to branch v2-pre-democracy with an initial base to work from.

Features to implement

  • Self-updating from Chaos-Core repo
  • Retrieving and updating components from specified repos
  • Launching and restarting components from retrieved repos
  • Tests (what frameworks?)
  • Possibly others that I missed

@Chaosthebot/js-wizards

@andrewda
Copy link
Member

andrewda commented Jul 4, 2017

As for tests, I love mocha and chai. Also istanbul/NYC for code coverage.

@PlasmaPower
Copy link

PlasmaPower commented Jul 4, 2017

@andrewda Have you tried jest? It's like mocha+chai but better (multithreading tests for instance).

Edit: it also has an option builtin for code coverage.

@andrewda
Copy link
Member

andrewda commented Jul 4, 2017

@PlasmaPower haven't used it but works for me!

@mdcfe
Copy link
Collaborator Author

mdcfe commented Jul 5, 2017

I was about to suggest jest, mainly as it's one package and I think we should be trying to minimise our external dependencies. Definitely not because I haven't used mocha/chai much, but using new tools is part of the challenge of different devs contributing to ChaosBot anyway imo

@Swizz
Copy link
Member

Swizz commented Jul 5, 2017

And jest is all included :

$ jest --coverage

@Redmega
Copy link

Redmega commented Jul 5, 2017

Agreed, jest is definitely the way to go.

As far as contributing to this, should we contribute to the v2-pre-democracy branch or should we create our own branches and open PRs to that one?

@andrewda
Copy link
Member

andrewda commented Jul 5, 2017

Do we want to use some style guide like standard.js, Airbnb, etc.? Better to decide early.

@mdcfe
Copy link
Collaborator Author

mdcfe commented Jul 5, 2017

@Redmega If you think the change might be controversial, open a PR, but if it's something simple or something that has already been agreed in an issue then I think it should be fine to commit directly to the branch.

@Swizz
Copy link
Member

Swizz commented Jul 5, 2017

Do we want to use some style guide like standard.js, Airbnb, etc.? Better to decide early.

I personnaly use XO

@mdcfe
Copy link
Collaborator Author

mdcfe commented Jul 5, 2017

@andrewda I prefer Airbnb personally, but I'm open to a vote if someone compiles a list of presets to vote on

@Redmega
Copy link

Redmega commented Jul 5, 2017

I'd say neither. Use prettier and be done with it. Just add some configuration to allow dangling underscores. I love me some dangling underscores.

Edit: Just checked out xo, looks cool. I wouldn't be averse to using that either.

@Swizz
Copy link
Member

Swizz commented Jul 5, 2017

Lets try the new TJ things.





click on an option to vote


To add an option :

[![](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BM9R8F6XQC1PN67RE2QV54EZ/**OPTION**)](https://m131jyck4m.execute-api.us-west-2.amazonaws.com/prod/poll/01BM9R8F6XQC1PN67RE2QV54EZ/**OPTION**/vote)

@andrewda
Copy link
Member

andrewda commented Jul 5, 2017

@Swizz that's actually awesome! Airbnb and prettier sound like the best options to me. Voting for prettier just because it requires less setup.

@PlasmaPower
Copy link

As soon as I saw "new TJ thing" I knew it would be awesome 😄

@mdcfe
Copy link
Collaborator Author

mdcfe commented Jul 5, 2017

I'm not a fan of relying on code formatters personally - I'd much rather use ESLint to ensure that the code is kept consistent (prettier-eslint, though, looks quite appealing).

@Redmega
Copy link

Redmega commented Jul 5, 2017

Yeah that's the idea, that prettier and eslint can be used together to enforce during coding and format after coding.

What I usually do is have prettier run on filesave and have eslint police me during the coding.

@Swizz
Copy link
Member

Swizz commented Jul 5, 2017

We could use Husky to ensure the use of prettier before commit.

@mdcfe
Copy link
Collaborator Author

mdcfe commented Jul 5, 2017

@Redmega @Swizz I think we could use prettier-eslint-cli with a git hook if we're going to use eslint alongside prettier to ensure that the eslint rules don't simply get overridden by prettier straight away. Husky could also be used to ensure that the tests pass before a commit (although this might be frustrating for some people).

@Swizz
Copy link
Member

Swizz commented Jul 5, 2017

Add all the @Chaosthebot members into the loop

@andrewda
Copy link
Member

andrewda commented Jul 5, 2017

We've got another important choice to make:


We might want to also open a code formatting issue if this one's getting too big.

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

5 participants