-
Notifications
You must be signed in to change notification settings - Fork 432
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
Module generates eslint config with the old commonJS syntax #451
Comments
I'm not an expert on this, but I think it's because ESLint did not allow a flat config for a long time so this was a workaround when create-vue was initially created by @sodatea . Maybe it would be possible to do better now, I haven't checked. If you think that can be improved, feel free to open a PR, we would gladly review and merge it 👍 |
@cexbrayat thanks for the reply, I suppose you are right about the workaround. ESlint v9 will have full support for ES modules |
Let's keep an eye on vuejs/eslint-plugin-vue#2407 |
ESLint v9 is now released and PR vuejs/eslint-plugin-vue#2407 is merged. Seems like this can now be resolved with a PR? |
@JoostKersjes Sure, feel free to open one and we'll gladly review it, thanks! 👍 |
A new version for @vue/create-eslint-config is where most of the work lies, so this is what I've been looking into. Not sure if PR's are accepted there though. |
@JoostKersjes We're always happy to get PRs, feel free to open one |
@cexbrayat Hey, I think the create-eslint-config PR ready for review now. Could you do that or find someone for it? |
I'd definitely like to see the project scaffolds using the flat config format ASAP. It greatly reduces the complexity of configuring ESLint, as well as setting a bunch of reasonable defaults the old system didn't and organizing things better. I want to get rid of the |
If someone is in a rush to use flat config, ESLint has a migration tool https://www.npmjs.com/package/@eslint/migrate-config |
Flat config support added in the latest release. |
The module generates eslint config with the old commonJS syntax
When you init a new project:
And then setup the
Vue / configure with vue-create
templateInstead of generating modern
.js
config file with modernexport default
syntax, the module creates commonJS./eslintrc.cjs
file with the old commonJSmodule.exports = {}
syntax, with arequire()
monkey patch at the top:It doesn't make any sense and it's not clear why it does that. Please shine some light on this issue
The text was updated successfully, but these errors were encountered: