JithinKS97 / dynamic-learning

A platform where teachers collaborate with creative coders to make STEM lessons that make use of interactive visualisations
https://dynamic-learning.herokuapp.com/
GNU Lesser General Public License v2.1
31 stars 23 forks source link

Making the code base more structured #17

Open JithinKS97 opened 5 years ago

JithinKS97 commented 5 years ago

To make the code base more structured using linting tools like eslint, prettier by following popular style guides like Airbnb or Google?

nickmcintyre commented 5 years ago

I'm still coming up to speed with Meteor+React but think I could helpful here. Here's a possible set of tooling that could get the job done:

JithinKS97 commented 5 years ago

I think this would also help https://guide.meteor.com/code-style.html

JithinKS97 commented 5 years ago

Is it required that we follow all the linting rules associated with airbnb standard as it is? Or should we reconfigure it suitably for our need? Because I tried fixing linting errors in a file and it was really difficult to keep up with all the rules. Also when it comes to large files, it will be way more difficult.

nickmcintyre commented 5 years ago

We can modify the rules as needed. I selectively disabled several throughout the first batch when I got the impression real refactoring was needed; we should revisit those instances sooner than later.

I'm in favor of paying the cost now and staying on top of style moving forward. Are you using an ESLint plugin in your text editor or the CLI? The Atom packages make linting relatively painless.

JithinKS97 commented 5 years ago

I use Visual studio code with ESLint plugin

JithinKS97 commented 5 years ago

I've finished linting of all the components in the Components folder. I have added propTypes in the components which I think will make the components more structured and organized. Also I have added certain rule exceptions in eslintrc.json.