threat-dragon
threat-dragon copied to clipboard
Formatting Guidelines for Contributors
Describe what problem your feature request solves Every developer has their own set of configs for tab sizes, indentations, linters, etc. This makes reviewing a PR difficult as well as makes the code formatting non-uniform across the project.
Describe the solution you'd like Threat Dragon should have generalised standards that our project throughout its file follows. This reduces the time to address formatting changes and improves code readability also!
Open to discussion for the above-discussed standards. Once we agree on something, one can open a PR that implements the configs and sets up the entire project with those linting changes and uniformity.
Just leaving some notes:
Off the top of my head (I will try to remember to check later today) - We have eslint configured for both td.vue and td.server, with different linting rules. Ideally, it'd be great to have a single source of truth. Both linters are configured to run with the --fix
argument which should be able to handle simple formatting issues.
Another tool at our disposal is using a .gitattributes file to specify line endings, and I think can manage tabs v spaces as well.
Thought about adopting JavaScript Standard Style, but it is a bit too brutal for us - mainly the dropping of (strictly) unnecessary semi-colons ... but these aid readability for people like me who are not out-and-out javascript developers
I have used standard
to provide some suggestions to clean up our src trees but kept eslint