Comments (7)
first reply for everywhere :)
from ed-209.
I vote for :
bot.addListener = addListener
function addListener(name, listener) {
this.listeners[name] = listener
}
as it allows easy calling to references locked in closures more securely, without having to rely on the fact that it is still present in the object.
// Imports
var irc = require('irc')
, fs = require('fs')
, path = require('path')
, util = require('util')
, bot = require('./bot.js')
, config, client, botInstance, i, l
as aligning variable names seems clearer to me than what they represent (and prevents a lot from forgetting a comma, which happened a few times in the code).
if(url.search(/photo/) > 0){
// …
} else if(url.search(/status/) > 0){
// …
}
because fuck.
and
$tweet = $(".opened-tweet").find(".js-tweet-text").first()
for the same reason.
from ed-209.
What about semicolons? We have to agree on it.
I vote for:
Method declaration: see @mlbli.
Variable initialization: see @mlbli , even if I don't like left colons. Maybe we could make it aligned with equal sign.
Spacing: see @mlbli +
response.on("data", function(chunk) {
dom += chunk
})
But,
no space between function
and (chunk)
?
Quotes : 'simple quotes'
.
from ed-209.
Just let semicolons where they belong
from ed-209.
Y'a pas déjà des codings standards "généraux" ? Genre des trucs réutilisables et intégrable dans les IDE, rédigé par des crews de rockstars ?
J'avais ça avant, dans ECLIPSE \o/
from ed-209.
1_, 1, 2_, 1*, 1
*: I prefer spaces after keywords before opening parentheses (function (
, if (
)
Also, "else if" on its own line is an heresy.
from ed-209.
idgaf
from ed-209.
Related Issues (20)
- Create a config.json maker in the command line
- Add auto kick+ban when "ovh" is used in a room HOT 1
- Change how we load plugins HOT 10
- Document all the things HOT 1
- Do not rely on make HOT 1
- Bug on youtube listener
- Add alert again HOT 3
- Check what can be grabbed from github/hubot HOT 1
- Rename the project HOT 10
- Doc not found HOT 1
- Add auto-log option
- Fix url on tweet listener
- remove laugh listener HOT 1
- Bug sur https://twitter.com/search?q=%22chapeau%20de%20roux%22
- Change make by npm scripts.
- new version HOT 14
- WIP ~ caniusev2 ~ need ideas HOT 2
- Transfer this repo out of putaindecode? HOT 6
- [2016 rework] npm install fail with node 6 HOT 1
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 ed-209.