rrd108 / vue-mess-detector

A static code analysis tool for detecting code smells and best practice violations in Vue.js and Nuxt.js projects
MIT License
112 stars 5 forks source link

componentFilenameCasing pages and layout for windows directory separator #56

Closed rrd108 closed 3 weeks ago

David-Pena commented 1 month ago

Hi @rrd108

This issue is about the componentFilenameCasing shouldnt report error if the page / component is checking is index.vue?

rrd108 commented 1 month ago

nuxt recommends kebab-case file names and not PascalCase like vue components.

So in this rule we have to detect if the project is nuxt or vue and report accordingly.

David-Pena commented 1 month ago

I'm wondering if the way to check if its a nuxt project would be by checking if there is a nuxt.config?

rrd108 commented 1 month ago

Yep, I would do that.

rrd108 commented 3 weeks ago

componentFilenameCasing already skip pages and layouts folders.

I can't remember where this issue came, but I guess it is not valid anymore.

David-Pena commented 3 weeks ago

Hi @rrd108 , just in case, this issue appeared in my original discussion post, where I had a file index.vue and it reported that error and its because the method is handling regex for pascalCase and kebab-case but not checking when to use each one

Discussion post: https://github.com/rrd108/vue-mess-detector/discussions/53 image

Or maybe I understood it wrong since the beginning (my index.vue was inside pages but because I use it as my router, each folder inside is a route)

rrd108 commented 3 weeks ago

Can you plese check if the analyzer still report this file?

David-Pena commented 3 weeks ago

On it, give me a sec

David-Pena commented 3 weeks ago

Yes, its still reported: image

rrd108 commented 3 weeks ago

Ok. I will add a failing test and a fix next week.

This weekend is our biggest tourist event, so I will not be around any code.