I would like to use the tailwind sorter plugin with prettier. But to specify "plugins", I have to use a local configuration file. If I do use it, it will ignore my global prettier settings - which I do not want.
Is there another way to solve it?
It should be possible to extend an existing config right?
import globalConfig from "../../../globalConfig";
const config = {
...globalConfig,
plugins: [...(globalConfig.plugins || []), "your-preferred-plugin"],
};
export default config;
EDIT: The OP is using the default VScode config
Extending vscode config is not possible right now. If you add a file you will completely override them yes. It is recommended that one uses a prettier config file and not the editor's default. Your code's indentation/spacing should not change based on your code editor right? If you use default vscode settings, things will look different when you move to say Webstorm.
The docs also recommend it. I would suggest, create a config file (even if you copy everything from the vscode settings right now) and then extend it using the method I have mentioned.