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

warning after upgrading to 0.2.0 - Ignored unknown option svelteStrictMode svelteAllowShorthand #103

Closed
xmlking opened this issue Nov 27, 2022 · 2 comments

Comments

@xmlking
Copy link

xmlking commented Nov 27, 2022

after upgrading from "prettier-plugin-tailwindcss": "0.1.13" to "prettier-plugin-tailwindcss": "0.2.0",
I am getting a bunch of warning

[warn] Ignored unknown option { svelteStrictMode: true }.
[warn] Ignored unknown option { svelteAllowShorthand: false }.
src/lib/utils/pkce.ts 7ms
[warn] Ignored unknown option { svelteStrictMode: true }.
[warn] Ignored unknown option { svelteAllowShorthand: false }.
src/lib/utils/zod.utils.ts 10ms
[warn] Ignored unknown option { svelteStrictMode: true }.
[warn] Ignored unknown option { svelteAllowShorthand: false }.
src/mocks/data/accounts.ts 7ms
[warn] Ignored unknown option { svelteStrictMode: true }.
[warn] Ignored unknown option { svelteAllowShorthand: false }.
src/mocks/data/miserables.json 19ms
[warn] Ignored unknown option { svelteStrictMode: true }.
[warn] Ignored unknown option { svelteAllowShorthand: false }.

my .prettierrc file

{
	"useTabs": true,
	"singleQuote": true,
	"trailingComma": "none",
	"printWidth": 500,
	"pluginSearchDirs": ["."],
	"overrides": [
		{
			"files": "*.svelte",
			"options": {
				"parser": "svelte"
			}
		},
		{
			"files": ["*.yaml", "*.yml"],
			"options": {
				"tabWidth": 2,
				"bracketSpacing": false
			}
		},
		{
			"files": "*.md",
			"options": {
				"tabWidth": 2
			}
		}
	],
	"tabWidth": 4,
	"embeddedLanguageFormatting": "auto",
	"htmlWhitespaceSensitivity": "strict",
	"svelteStrictMode": true,
	"svelteAllowShorthand": false
}

@adamwathan
Copy link
Member

Hey! As of v0.2.0 we no longer bundle prettier-plugin-svelte ourselves so you need to explicitly install it which I'm guessing is the issue here. Can follow the discussion here for more info on the changes:

#31 (comment)

@reinink
Copy link
Member

reinink commented Nov 28, 2022

Hey @xmlking, apologies for the confusion here! This new release included a breaking change for Svelte users. I've just updated the v0.2.0 release notes to explain how to upgrade your Svelte project.

Let me know if you have any further issues after following these steps 👍

@reinink reinink closed this as completed Nov 28, 2022
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

No branches or pull requests

3 participants