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

Ignored unknown option: phpVersion, braceStyle #2223

Closed
coffebar opened this issue Aug 24, 2023 · 2 comments
Closed

Ignored unknown option: phpVersion, braceStyle #2223

coffebar opened this issue Aug 24, 2023 · 2 comments

Comments

@coffebar
Copy link

~/.prettierrc.json

{
	"overrides": [
		{
			"files": "*.php",
			"options": {
				"parser": "php",
				"useTabs": true,
				"braceStyle": "1tbs",
				"phpVersion": "7.1",
				"tabWidth": 2
			}
		}
	]
}

prettier --log-level debug dev/custom-theme/functions.php

[debug] normalized argv: {"":["dev/custom-theme/functions.php"],"cache":false,"color":true,"editorconfig":true,"logLevel":"debug","configPrecedence":"cli-override","debugRepeat":0,"ignorePath":[".gitignore",".prettierignore"],"plugins":[],"_":["dev/custom-theme/functions.php"],"__raw":{"_":["dev/custom-theme/functions.php"],"cache":false,"color":true,"editorconfig":true,"log-level":"debug","config-precedence":"cli-override","debug-repeat":0,"ignore-path":[".gitignore",".prettierignore"],"plugin":[]}}
[debug] resolve config from '/home/abc/dev/custom-theme/functions.php'
[debug] loaded options `{"parser":"php","useTabs":true,"braceStyle":"1tbs","phpVersion":"7.1","tabWidth":2}`
[warn] Ignored unknown option { braceStyle: "1tbs" }.
[warn] Ignored unknown option { phpVersion: "7.1" }.
[debug] applied config-precedence (cli-override): {"parser":"php","tabWidth":2,"useTabs":true}

Why does it ignore options braceStyle and phpVersion?

[warn] Ignored unknown option { braceStyle: "1tbs" }.
[warn] Ignored unknown option { phpVersion: "7.1" }.

Readme has these options.

Env context: Prettier and this plugin is installed via npm on Linux.

@coffebar
Copy link
Author

if i add to ~/.prettierrc.json this line

 "plugins": ["@prettier/plugin-php"],

then i get error:

[error] Cannot find package '@prettier/plugin-php' imported from /home/abc/noop.js

however, this directory ~/.node_modules/lib/node_modules/@prettier/plugin-php is not empty

@coffebar
Copy link
Author

I figured out this issue is related to prettier itself.

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

1 participant