Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
michalchudziak 037d16ba72 Bump @react-native-community/eslint-config version (#24389)
Summary:
[General] [Changed] - Bumped react-native-community/eslint-config version
Pull Request resolved: https://github.com/facebook/react-native/pull/24389

Differential Revision: D14870055

Pulled By: cpojer

fbshipit-source-id: 1a8d208757cf433146e71383e59044740321760a
2019-04-10 04:04:51 -07:00
Eli White ec3adae99a Turn on react-hooks/exhaustive-deps in FBSource
Summary: Looks like there are already a bunch of issues in the codebase because this wasn't on.

Reviewed By: cpojer

Differential Revision: D14701084

fbshipit-source-id: 09ff8e0d905b81fbe08c41d4f58758479b38187b
2019-04-01 08:20:18 -07:00
satyajit.happy b49fdd19e4 Add typescript support to the ESLint config (#24100)
Summary:
This adds TypeScript support to the community ESLint config. Our babel preset supports TypeScript by default, so it's nice to have TypeScript support pre-configured in the ESLint config too.

Note: Users need to install `typescript` in their project for linting to work for TypeScript files.

[General] [Added] - Add TypeScript support to the ESLint config
Pull Request resolved: https://github.com/facebook/react-native/pull/24100

Differential Revision: D14597127

Pulled By: cpojer

fbshipit-source-id: dfbf1b97061ed6e8c46aa49adb21630f5acdb5d1
2019-03-25 21:28:26 -07:00
michalchudziak c8e26e6ac4 Fix eslint glob for `.test.js` and `.spec.js` files. (#24088)
Summary:
Existing glob might not work very well with `spec.js` and `test.js` files unless they're placed in `__tests__` directory. This PR aims to bring back the support of `jest` globals in these files, even if they're outside of `__tests__` directory.

[General] [Fixed] - Fixed globs for `spec.js` and `test.js` files.
Pull Request resolved: https://github.com/facebook/react-native/pull/24088

Differential Revision: D14562085

Pulled By: cpojer

fbshipit-source-id: 543d67e3f8a154256f454b34ccc68bb070197a75
2019-03-21 08:39:39 -07:00
michalchudziak 395197dafe Add .eslintrc to RN project template (#23901)
Summary:
The goal of this PR is to enable eslint checks in the projects generated by `react-native init` command. I added `template/_eslintrc` file, that would be replaced in an initialized project with `.eslintrc` file. This PR comes in parallel with https://github.com/react-native-community/react-native-cli/pull/229

[General] [Added] - Added `.eslintrc` file to generated template.
Pull Request resolved: https://github.com/facebook/react-native/pull/23901

Differential Revision: D14561084

Pulled By: cpojer

fbshipit-source-id: 6eb717bf03c45d83ae8a393e6a0abb79e1e2f915
2019-03-21 07:14:23 -07:00
Matt Hargett e67aa427a8 Eliminate eslint npm version mismatch warnings and bump some to latest (#23969)
Summary:
I was annoyed by warnings from yarn/npm about eslint peer dependencies not being met, so I dived in to try and get rid of some of them. Sometimes it meant bumping a plugin, but then that plugin needed a newer babel-eslint, so it was a dance.

Some we can't easily update to latest (eslint-plugin-prettier) because the rule format has changed a bit. Happy to do that in this PR if folks think its a good idea. eslint-config-fbjs itself needs to be updated and republished to eliminate the last few warnings.

There are a few new warnings (the repo wasn't linting cleanly for me from the start). I can fix those in this PR, or a separate one, based on people's preferences.

[internal] [chore] - Eliminate some peer dependency warnings and bump some eslint packages to latest.
Pull Request resolved: https://github.com/facebook/react-native/pull/23969

Differential Revision: D14519076

Pulled By: cpojer

fbshipit-source-id: aa44cfd05814d7b79069414aa78d089e448c2235
2019-03-19 11:14:30 -07:00
Mike Grabowski 5558333c60 Update React Native to use latest CLI (#23940)
Summary:
Landing D14472633 again which failed because of a metro-buck issue.

Latest CLI requires `reactNativePath` to be explicitly set when `react-native` is not present under `node_modules` (which is the case when running from source).

Fixes #23936

This PR also updates CLI to latest version and removes private calls to `findPlugins` (it's now exposed under public interface).

We also remove custom `rn-cli.config.js` options that are no longer needed that we have `--reactNativePath`. I added them a month ago as a temporary workaround.

[GENERAL] [FIXED] - Internal - Update to the latest CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/23940

Reviewed By: rickhanlonii

Differential Revision: D14501686

Pulled By: cpojer

fbshipit-source-id: c8dac71b3806d81c9d18b6d4a7e92d82962791f9
2019-03-18 06:22:53 -07:00
Adam Ernst 0ceaaf0cf6 Revert D14472633: [react-native][PR] Update React Native to use latest CLI
Differential Revision:
D14472633

Original commit changeset: b7ea92ee130d

fbshipit-source-id: ed5bce3ba4a39c8b60e787cb678747231583f6f5
2019-03-15 14:07:54 -07:00
Mike Grabowski 1fe4799a88 Update React Native to use latest CLI (#23940)
Summary:
Latest CLI requires `reactNativePath` to be explicitly set when `react-native` is not present under `node_modules` (which is the case when running from source).

Fixes #23936

This PR also updates CLI to latest version and removes private calls to `findPlugins` (it's now exposed under public interface).

We also remove custom `rn-cli.config.js` options that are no longer needed that we have `--reactNativePath`. I added them a month ago as a temporary workaround.

[GENERAL] [FIXED] - Internal - Update to the latest CLI
Pull Request resolved: https://github.com/facebook/react-native/pull/23940

Differential Revision: D14472633

Pulled By: cpojer

fbshipit-source-id: b7ea92ee130da6730aa0093265958aa1b8c2ab97
2019-03-15 11:07:48 -07:00
Peter van der Zee dcd4e90d9a Bump Prettier to 1.16.4
Summary:
@public
This bumps Prettier to v1.16.4
Only format source files were updated.

Reviewed By: mjesun

Differential Revision: D14454893

fbshipit-source-id: 72f9872fe764a79dbf0d9fab9bebb1456b039f2f
2019-03-14 07:00:27 -07:00
michalchudziak 3898ee3a01 Move `@react-native-community/eslint-config` devDependencies to dependencies (#23766)
Summary:
I moved `devDependencies` to `dependencies` section of `packages/eslint-config-react-native-community`, to avoid the need for installation of them in the main projects. Now the installation should match the guide, from https://github.com/facebook/react-native/tree/master/packages/eslint-config-react-native-community

[General] [Changed] - Moved `devDependencies` of eslint config to `dependencies` section.
Pull Request resolved: https://github.com/facebook/react-native/pull/23766

Differential Revision: D14436081

Pulled By: cpojer

fbshipit-source-id: 770110eb4b2b6dfbbb7456fd1b69e20a8473a4e2
2019-03-12 23:37:18 -07:00
michalchudziak 1ed2b82693 Rename eslint config to 'eslint-config-react-native-community' (#23718)
Summary:
Renamed `eslint-config-react-native` to `eslint-config-react-native-community`, due to the fact, that initial name is already taken on `npm`. Additionally, I added very simple `README.md` file, to prepare the package to be published.

[General] [Changed] - Changed `eslint-config-react-native` name to `eslint-config-react-native-community`
Pull Request resolved: https://github.com/facebook/react-native/pull/23718

Differential Revision: D14298553

Pulled By: cpojer

fbshipit-source-id: bad5a42502ccdebf5f95d8217187be23bbf8f26c
2019-03-03 20:39:43 -08:00