Skip to content
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

Codestyle and linter #337

Closed
jankapunkt opened this issue May 30, 2021 · 10 comments · Fixed by #382
Closed

Codestyle and linter #337

jankapunkt opened this issue May 30, 2021 · 10 comments · Fixed by #382
Labels
confirmed We want to fix or implement it contributions welcome good-first-issue Good first issue or something that should is nice to do.

Comments

@jankapunkt
Copy link
Collaborator

Can we decide for further development for a codestyle and respective linter(-confuguration)?

@StorytellerCZ StorytellerCZ added confirmed We want to fix or implement it needs feedback labels May 30, 2021
@StorytellerCZ
Copy link
Collaborator

I'm thinking something along the lines of standardx with special addition for Meteor and related.

@jankapunkt
Copy link
Collaborator Author

I agree, it's easy to configure and works very well with Meteor and using --fix it is close to prettier's autofixing.

@distalx
Copy link
Contributor

distalx commented May 30, 2021

In one of my projects, We lost a significant amount of historical meta-data when we introduce a prettier & linter at the later stage.

It becomes impossible to figure out that why something is implemented the way it is or how some code is related to which PR/Issue.

So I think if we use any auto formating tool we would lose the historical meta-data.

@jankapunkt
Copy link
Collaborator Author

@distalx I think standardx is not so "hard" in reformatting code like prettier. It often rather throws and only auto formats trivial cases like semicolon, newlines etc.

However, I think this is a valid argument and I'd like to hear more on this.

@filipenevola
Copy link
Collaborator

Maybe we should revisit the standards and configurations here https://github.com/meteor/eslint-config-meteor and apply in all our repos.

I have a version of this eslint config that I use in all my projects and it works really well https://github.com/quavedev/eslint-config

We don't need to apply all at once but we can apply when we make changes to specific parts of files.

What do you think?

@distalx
Copy link
Contributor

distalx commented Jun 3, 2021

Gradual adoption would work well when we are adding new files to the repo.

But if someone is making a change to an existing file that would give them a linter-warning if the previously written code is not following the standard that we are going to adopt. And those warnings could become really annoying and someone might reformate those parts as well.

I do believe that having a linter or standard code style setup improves the development experience significantly. We should use a tool or plugin that makes less fuss about the existing code.

And before we go with any solution we should tag the existing version.

@jankapunkt
Copy link
Collaborator Author

I think the adoption should then be started per package for those packages, where no related issues/PRs are in progress or planned. By doing so we ensure the linter will not interfer with current development but also start to adopt already where applicable, right?

@jankapunkt
Copy link
Collaborator Author

@filipenevola @distalx I'd like to bump this issue so do I get it right, that we will now use @quave/eslint-config-quave ?

@filipenevola
Copy link
Collaborator

We can use the quave package or update the meteor one, either option work.

@jankapunkt
Copy link
Collaborator Author

As already discussed in #367 we will stick with the @quave config as the main Meteor repo also does

@jankapunkt jankapunkt added contributions welcome good-first-issue Good first issue or something that should is nice to do. and removed needs feedback labels Jul 22, 2022
@jankapunkt jankapunkt mentioned this issue Jul 24, 2022
@jankapunkt jankapunkt linked a pull request Jul 24, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed We want to fix or implement it contributions welcome good-first-issue Good first issue or something that should is nice to do.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants