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

3 Коммитов

Автор SHA1 Сообщение Дата
Tim Yung ba7424d4d2 RN: Normalize Prettier Configuration
Summary:
Changelog:
[Internal]

Reviewed By: zertosh

Differential Revision: D31745469

fbshipit-source-id: b930e4aefd8d21021b7c43a48ee84d0546fb56eb
2021-10-19 01:51:36 -07:00
George Zahariev 635ac1ba53 Update various Xplat Prettier configs to specify arrowParens: avoid
Summary:
Since Prettier 2.0, the default for the `arrowParens` option has changed from `avoid` to `always`.

In preparation for upgrading Prettier in Xplat to 2.1, add `arrowParens: 'avoid'` explicitly to configurations that were missing it so that we do not have a change of behaviour when upgrading.

Changelog: [Internal]

Reviewed By: bolinfest

Differential Revision: D23666397

fbshipit-source-id: 665f20d1419d0d664a6ef5cddc46f441b20eeb51
2020-09-14 18:36:20 -07:00
Matt Oakes 65eea9d1f8 Set the Prettier config so it is not forced on users of @react-native-community/eslint-config (#24635)
Summary:
This fixes an issue where the Prettier config was set to the `fb` (Facebook) values for all users of the `react-native-community/eslint-config` package. This was due to [this line](8f186b84ae/packages/eslint-config-react-native-community/index.js (L219)) in the config file.

It was causing issues like these:

* Errors when using newer versions of `eslint-plugin-prettier` (you had to use a version that was >1 year old): https://github.com/facebook/react-native/issues/24564
* Errors due to the Prettier parser being forced to be `flow` when using Typescript: https://github.com/typescript-eslint/typescript-eslint/issues/481

This PR:

* Changes that line to remove the explicit `fb` config so users can set their own.
* Moves the React Native Prettier config to `.prettierrc` so ESLint, Prettier, and code editors can all read from the same place.
* Upgrades both `prettier` and the `eslint-plugin-prettier` to the latest versions.

[General] [Fixed] - Stopped the Prettier config being set for all users of react-native-community/eslint-config
Pull Request resolved: https://github.com/facebook/react-native/pull/24635

Differential Revision: D15122200

Pulled By: cpojer

fbshipit-source-id: 56bae8a7f2d8e133b1d808091a6b73302b94d2ed
2019-04-29 09:44:51 -07:00