RepoSense icon indicating copy to clipboard operation
RepoSense copied to clipboard

Enforce Vue option order

Open fzdy1914 opened this issue 5 years ago • 2 comments

As pointed out by @jamessspanggg , it is better to follow the option order style recommended by Vue in our JS file, which may increase the readability of the code a lot.

See https://vuejs.org/v2/style-guide/index.html#Component-instance-options-order-recommended for more details.

fzdy1914 avatar Dec 14 '19 15:12 fzdy1914

We could enforce this using the ESLint Vue plugin. The 'order-in-components' rule does exactly this; there are also several other rules which could be worthwhile for us to include.

If we do so, we should probably update the DG as well, as it currently does not reference any style guide for Vue.

vig42 avatar Aug 28 '20 15:08 vig42

Just want to add that the ESLint Vue plugin is already part of the project, and this particular rule can immediately be enforced just by removing this line:

https://github.com/reposense/RepoSense/blob/ed131f6294bf83fac436a6265bc4d53b022739f7/frontend/.eslintrc.json#L12

gerhean avatar Feb 13 '22 17:02 gerhean

Hi, can I try to take this issue? Thanks!

vvidday avatar Jan 13 '23 13:01 vvidday