Commit Graph

5 Commits

Author SHA1 Message Date
Pascal Hartig
7638afb5d6 Upgrade typescript linter
Summary:
Just shows some warnings when running `yarn lint` otherwise about lack of compatibility.

Required updating the rules because of a breaking change here: https://github.com/typescript-eslint/typescript-eslint/pull/3800/files

Reviewed By: lblasa

Differential Revision: D33533052

fbshipit-source-id: fd73d534bbd6e1933321b5811832b05a9739af95
2022-01-13 11:09:43 -08:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Pascal Hartig
3431206c0e Add linter for naked console.errors
Summary:
`console.error(err)` are hard to identify in the codebase especially
as we often don't have reliable stack trace information.

I've already cleaned up a bunch of them manually by going after the most
high-firing ones; this should make it easier to identify the remaining ones.

Reviewed By: jknoxville

Differential Revision: D27913964

fbshipit-source-id: 0ff6624a0c083829846550b40954945d655b7cf6
2021-04-22 05:23:09 -07:00
Pascal Hartig
d42932c111 Add rule for warning against electron.remote
Summary:
I don't think there's an easy way to do this based on types
which would be ideal ...

So instead I'm checking for

- Importing `remote` from `electron`.
- Accessing `electron.remote`.

You can still hack this by importing `electron`, saving
it to a differently named variable and accessing `remote` on it,
but this should cover all reasonable cases we see in real code.

Reviewed By: mweststrate

Differential Revision: D26453006

fbshipit-source-id: 4b3d223bed43ca3f0d1a4f592ea8f8060a823479
2021-02-16 04:15:51 -08:00
Anton Nikolaev
4a1c2a9ece Custom eslint rule for disallowing cross-package references
Summary:
Added infra for writing and using custom eslint rules and created a rule for disallowing cross-package file imports. Such imports are anti-pattern and they also break standalone plugin bundling.

We still have a bunch of places where Flipper core references code directly from plugins. I've ignored these places for now and added task T71355623 to revisit them.

Reviewed By: passy

Differential Revision: D22998955

fbshipit-source-id: d04cff8fc115ba1300a7e6830306ec134046e927
2020-08-07 10:22:04 -07:00