-
Notifications
You must be signed in to change notification settings - Fork 1
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
Error: Failed to load plugin: xxx #87
Comments
Pull Requests welcome! I think adding official support to
Let me know if you have any questions! Applicable resources:
cc @szeck87 |
@Glavin001 Okay I'll try to do this. btw. I think it would be useful to give an extra parameter to the dependency object to specify which is the core package and which are plugins or something else. |
And I thought about another object in the Beautifier interface like "addPlugin" which returns the program containing all plugins. Just to separate those things. |
Plugins (like ESLint Plugins) are an implementation detail of the specific beautifier (i.e. ESLint), not of Unibeautify. A Unibeautify Beautifier should be complete with all applicable plugins to support the languages (e.g. JavaScript, JSX) and options. |
@Glavin001 should |
@szeck87 I think |
@Glavin001 I thought about something else to make it more pluggable. beautifier-eslint is using ESLint executor from its node_modules, so it is not possible to load plugins through a projects .eslintrc.json, so beautifier-eslint would need to install them in his node_modules. I will try some things locally and hope to get this working. |
The issue is the Unibeautify Beautifier needs to be aware of all of the languages and options it supports. So by adding
I want to support loading
This should be handled by https://github.com/Unibeautify/unibeautify/blob/master/src/DependencyManager/NodeDependency.ts and potentially https://github.com/Unibeautify/vscode
I do not recommend investigating anything experimental like this until we've discussed it fully. |
🎉 #88 has been merged. 🎆 |
@Glavin001: I thought about somethings yesterday evening. We could look for the package.json that is next to the file that will be formatted or the projectdir. Then we search for matches with |
This would add plugins dynamically to ESLint's Engine, however, the bigger problem is the Beautifier's supported options and languages. Your PR #88 worked well with having Now that I think of it, I do have a problem with #88 in that the |
Maybe we will let this open and rethink about NodeDependencies first. There should be a change to make it more dynamic when working with plugins. |
Agreed. I'll leave this issue open :). |
@Glavin001 You need to update the package version to let npm update the package in e.g. the website. Currently I get |
You're right. We need to publish a new release with a version bumped to Coming soon 😄 . Thanks, @muuvmuuv ! |
Published to v0.6.0! 🎉 |
@Glavin001 may give it a tag |
Good thinking. I was in a rush earlier. |
I'm using VSCode with the current version of Uniebeautify and have ESLint enabled with
prefer_beautifier_config
option. Now I'm working on a react project with gatsby (I'm using this template: https://github.com/haysclark/gatsby-starter-casper) and got the following error (copied form the dev console):I think it is because the beautifier plugin is using its own or the global ESLint installation? I have one installed in my project with the plugin it needs. Maybe this can be fixed when Unibeautify is checking whenever a plugins CI is already installed in 1. project 2. global and then fall back to the local installation.
The text was updated successfully, but these errors were encountered: