microsoft / microsoft/TypeScript

Control application of insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets for Array Literal vs Array Access Expression

Open
#14,994 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: Formatter Help Wanted Suggestion VS Code Tracked
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

From @atian25 on March 28, 2017 0:25

  • VSCode Version: Code 1.10.2 [Unsupported] (8076a19fdcab7e1fc1707952d652f0bb6c6db331, 2017-03-08T13:56:35.908Z)
  • OS Version: Darwin x64 16.3.0
  • Extensions:
Extension Author Version
output-colorizer IBM 0.0.11
vscode-file-peek abierbaum 1.0.1
Bookmarks alefragnani 0.12.0
project-manager alefragnani 0.13.5
copy-syntax atian25 0.5.1
vscode-custom-css be5invis 2.3.1
npm-intellisense christian-kohler 1.3.0
vscode-mocha-latte cspotcode 0.2.0
vscode-eslint dbaeumer 1.2.8
vscode-npm-source dkundel 1.0.0
code-runner formulahendry 0.6.15
task-master ianhoney 0.1.39
path-autocomplete ionutvmi 1.4.1
plantuml jebbs 1.3.0
md-navigate jrieken 0.0.1
vue liuji-jim 0.1.5
debugger-for-chrome msjsdiag 2.7.1
node-modules-resolve naumovs 1.0.2
peep nwallace 0.0.5
vscode-json-transform octref 0.1.2
unittest-navigate roblourens 0.0.2
preview-vscode searKing 1.1.4
es6-mocha-snippets spoonscen 0.0.2
code-navigation vikas 0.2.0
JavaScriptSnippets xabikos 1.4.0

Steps to Reproduce:

javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets

// want this
const arr = [ 'a', 'b' ];
// don't want this
arr[ 1 ];

Copied from original issue: Microsoft/vscode#23321

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 locating the implementation of javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets and compare formatting for array literals and array access expressions. Use the two JavaScript examples as the expected behavior; the issue names no source file or test, so completion should include coverage for spaces in literals and no spaces in accesses.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.