Skip to content

Note that .editorconfig settings include quote_type.#12780

Closed
midgleyc wants to merge 1 commit into
prettier:mainfrom
midgleyc:editorconfig-single-quote
Closed

Note that .editorconfig settings include quote_type.#12780
midgleyc wants to merge 1 commit into
prettier:mainfrom
midgleyc:editorconfig-single-quote

Conversation

@midgleyc

@midgleyc midgleyc commented May 3, 2022

Copy link
Copy Markdown
Contributor

Description

Note that .editorconfig settings include quote_type.

They can include all values mapped in editorconfig-to-prettier. I've been using quote_type locally for a while and was surprised to see it not in the docs.

Checklist

  • I’ve changed only documentation (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@fisker

fisker commented May 3, 2022

Copy link
Copy Markdown
Member

I didn't know this. Not sure if we should support this non-standard property.

@midgleyc

midgleyc commented May 3, 2022

Copy link
Copy Markdown
Contributor Author

If you don't support it, I don't believe there's a way to do what I currently do: single quotes for TypeScript (as Angular recommends), double quotes for HTML / CSS.

EditorConfig is a nice way to do file extension-specific configuration.

@midgleyc

midgleyc commented May 3, 2022

Copy link
Copy Markdown
Contributor Author

@fisker

fisker commented May 6, 2022

Copy link
Copy Markdown
Member

I don't believe there's a way to do what I currently do: single quotes for TypeScript (as Angular recommends), double quotes for HTML / CSS.

{
	singleQuote: true,
	overrides: {
		files: ['**/*.html', '**/*.css'],
		options: {
			singleQuote: false,
		}
	}
}

archlinux-github pushed a commit to archlinux/neoasknot that referenced this pull request Mar 14, 2023
polyzen added a commit to polyzen/landing that referenced this pull request Mar 8, 2025
Prettier picks up quote style from .editorconfig:
prettier/prettier#12780
@fisker

fisker commented May 22, 2025

Copy link
Copy Markdown
Member

Sorry, we are not going to read non-standard keys.

@fisker fisker closed this May 22, 2025
@polyzen

polyzen commented May 24, 2025

Copy link
Copy Markdown

Support for this already exists, no? This is just accompanying documentation.

@fisker

fisker commented May 24, 2025

Copy link
Copy Markdown
Member

Ah, you are right, it's supported, since people may already use it, I guess we'll just keep it as undocumented feature.

Original commit
Releated code

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.

3 participants