react/scripts/flow
Jan Kassens 2b1fb91a55
ESLint upgrade to use hermes-eslint (#25915)
Hermes parser is the preferred parser for Flow code going forward. We
need to upgrade to this parser to support new Flow syntax like function
`this` context type annotations or `ObjectType['prop']` syntax.

Unfortunately, there's quite a few upgrades here to make it work somehow
(dependencies between the changes)

- ~Upgrade `eslint` to `8.*`~ reverted this as the React eslint plugin
tests depend on the older version and there's a [yarn
bug](https://github.com/yarnpkg/yarn/issues/6285) that prevents
`devDependencies` and `peerDependencies` to different versions.
- Remove `eslint-config-fbjs` preset dependency and inline the rules,
imho this makes it a lot clearer what the rules are.
- Remove the turned off `jsx-a11y/*` rules and it's dependency instead
of inlining those from the `fbjs` config.
- Update parser and dependency from `babel-eslint` to `hermes-eslint`.
- `ft-flow/no-unused-expressions` rule replaces `no-unused-expressions`
which now allows standalone type asserts, e.g. `(foo: number);`
- Bunch of globals added to the eslint config
- Disabled `no-redeclare`, seems like the eslint upgrade started making
this more precise and warn against re-defined globals like
`__EXPERIMENTAL__` (in rollup scripts) or `fetch` (when importing fetch
from node-fetch).
- Minor lint fixes like duplicate keys in objects.
2022-12-20 14:27:01 -05:00
..
config Flow upgrade to 0.190 (#25483) 2022-10-15 17:33:51 -04:00
createFlowConfigs.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
environment.js Try assigning fetch to globalThis if global assignment fails (#25571) 2022-10-27 02:43:17 -04:00
react-devtools.js ESLint upgrade to use hermes-eslint (#25915) 2022-12-20 14:27:01 -05:00
react-native-host-hooks.js Add support for setNativeProps to Fabric (#25737) 2022-12-09 14:43:52 +00:00
react-relay-hooks.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
runFlow.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
xplat.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00