Closed dweipert-3138720606 closed 1 year ago
Maybe go with this one?
They suggest to use their base config here if you don't need the React stuff https://www.npmjs.com/package/eslint-config-airbnb-base
We can lint the template files as well but before we can do that we have to do the switch from jade to pug, because jade and everything regarding it is actually deprecated since 2016. https://pugjs.org/api/migration-v2.html
// EDIT: Just found this: https://www.npmjs.com/package/eslint-plugin-meteor Oh and in the official documentation they mention it as well! https://guide.meteor.com/code-style.html#eslint-installing
No problem switching over to a pug compiler if there's an easy way to do it.
As for the Jade package being used, it is Jade by name but it is using the pug syntax referenced in the link:
So switching over to a pug compiler wouldn't require much refactoring of the UI, depending on the compiler. Just a question of availability. There were no maintained pug compilers for Meteor (or even any with visible users), and I'm not sure how much effort it takes to roll your own. However the Meteor-Jade package had a visible user base, which suggested it was stable enough for basic usage.
As an alternative, we could just choose not to run the jade files through a linter. Jade/Pug already has a lot of requirements as far as structure goes (mandatory indentation, can't use tabs and spaces in the same file, etc); In that regard it kind has its own built-in linting. It won't compile successfully unless it's following a specific structure.
Oh okay, thanks for the clarification. Then I'd say we ditch the Jade linting.
I tried different recommended eslint rule configs and so far the eslint-plugin-meteor
recommendation with
"extends": ["eslint:recommended", "plugin:meteor/recommended"]
seems to be the the one that causes the least disruption to the current code base haha
Nice. Would you be willing to submit a pull request for us to $ meteor npm install
and try out?
That way we'll make you a member of the GitHub organization, too, if you want, =D
Yes of course, the Pull Request is in process, I'll refine and push it as soon as I find the time!
I wouldn't say no to being a member. =D
I sent the invite.
Daniel, please make your membership public from here https://github.com/orgs/For-Science/people (or a tutorial here if you don't find the button https://help.github.com/articles/publicizing-or-hiding-organization-membership/). Otherwise, you won't show up for others in the People tab.
With increasing contributors comes an increasing number of different ways to write code ofc. So it'd probably be best to use something like eslint to keep the coding style consistent and to make it easier to do so.
We can either just use one of the reccommended/more popular rule-sets or reflect the project's current style with custom rules. What would you prefer?