Skip to content

Don't use eslint formatter for rust files in vscode #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 4, 2021

Conversation

pkupper
Copy link
Contributor

@pkupper pkupper commented Jun 27, 2021

Currently "dbaeumer.vscode-eslint" is globally set as the default formatter for the entire workspace. This does not work for rust files and therefore stops formatOnSave from working in VSCode. I propose removing this definition as this should be a user setting and not a workspace setting. Alternatively "dbaeumer.vscode-eslint" could be set as the default formatter for javascript/typescript/vue files only.


This change is Reviewable

@Keavon
Copy link
Member

Keavon commented Jun 27, 2021

Thanks for the heads up, that should target only the web-related files. It should not be removed though.

@Keavon
Copy link
Member

Keavon commented Jul 3, 2021

@pkupper do you want to submit a patch with the following contents of .vscode/settings.json?

{
	"[rust]": {
		"editor.formatOnSave": true,
		"editor.formatOnPaste": true
	},
	"[typescript, javascript, json, vue]": {
		"editor.codeActionsOnSave": {
			"source.fixAll.eslint": true
		},
		"editor.formatOnSave": true,
		"editor.defaultFormatter": "dbaeumer.vscode-eslint",
	},
	"rust-analyzer.diagnostics.disabled": [
		"missing-unsafe" // Remove when rust-analyzer bug fixes unsafe code on WASM JavaScript https://github.com/rust-analyzer/rust-analyzer/issues/5412
	],
	"files.eol": "\n",
	"html.format.wrapLineLength": 200,
	"eslint.format.enable": true,
	"eslint.workingDirectories": [
		"./client/web"
	],
	"eslint.validate": [
		"javascript",
		"typescript",
	],
	"vetur.format.enable": false,
}

@pkupper pkupper changed the title Remove default formatter from vscode settings Don't use eslint formatter for rust files in vscode Jul 4, 2021
@pkupper pkupper requested a review from Keavon July 4, 2021 20:26
@Keavon Keavon merged commit cd52629 into GraphiteEditor:master Jul 4, 2021
Keavon pushed a commit that referenced this pull request Jun 16, 2022
* Remove default formatter from vscode settings

* Only use eslint formatter on js/ts/json/vue files
Keavon pushed a commit that referenced this pull request Jul 30, 2023
* Remove default formatter from vscode settings

* Only use eslint formatter on js/ts/json/vue files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants