sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Add features for TypeScript formatter in VS Code
Labels: Bug,Help Wanted,Domain: Formatter

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->

TypeScript formatter customize

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

When formatting other's "brace in same line" code to "brace to next line" style, the open brace after `else` or `catch` will still remains on the same line like this:

```typescript
if (true)
{
    // Some statement
} else 
{
    // Some statement
}
```

The formatter in TypeScript does not has many options for formatting. For example, let user to specify whether the formatter will add space to an opening and closing brace depending on the "job" of the brace - if user create an object, then DO NOT add space, if user write a statement after `if` with brace, then add space.

## 📃 Motivating Example

<!--
  If you were announcing this feature in a blog post, what's a short explanation that shows
  a developer why this feature improves the language?
-->

If we can have code like this:

```typescript
if (true) { console.log({a: 1, b: 2}); }
else { }
```

We can differ code block and object clearer.

## 💻 Use Cases

<!--
  What do you want to use this for?
  What shortcomings exist with current approaches?
  What workarounds are you using in the meantime?
-->

I think different people have different coding style, so it will be useful if VSCode have this feature for the user who want to arrange their code in their favorite style.
Repository: vscode
Issue: SCM: too many "Publish Changes" buttons in multi root workspace
Labels: scm,under-discussion

Opening a multi root workspace from folders that are not published, I find the look is pretty overwhelming now:

