Comments (3)
We've decided that multi-line comment format, i.e.
/*
*
*/
is reserved for documentation outside of functions/code.
//
will be used for single line comments only, such as in-line documentation with code.
All comments should use sentence case (i.e. start with a capital), but only multi-line comments should include periods. Single line comments should not end with a period.
Multi-line example
/**
* Retrieve the favicon path.
*
* @return {String} The absolute or relative path from the site origin to the favicon.
*/
Single line example
// Default favicon path is at the root of the origin
from akita.
We've decided that early returns in functions are preferred over returning once at the end of a function, i.e.
✅ PREFERRED:
function example(input) {
if (input !== null) {
return true;
}
return false;
}
❌ NOT-PREFERRED:
function example(input) {
const result = false;
if (input !== null) {
result = true;
}
return result;
}
Justification: early returns make it easier to understand a code-path of a function without having to read the entire function. They also make it so that you do not have to think about and keep track of function-scoped variables while reading the function.
Note that there are cases where it could be better to not early return, for example if you have to cleanup resources before returning, it may be better to have that cleanup code once at the end of the function before you return.
from akita.
It would be good to have html style opinions. The formatting is quite strange and not especially readable right now. (Sharon thinks so too).
from akita.
Related Issues (20)
- Add call-to-action in extension popup for user feedback HOT 1
- Update installation instructions to include Edge and add install links to README HOT 1
- Include akitaproject.site in README and extension popup HOT 1
- Do extensive testing on all supported browsers HOT 3
- Top site detail overlaps with top site circles
- Update README and InstallAkita with Firefox extension links HOT 2
- Clicking on a link in the tutorial loses your spot in the tutorial
- Include a link to the WM Community Forem in the extension HOT 1
- [BUG] Top Site Detail shows "undefined" after visiting a site for a very short period of time HOT 4
- [BUG] Extension icon not showing monetized state on Twitch.tv, YouTube HOT 5
- Popup does not dismiss when clicking on survey link in feedback popup on Firefox
- [BUG] Sites with monetized iframes don't count as monetized on Chrome HOT 3
- Test monetization detection on single page applications HOT 1
- [BUG] Fetch requests against Gatehub ILP addresses fails on Chromium HOT 3
- Update akita screenshots for release HOT 1
- Support WM via link (rel=monetization)
- [BUG] Favicons don't show up for newly visited sites
- Test on Firefox, Chrome/Brave, Edge HOT 3
- Re-film Akita YouTube demo video
- Develop Akita for Safari
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akita.