microsoft / microsoft/react-native-windows

Formatting configuration not proper

Open
#11,001 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Developer Experience Area: Infrastructure enhancement Scenario: VSCode Workstream: ES Compliance SFI
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Summary

In PR #10981 I got a comment that I removed newlines at end of files of package.json files.
This was valid. It turns out that we have a VsCode configuration that auto-formats on save... BUT we have no checks in place that VsCode is configured properly.... At least a clean install (with our without eslint extension) does the wrong thing of removing the last line...
.editorconfig seems to have the right values, so no sure what is overriding this...

  1. We should investigate what configuration we are missing and fix this
  2. Ensure that yarn lint catches missign newlines at the end of package.json files.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the .editorconfig values with the mentioned VS Code configuration, then run yarn lint against the package.json files to see whether missing final newlines are detected. Done means the editor preserves the final newline and lint catches files that lack one.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, vscode
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.