![image](https://user-images.githubusercontent.com/900690/135047262-1bc36952-dd2a-4f19-9ea2-432fee4954f7.png)


//cc @lszomoru @misolori
Repository: puppeteer
Issue: Authenticate proxy without calling `page.authenticate(...)` every time
Labels: feature

See https://github.com/microsoft/playwright/pull/2485/files

#### Current solution

```js
(async () => {
  const browser = await puppeteer.launch();
  const context = await browser.createIncognitoBrowserContext({
    proxyServer: 'http://foo.bar'
  });

  const page = await context.newPage();
  await page.authenticate({
    username: 'username',
    password: 'password'
  });
  await page.goto('https://example.com');
  await page.close();
})();
```

#### Desired solution

```js
(async () => {
  const browser = await puppeteer.launch();
  const context = await browser.createIncognitoBrowserContext({
    proxyServer: 'http://foo.bar',
    proxyUsername: 'username',
    proxyPassword: 'password'
  });

  const page = await context.newPage();
  await page.goto('https://example.com');
  await page.close();
})();
```
Repository: vscode
Issue: URI provided by didOpen does not conform to RFC3986
Labels: under-discussion,uri

opening a new file with code -r bar.ttcn3 on a remote linux host using the ssh-remote vscode extension supplies following URI as parameter of the didOpen notification:

```
[Trace - 10:12:35 AM] Sending notification 'textDocument/didOpen'.
Params: {
    "textDocument": {
        "uri": "untitled://ssh-remote%2B192.168.1.10/home/moosq/examples/bar.ttcn3",
        "languageId": "ttcn3",
        "version": 1,
        "text": ""
    }
}
```

Using `%2B` instead of the `+` character does not conform to the specification of the authority part from [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.2) page 20 where such an encoding is solely reserved for non-ascii characters:

> The reg-name syntax allows percent-encoded octets in order to
   represent non-ASCII registered names in a uniform way that is
   independent of the underlying name resolution technology.  Non-ASCII
   characters must first be encoded according to UTF-8 [STD63], and then
   each octet of the corresponding UTF-8 sequence must be percent-
   encoded to be represented as URI characters.  __URI producing
   applications must not use percent-encoding in host unless it is used
   to represent a UTF-8 character sequence__.
Repository: vscode
Issue: Sparse top level menu when no window is opened
Labels: feature-request,macos,menus

When closing all windows on macOS the menu looks sparse:

![image](https://user-images.githubusercontent.com/900690/135055613-0a90cb94-186d-479b-9c9e-af044d28c024.png)

I would suggest to preserve the top level menu entry points but have all menu items within disabled.
Repository: vscode
Issue: Terminal toggle size to content width acts unexpectedly wrt viewport dimensions, scroll bar and padding
Labels: bug,terminal-layout

Testing #133550

~~Sorry, no good steps yet but after toggling content width a couple I time I ended up with frozen view port dimensions, esp vertically~~

* open a terminal
* type `ls -la`
* toggle wrapping a few times and repeat the `ls -la` command
* :bug: size goes off


https://user-images.githubusercontent.com/1794099/135058934-5ff6a37a-d843-4e66-923a-130c3ace85fc.mov
Repository: vscode
Issue: Settings editor flickers
Labels: bug,perf,settings-editor,confirmed

When restarting with a scoped setting:

![recording](https://user-images.githubusercontent.com/900690/135055866-90f0c3a6-57e6-4eac-90cb-251a266d1b8d.gif)
Repository: neovim
Issue: Space between virtual text from separate extmarks
Labels: enhancement,marks

### Neovim version (nvim -v)

0.6.0 commit 392c658d4

### Vim (not Nvim) behaves the same?

not applicable

### Operating system/version

5.14.7-arch1-1

### Terminal name/version

foot 1.9.0-80-gebbac832

### $TERM environment variable

foot

### Installation

AUR

### How to reproduce the issue

```lua
vim.api.nvim_create_namespace("test")
vim.api.nvim_buf_set_extmark(0, 1, 0, 0, {virt_text = {{"a", "none"}}})
vim.api.nvim_buf_set_extmark(0, 1, 0, 0, {virt_text = {{"a", "none"}}})
```

### Expected behavior

(pre 392c658)
![screen](https://user-images.githubusercontent.com/41961280/135056281-eb07474a-0351-4a4a-b50e-aca7060bda9d.png)


### Actual behavior

![screen](https://user-images.githubusercontent.com/41961280/135056072-27a186bd-ba00-4910-b345-69ab7726ce3b.png)
Repository: godot
Issue: Different behaviours for the same problem: Values of the ternary conditional are not mutually compatible
Labels: bug,topic:gdscript

### Godot version

3.3.3

### System information

Windows 10

### Issue description

This four cases for the same problem have different results (see comments)

```
extends Control


func _init():
	
	var value : int = 10
	
	var x : int = 1 if (value%2==0) else 0.5 # 1) Error : Values of the ternary conditional are not mutually compatible
	print(x) # 1
	
	var y : int = 1 if (10%2==0) else 0.5 # 2) No error arises and 'value=10'. The same error as in 1) should arise.
	print(y) # 1
	
	var z : float = 1 if (value%2==0) else 0.5 # same as 1)
	print(z) # 1
	
	var w : float = 1 if (10%2==0) else 0.5 # Same as 2)
	print(w) # 1
```


### Steps to reproduce

Copy the code above and play the project.

### Minimal reproduction project

[Project.zip](https://github.com/godotengine/godot/files/7243168/Project.zip)
Repository: material-ui
Issue: How override Material UI v5 styles with makeStyles?
Labels: bug 🐛,component: chip,v5.x migration,regression

Hello,

Three days ago I migrated from version 4 to 5. I use `makeStyles` to style all my components. But with version 5, many of my styles have lost priority and the original mui styles win over my styles with `makeStyles`. I've been reading a lot about this problem and I don't understand which is the best solution for now. I tried with `StyledEngineProvider` of course, but my problem persists.

I use SSR in my app, but I have here a simple example to see this: https://codesandbox.io/s/hook-material-demo-forked-l7wwu

The visual example:
![2021-09-28_12h51_37](https://user-images.githubusercontent.com/6153618/135073755-2812e2c2-b3e4-4f80-a1d4-8ef7ff98a180.png)

The priority now:
![2021-09-28_12h54_47](https://user-images.githubusercontent.com/6153618/135074165-1a14ab16-cf03-407d-9e21-f43467865c64.png)
Repository: TypeScript
Issue: Broken equality between enum and union of its values
Labels: Bug

# Bug Report

### 🕗 Version & Regression Information

- This changed between versions  [4.3.5](https://www.typescriptlang.org/play?ts=4.3.5#code/FAFwngDgpgBAogRwK4EMA2BnAPDAgjAGhgCEYA+GAXmAEgaAKWurADTPoEpKKWYoAPEFAB2AEwx4YAfhgBGGAC4YAJiYc+gkeJiM6NVuy48NQsRNIz5S1XQ5MaMkACckUe0oBm6DG+AikALYwPvwwAN4wAeiwRB5QUWiwAL7AqeDQwQLylDrpUAD2Hpn8HADaMADWUGCFMHm1ITAAuqCQsCHKVMUAdAmwAD49cX1pbTD8E12IqJg4IfJEjRQA9Mt1LrAKdnkwYHtTyN5zAp2LAuQwq+uuittjAF6PBzPYxQvFnStrzjdbQA) and [4.4.3](https://www.typescriptlang.org/play?ts=4.4.3&ssl=19&ssc=44&pln=1&pc=1#code/FAFwngDgpgBAogRwK4EMA2BnAPDAgjAGhgCEYA+GAXmAEgaAKWurADTPoEpKKWYoAPEFAB2AEwx4YAfhgBGGAC4YAJiYc+gkeJiM6NVuy48NQsRNIz5S1XQ5MaMkACckUe0oBm6DG+AikALYwPvwwAN4wAeiwRB5QUWiwAL7AqeDQwQLylDrpUAD2Hpn8HADaMADWUGCFMHm1ITAAuqCQsCHKVMUAdAmwAD49cX1pbTD8E12IqJg4IfJEjRQA9MswXpiwCox5MGD7U8jecwKdiwLkMKvr3ls7YwBeT4cz2MULxZ0ra86uihxAA)

### 💻 Code

```ts
type Equals< A , B > =
		(
			<X>()=> X extends A ? 1 : 2
		) extends (
			<X>()=> X extends B ? 1 : 2
		)
			? true
			: false

enum sex { male , female }

type sex1 = (typeof sex)[ keyof typeof sex ]
type sex2 = sex.male | sex.female

type xxx = Equals< sex1 , sex > // false :(
type yyy = Equals< sex2 , sex > // false :(
type zzz = Equals< sex1 , sex2 > // true :)
```

### 🙁 Actual behavior

`false` for `xxx` and `yyy`.

### 🙂 Expected behavior

`true` everywhere.
Repository: godot
Issue: NOTIFICATION_WM_MOUSE_ENTER doesn't emit when mouse button is being pressed
Labels: bug,topic:input

### Godot version

3.3 Stable, v4.0.dev.custom_build [916c37de0]

### System information

Manjaro Linux

### Issue description

When normally entering the game with the mouse, the NOTIFICATION_WM_MOUSE_ENTER notification is emitted. But when a file is dragged into the game nothing happens. This issue is present in both Godot 3.3 and Godot 4.0-dev.

https://user-images.githubusercontent.com/47503977/135075827-2f6e89ec-4eb2-400b-960e-2256bc67780b.mp4

.

### Steps to reproduce

1. Create a Node with a script including this code (3.3):
  ```
func _notification(what):
    if what == MainLoop.NOTIFICATION_WM_MOUSE_ENTER:
       print("Emitted")
```
2. Try to drag a file into the game window, "Emitted" is not printed.

### Minimal reproduction project

[Test.zip](https://github.com/godotengine/godot/files/7243406/Test.zip)
Repository: ant-design
Issue: Carousel cards inside the tabs, on change of tabs cards text appears distorted for a millisecond
Labels: 🐛 Bug,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/basic-antd-4-17-0-alpha-3-forked-o592j)

### Steps to reproduce
- Add ant-d Tabs and in each Tab pane add multiple cards with Carousel in it.
- Normal cards won't cause an issue but if the Carousel card is added then its content appears distorted on the tab switch for a few milliseconds.

### What is expected?
Smooth behavior on tab change

### What is actually happening?
Content of cards gets distorted, appears to be in a line on the tab switch

| Environment | Info |
|---|---|
| antd | 4.16.13 |
| React | 16.8.2 |
| System | 1909 |
| Browser | 94.0.4606.54 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: vscode
Issue: SCM changes view: duplicate repository and buttons
Labels: scm,under-discussion,regression

Here:

![image](https://user-images.githubusercontent.com/900690/135077765-8fed89d1-bcf1-4891-ab4e-5ed38e3d738f.png)

I always have the repositories view visible but now I see the same information again because of `"scm.alwaysShowRepositories": true` having changed.
Repository: godot
Issue: Vulkan: Sky process mode can be set to realtime even when it makes no sense to do so
Labels: discussion,topic:rendering,usability,topic:3d

### Godot version

v4.0.dev.calinou [de917008f]

### System information

Linux Manjaro, Vulkan, Intel Kaby Lake

### Issue description

According to the docs https://docs.godotengine.org/en/latest/classes/class_sky.html#class-sky-property-process-mode Realtime process mode only works for cubemaps of size 256.

Therefore it makes no sense to display that option in the UI if cubemap/radiance size is set to something else. Same goes for scripting.

Tangentially related, automatic process setting is NOT documented at all.

### Steps to reproduce

Open up the editor, play around with the default world environment.

### Minimal reproduction project

N/A
Repository: TypeScript
Issue: Add an entry in `compilerOptions` to forbid throwing anything except Error and it's derivates.
Labels: Suggestion

# Suggestion

## 🔍 Search Terms

- catch
- catch clause
- unknown type in catch clause
- force Error in catch

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [✅] This wouldn't be a breaking change in existing TypeScript/JavaScript code
> This being fully compatible with default Javascript behavior wouldn't override any Javascript native behavior. Moreover, making it an option defaulting to `false` would not break any existing TypeScript code.
* [✅] This wouldn't change the runtime behavior of existing JavaScript code
* [✅] This could be implemented without emitting different JS based on the types of the expressions
* [✅] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [✅] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

Recently TypeScript moved forward regarding `try/catch` statements to make the parameter of `catch` being of type `unknown` which is a great start. However, it is bad practice to throw anything that does not inherit from Error, especially throwing literals. My suggestions has two different parts.

- 1 -  Add a `compilerOptions` entry refusing any literal throw or throw anything that does not inherit from Error.
- 2 - With this option, always consider that the parameter from `catch` will always and can only be an instance of Error.

To my knowledge, there is no native Javascript code that throws literal. I may be wrong but I think Javascript exclusively throws Errors natively and nothing else. This would make it fully compatible with JavaScript but will reduce code verbosity when using `try/catch` statements, avoiding unnecessary type checks. It would also enforce a good practice overall.

## 📃 Motivating Example

Throwing literals is often considered bad practice. Throwing exclusively Errors is widely regarded as the right practice in the Javascript community as demonstrated by the implementation of this rule at Beta stage of ESlint: https://eslint.org/docs/rules/no-throw-literal (0.15).
While the current state of TypeScript regarding `catch` clauses allows throwing literals because Javascript does, it also forces people following best practices to engage into extra unnecessary type validation checks. Since the idea is that any Javascript code is valid in TypeScript, it should be an option to make checking more strict instead of being enforced by default.

## 💻 Use Cases

There are an infinite amount of use cases as it touches the `catch` clause behavior. Ultimately this aims to improves readability of TypeScript code, avoid unnecessary type checking and unnecessary verbosity.
Repository: pytorch
Issue: Sobol state API
Labels: module: docs,triaged,module: random

I have a serverless compute (Azure Functions) from where I want return the next sobol sample for each request.
Since Azure Functions are stateless, I should store the state to persistent storage so that I can read it and generate the next sample for a new request. Sobol engine's documentation (https://pytorch.org/docs/stable/generated/torch.quasirandom.SobolEngine.html) does not specify how to save and restore the state of the engine. Looks like it maintains an internal state self.sobolstate (https://pytorch.org/docs/stable/_modules/torch/quasirandom.html#SobolEngine).

cc @brianjo @mruberry @pbelevich
Repository: vscode
Issue: `activeItems` not preserved even if keepScrollPosition = true
Labels: bug,quick-pick

Testing #133891

1. Have the following extension.
2. Run the extension. F1 > hello world
3. Notice how the scroll position is not preserved when the new items get added to the quick pick 🐛 

```Tyepscript
import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {

	let disposable = vscode.commands.registerCommand('sep-ext.helloWorld', async () => {
		const pick = await vscode.window.createQuickPick();
		pick.keepScrollPosition = true;
		const items = [{ label: 'january' }, { label: 'february' }, { label: 'march' }, { label: 'april' }, { label: 'may' }, { label: 'june' }, { label: 'july' }, { label: 'august' }, { label: 'september' }, { label: 'october' }, { label: 'november' }, { label: 'december' }];;
		pick.items = items;
		pick.show();

		let i = 0;
		setInterval(() => {
			items.push({ label: String(i++) })
			pick.items = items;
		}, 500);
	});
	context.subscriptions.push(disposable);
}

export function deactivate() { }

```
Repository: bitcoin
Issue: test: replace bare asserts with assertion helpers (assert_equal() etc.)
Labels: good first issue

#23117 replaced asserts with the test framework's internal helpers (see https://github.com/bitcoin/bitcoin/blob/dccf3d25f9e78909eb7b3143e89a7c87fac25ab5/test/functional/test_framework/util.py#L47-L59) for a single test, in order to see the expected and failed values if such an assertion fails. The same should be done for all the remaining tests. Potential candidates can be found via
```
$ cd ./test/functional
$ git grep assert.*==
$ git grep "assert.*<="
$ git grep "assert.*>="
$ git grep "assert.*<"
$ git grep "assert.*>"
```

#### Useful skills:

basic Python3 knowledge

#### Want to work on this issue?

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
Repository: godot
Issue: If a plugin is enabled all global classes are erase from project file
Labels: bug,platform:windows,topic:editor

### Godot version

3.3.3

### System information

Windows 10

### Issue description

So basically, as the title says, when i enable a custom plugin and i close a project every global class defined in the project settings disappear and when i re-open the project i get a wall of errors about scripts unable to find that class.

# Important
- The plugin is made by me.
- The plugin add both a dock and a fullscreen scene.
- Scripts that define these classes still exist.
- After the errors the classes works normally and can be found by scripts.
- Most of the errors are about tool scripts that execute stuff when the editor is opened.

# Analysys
When i disable the plugin and close the project, the project file (`project.godot`) contain all class definitions.

When i enable the plugin and close the prohect, the project file (still `project.godot`) erase all class definitions and every other settings are untouched.

I've tried to download some random plugins to see if the same error happen and yes, even if i enable a single plugin it erase all the classes.

# Conclusion
Now everytime i close the project i first disable the plugin, the error messages does not appear and all classes are not erased.

Idk, if is the current version of godot that give me this problem (i've recently upgraded from 3.3.2) or some bugs inside the plugin or project itself.

# Extra
Here the project file when i close the project after enabling/disabling the plugin.
Everything after `config_version` and before `[application]` disappear.
![image](https://user-images.githubusercontent.com/89723855/135097529-6593b82c-faca-4a58-b258-85d3d81db36c.png)


### Steps to reproduce

This is how i get this problem:
- Make a global class
- Make some scripts that use that class
- Make a custom plugin
- Enable the plugin
- Close the project
- Open the project
- See errors

### Minimal reproduction project

Here the project:
[ConfigBox-pluginbug.zip](https://github.com/godotengine/godot/files/7244459/ConfigBox-pluginbug.zip)

When opened it should show like 5 errors in the output about classes that does not exist.
If you run the project everything works normally (no more errors).
Repository: storybook
Issue: ArgsTable: Add option to hide controls
Labels: feature request,addon: docs,block: argstable

When creating an ArgsTable for a story, it currently shows controls in the right-most column. Add a prop to disable the controls: 

```
<ArgsTable story="story--id" controls={false} />
```