You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think this is a bug for eslint-plugin-prettier, but one recent PR gives Prettier a chance to load its configure file even in API mode introduce conflict with Webpack at least.
Since 1.6.0 Prettier now pickup '--config' arg from the command line to load its configuration, but it didn't distinguish who was the arg for, so if you set it up with webpack, eslint-loader and eslint-plugin-prettier and running command like
webpack --config webpack.dev.js
could have webpack.dev.js file been pick up by prettier as configuration thus resulting Validation Warning like this:
● Validation Warning:
Unknown option "devtool" with value "#source-map" was found.
This is probably a typing mistake. Fixing it will remove this message.
The reason I rise it here is that given the 'bridge' nature of eslint-plugin-prettier that using prettier in API mode, perhaps we could have flag controls this "loads config file by its self like it did in command mode" behaviour, I'm currently holding at version 2.2.0 to avoid this.
Just my 2 cents, not sure if it's duplicated, Please feel free to correct me.
The text was updated successfully, but these errors were encountered:
Thanks for the report. I think this is an issue with prettier, not eslint-plugin-pretter -- it seems like resolveConfig shouldn't interpret global command line arguments when used from the API.
Thanks for quick reply, @not-an-aardvark I'm not sure the intention of resolveConfig at first place, but if you feel it looks like a bug, I'm happy to post it there.
I don't think this is a bug for eslint-plugin-prettier, but one recent PR gives Prettier a chance to load its configure file even in API mode introduce conflict with Webpack at least.
Since 1.6.0 Prettier now pickup '--config' arg from the command line to load its configuration, but it didn't distinguish who was the arg for, so if you set it up with webpack, eslint-loader and eslint-plugin-prettier and running command like
webpack --config webpack.dev.js
could have webpack.dev.js file been pick up by prettier as configuration thus resulting Validation Warning like this:
The reason I rise it here is that given the 'bridge' nature of eslint-plugin-prettier that using prettier in API mode, perhaps we could have flag controls this "loads config file by its self like it did in command mode" behaviour, I'm currently holding at version 2.2.0 to avoid this.
Just my 2 cents, not sure if it's duplicated, Please feel free to correct me.
The text was updated successfully, but these errors were encountered: