FloKaemmerer / dynamic-atlas

Searchable Path of Exile Atlas
MIT License
2 stars 1 forks source link

dev: linter/formatter #41

Closed Blemming closed 1 year ago

Blemming commented 1 year ago

Do you use a linter or a formatter to format your project ? I really like Antfu's preset combined with eslint vscode extension.

Maybe add a .vscode with extension recommendations

FloKaemmerer commented 1 year ago

I'm using the default formatter/linter that is shipped with intellij ultimate. (Since I'm a java backend developer, I felt more at home in that ide then vscode).

Is there a preset for intellij that has the same result as the one for vscode? Feel free to at any preset you deem useful.

Blemming commented 1 year ago

There are multiple options for us to sync our formatters, the only option that doesn't work is default intellij formatter since there is no way for me to replicate it in vscode or any other contributor that uses vscode. ( Unless you find out how let me know )

1. Use prettier in intellij

Prettier is a bit opionated and very rigid. And kinda hard to make it play well with eslint, so if you choose this option removing eslint will have to be considered.

2. Use eslint plugin in intellij

ESlint is waaaay more flexible almost too much, the eslint configs you have installed are the basic ones for vue and offer no strict formatting rules just general vue recommendations which is why if you choose to go this option I'd recommend using Antfu's preset ( Antfu is a vue core team developer ) it's a very good default and includes all of vue presets so you can uninstall all vue's configs and juste keep antfu's preset as a dependency.

Other eslint options is using the vue3-recommended plugin instead of just the essential one but it is missing some stuff that atnfu has covered in his preset. There is also the vue hardcore plugin which I am guessing is along the lines of the antfu's but different style.

3. Github actions

Another more complicated option would be let everyone use the formatters they want and then in a github action lint the code a particular way when it is merged into main. I cannot help with this method tho since I have no experience with it, but an option nonetheless.

I suggest you try the different options see what you like best then I could setup a .vscode with the appropriate extension recommendations.

FloKaemmerer commented 1 year ago

The second option with antfu's preset sounds good to me.

The current configs came with the default vue3 setup which I used to start the project, so feel free to replace them.

I'll get the plugin for intellij than.

Blemming commented 1 year ago

42 Should take care of it :)