eslint-plugin-vue
eslint-plugin-vue copied to clipboard
Add support for generating ESLint Flat Config
Will fix https://github.com/vuejs/eslint-plugin-vue/issues/1291
Needs more work, haven't had the time to work on this lately.
I was thinking it would be better to replace the generated config files with JS functions that dynamically return the correct configuration. Should decrease the size of the library and make the code a bit cleaner with the addition of flat configs and probably wouldn't impact runtime performance much. Most other eslint plugins seem to be doing this as well.
It might be a while before I have time to work on this, if any maintainers want to take over this PR, feel free to make any edits.
@conradhale Thanks! I added some more commits, could you please have a look at them? I am not sure what is still missing to have full Flat config support, so I am handing this back to you again :slightly_smiling_face:
@ota-meshi Is there anything blocking this PR from being merged now? I have been implementing npm init @eslint/config for the flat configs, so it would be great see it's officially supported in the plugin. 😄
@conradhale I can pick this up! (if you don't mind :)
I would like the configuration to be renamed. Correspond as follows:
- (Legacy -> Flat)
- essential -> flat/vue2-essential
- strongly-recommended -> flat/vue2-strongly-recommended
- recommended -> flat/vue2-recommended
- vue3-essential -> flat/essential
- vue3-strongly-recommended -> flat/strongly-recommended
- vue3-recommended -> flat/recommended https://github.com/vuejs/eslint-plugin-vue/pull/2319/files#r1465649137
We also need test code to test the flat configuration.