Skip to content
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

Cleanup: Make ESLint the default formatter in vscode #19669

Merged
merged 3 commits into from
Nov 2, 2022
Merged

Conversation

IanVS
Copy link
Member

@IanVS IanVS commented Oct 28, 2022

Issue: N/A

In my vscode global settings, I use prettier as my default format-on-save extension. But, storybook runs prettier through ESLint, and has other rules like @typescript-eslint/consistent-type-imports (see #19656) which can auto-fix as well.

What I did

I configured VSCode to use the ESLint extension to format javascript, typescript, and jsx files on save.

I also enabled deepscan when opening /code directly (to keep the vscode settings in-sync between root and code).

How to test

Open either the storybook repo or the /code directory (where I often work out of), introduce a linting error that's auto-fixable, and press save, and formatting should happen.

@IanVS IanVS added the cleanup Minor cleanup style change that won't show up in release changelog label Oct 28, 2022
@IanVS IanVS changed the title Make ESLint the default formatter in vscode Cleanup: Make ESLint the default formatter in vscode Oct 28, 2022
Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@IanVS
Copy link
Member Author

IanVS commented Nov 2, 2022

@kasperpeulen I added the setting for eslint that you asked for. 👍

@kasperpeulen kasperpeulen merged commit e0026c0 into next Nov 2, 2022
@kasperpeulen kasperpeulen deleted the eslint-fix branch November 2, 2022 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Minor cleanup style change that won't show up in release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants