-
Notifications
You must be signed in to change notification settings - Fork 79
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
Prettier Error #86
Comments
You shouldn't be running prettier or eslint on generated output files. I'm not sure how the vue-cli prettier plugin you're using works, but you'll want to find a way to tell prettier to ignore whatever directory you're outputting files to (dist, build, etc). |
Is not running on generated files, the error appears on the worker inside the src folder. I was able to fix it ignoring the worker specifically. Is not the best solution but works for now. |
What does your worker code look like? I can't think of a reason why Prettier would complain about core-js require() statements other than them simply being present in the worker file. Is it code you've copied from somewhere? |
FWIW this appears to be a specific issue with |
I created the code, there is nothing complex about, but it throws the error when I use ES6 functions such as map. |
Could you provide CSB? |
Still having issues with this plugin and @vue/cli. Unable to switch over to eslint-webpack-plugin as described in #95, unfortunately. Any fixes that anyone's come across to get it working with vue? |
Hello!
I have been trying to add a worker through this plugin, but I cannot stop getting errors from prettier related to core-js.
All the functions that I used I appear to be imported as double quotes when compiled.
error in ./src/workers/myworker.js
Module build failed (from ./node_modules/worker-plugin/loader.js):
ModuleError: Module Error (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):
/Users/vicentediaz/pt/src/workers/myworker.js
1:9 error Replace
"core-js/modules/es.array.for-each");
with'core-js/modules/es.array.for-each')
prettier/prettier3:9 error Replace
"core-js/modules/es.array.join");
with'core-js/modules/es.array.join')
prettier/prettier5:9 error Replace
"core-js/modules/es.array.map");
with'core-js/modules/es.array.map')
prettier/prettier7:9 error Replace
"core-js/modules/es.function.name");
with'core-js/modules/es.function.name')
prettier/prettier9:9 error Replace
"core-js/modules/es.object.keys");
with'core-js/modules/es.object.keys')
prettier/prettier11:9 error Replace
"core-js/modules/es.object.to-string");
with'core-js/modules/es.object.to-string')
prettier/prettier13:9 error Replace
"core-js/modules/es.regexp.exec");
with'core-js/modules/es.regexp.exec')
prettier/prettier15:9 error Replace
"core-js/modules/es.string.split");
with'core-js/modules/es.string.split')
prettier/prettier17:9 error Replace
"core-js/modules/web.dom-collections.for-each");
with'core-js/modules/web.dom-collections.for-each')
prettier/prettier19:42 error Replace
"/Users/vicentediaz/pt/node_modules/@babel/runtime/helpers/createForOfIteratorHelper");
with'/Users/vicentediaz/pt/node_modules/@babel/runtime/helpers/createForOfIteratorHelper')
prettier/prettierHas anyone had any similar problem??
The text was updated successfully, but these errors were encountered: