microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.4k stars 1.14k forks source link

Repo linting no longer applies prettier rules nor sees prettier errors #13989

Closed jonthysell closed 1 month ago

jonthysell commented 1 month ago

Problem Description

Our TS files are no longer adhering to our prettier configuration. This is causing the formatting of our files to drift away from our style standards.

~I suspect it was this PR to use "hermes" to parse prettier that causes the problem: https://github.com/microsoft/react-native-windows/pull/12599~

Update: The problem starts with the commit of the 4/6 integrate: https://github.com/microsoft/react-native-windows/pull/13208

That commit is in 0.75 and beyond. This bug does not repro in 0.74.

Steps To Reproduce

  1. Modify a TS file by changing a string from single quotes to double quotes
  2. Run yarn lint in that package

Expected Results

Yarn lint should fail since we require single quotes for strings

CLI version

npx @react-native-community/cli --version

Environment

npx @react-native-community/cli info

Community Modules

No response

Target Platform Version

None

Target Device(s)

No response

Visual Studio Version

None

Build Configuration

None

Snack, code example, screenshot, or link to a repository

No response

jonthysell commented 1 month ago

Confirmed the issue repros in 0.75.

jonthysell commented 1 month ago

I've narrowed down the breakage to the 4/6 integration: https://github.com/microsoft/react-native-windows/pull/13208

Still investigating the exact cause.

jonthysell commented 1 month ago

Ok, it looks like this isn't supported anymore, as explained here: https://github.com/facebook/react-native/commit/727f30bd0b27ff168e6a6556a9ffbc7e42dbb8f0