Commit Graph

20 Commits

Author SHA1 Message Date
Pascal Hartig
a1260a9789 Set up oclif
Summary:
Provides some really nice helpers and generators for
multi command CLIs, including test helpers and all
sorts of output niceties. This should make it quite
easy for us to add additional sub-commands for
bundling, publishing and keeping docs for all of it.

Heroku maintains this and provides some excellent
docs, too: https://oclif.io/

My only complaint is that it's class-based but that's
effectively only the way to declare new commands and
enforces a set of required/static properties on it.

Reviewed By: nikoant

Differential Revision: D19970293

fbshipit-source-id: 4228e502198c6fd376854a90ed2f01da29e96bc2
2020-02-24 14:04:42 -08:00
Anton Nikolaev
5fd8db294a Add Windows to GitHub Actions CI matrix
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/741

Reviewed By: jknoxville

Differential Revision: D19371114

fbshipit-source-id: 07c6bd71e58011cc3fffa34354546eb773e3fc3d
2020-01-14 03:52:52 -08:00
John Knox
2ae2352972 Add starter package
Summary:
Adds a new package with typescript set up, to be published to npm.

Followed this as a guideline: https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c

Reviewed By: passy

Differential Revision: D18244495

fbshipit-source-id: c684f0bb33e61699f605c637186c7a81136a920f
2019-11-06 09:39:57 -08:00
Andres Suarez
0675dd924d Tidy up Flipper license headers [1/2]
Reviewed By: passy

Differential Revision: D17863711

fbshipit-source-id: 259dc77826fb803ff1b88c88529d7f679d3b74d8
2019-10-11 13:46:45 -07:00
Andres Suarez
29aec8a6ed Relax ESLint header lint
Reviewed By: passy

Differential Revision: D17878532

fbshipit-source-id: 976626d3254a4e570633687424b37fe0d0589707
2019-10-11 13:46:44 -07:00
Daniel Büchele
56d4a83184 Tab components
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16830058

fbshipit-source-id: 22825fdad0924f1f8cdebcbb7a56e0c55ad3b5f3
2019-08-20 04:09:36 -07:00
Daniel Büchele
5f53087c7e client server
Summary: Migrating Server, Client and UninitializedClient to TypeScript

Reviewed By: passy

Differential Revision: D16687855

fbshipit-source-id: 402e4dbcd5d283d3e280d4d8b312662829457886
2019-08-08 11:00:38 -07:00
Daniel Büchele
2c7371d264 typescript eslint plugin
Summary: This is required to properly run eslint in Atom/VSCode on TypeScript files

Reviewed By: jknoxville

Differential Revision: D16201418

fbshipit-source-id: 31da04c2d313e9147e0f868c1af15bf3115e6d6a
2019-07-29 06:39:11 -07:00
John Knox
c69f3e3103 Disallow throwing non-error objects
Summary: It's annoying to have to treat things like they might not be errors, inside catch blocks. This should stop that.

Reviewed By: passy

Differential Revision: D16201509

fbshipit-source-id: b028ea3a1e0766763fcf2659d80456f4dd281c40
2019-07-11 08:57:54 -07:00
Pascal Hartig
e831743132 Harden lint rules
Summary: Taking another stab at adding some lint rules to make it harder to shoot yourself in the foot. Hopefully nothing too controversial. Preferring spread and rest should lead is more readable and there's no downside when using ES6. The "useless" rules are just things like renaming imports to the original name which should only happen during refactors.

Reviewed By: jknoxville

Differential Revision: D16180453

fbshipit-source-id: 1cf6851b7726c0aee953ec7cf7dd6fa0aca32253
2019-07-10 12:06:39 -07:00
Pascal Hartig
c588b650ae Prefer const wherever possible
Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.

This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.

Used `eslint --fix` to change all existing cases.

Reviewed By: jknoxville

Differential Revision: D16131329

fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
2019-07-10 03:28:25 -07:00
Pascal Hartig
662db20948 Disallow var
Summary: We're ES6 and `var`s scoping rules are weird. Let's block this.

Reviewed By: jknoxville

Differential Revision: D16131290

fbshipit-source-id: ba67d16bb8a185a4bb59a657a97b00230dbacafe
2019-07-10 03:28:25 -07:00
John Knox
0a0aec17ca Don't allow rejecting with non-error objects
Summary: This will make it easier to handle errors, because you know you can get the message out, along with stack trace, without having to deal with potentially any object that could be passed in.

Reviewed By: passy

Differential Revision: D16006180

fbshipit-source-id: f200965d7663c5f8a471603fceb6b4cdbea73381
2019-06-26 09:59:26 -07:00
Pascal Hartig
703f43a903 Declare prettier the winner
Summary:
There's been an ongoing fight between eslint and prettier.
You win, prettier.

Reviewed By: danielbuechele

Differential Revision: D14799153

fbshipit-source-id: a4f0546a3a468bb21fed47d61bc14bd7e6f0b185
2019-04-05 09:41:37 -07:00
Pascal Hartig
aa365b990b Restore "fb" preset (#363)
Summary:
I must have run this locally on an outdated version of eslint or the
plugin, because I did not see all the formatting errors. This is because
`eslint-plugin-prettier` dropped support for the `fb` preset (see https://github.com/prettier/eslint-plugin-prettier/pull/113/files). This restores the equivalent ruleset explicitly.
Pull Request resolved: https://github.com/facebook/flipper/pull/363

Reviewed By: danielbuechele

Differential Revision: D13839021

Pulled By: passy

fbshipit-source-id: 59e27a241e8aada8648b175ab8abbdfbd391556e
2019-01-28 07:07:28 -08:00
Pascal Hartig
1b9c32b103 Upgrade to ESLint 5
Summary:
Wanted to do that for a while, but the previous eslint error
blocked me. Continues running with the same level or warnings.

Reviewed By: jknoxville

Differential Revision: D13818478

fbshipit-source-id: ac12888dd4177316020c947925d4ff9d64784140
2019-01-28 04:51:06 -08:00
Daniel Büchele
7825d9247c optional chaining
Summary: Adds support for optional chaining to the codebase, enables flow and eslint support for it.

Reviewed By: passy

Differential Revision: D9940732

fbshipit-source-id: 730aa76653bd22a8fa17a73e72b3a7329de0226c
2018-09-20 04:27:48 -07:00
Daniel Buchele
6fda334a00 fbshipit-source-id: 5d9ecf33fca19e4a6b8c979b879ec9dd82af1ef9 2018-06-25 04:33:04 -07:00
Michael Evans
86d266e75c Fix yarn lint failures
Summary: Closes https://github.com/facebook/Sonar/pull/20

Reviewed By: jknoxville

Differential Revision: D8378657

Pulled By: danielbuechele

fbshipit-source-id: 51dcc4621d657dee089949caf3ebf1961eb3dd6d
2018-06-12 05:10:35 -07:00
Daniel Büchele
fbbf8cf16b Initial commit 🎉
fbshipit-source-id: b6fc29740c6875d2e78953b8a7123890a67930f2
Co-authored-by: Sebastian McKenzie <sebmck@fb.com>
Co-authored-by: John Knox <jknox@fb.com>
Co-authored-by: Emil Sjölander <emilsj@fb.com>
Co-authored-by: Pritesh Nandgaonkar <prit91@fb.com>
2018-06-01 11:03:58 +01:00