Ember / JavaScript Code Standards
Click here for Standards
Click here for Django / Python Code Standards
Click here for Documentation
Click here for HTML Code Standards
Click here for Security Standards - Development
Click here for Sys-Admin and Configuration Management
Click here for Technology Standards
Click here for UI Standards
Classes
Order of attributes in a class:
services
model
# alphabetical
Handlebars
Tim is using the following Atom plugin: https://github.com/kandhavivekraj/beautify-handlebars
Tip
You have to manually remove /
from <hr/>
.
Prettier
Using front/prettier.config.js
:
module.exports = {
trailingComma: "none",
tabWidth: 2,
semi: false,
singleQuote: false,
bracketSpacing: true,
arrowParens: "avoid",
printWidth: 80
}
npm run prettier
npm run prettier:hbs
var
, let
or const
Tip
Prefer const
wherever possible only using let
when a value
must change. Avoid var
unless absolutely necessary.
Chris Thoburn, @not_runspired
I’ve been on team prefer-const since the beginning and it’s been a joy watching that go from niche to widely accepted/linted norm. I suspect (and this is imo wild) that it was typescript that finally got everyone to realize how much value there is in the mental model of it.
Tomasz Ducin, @tomasz_ducin
Shall we use var, let or const in #javascript/#typescript? My take has been the same for years (since ES2015 released). And it turns out I have the same coding standards as #angular 🙃
https://twitter.com/not_runspired/status/1728933270522634298