GithubHelp home page GithubHelp logo

Comments (7)

MoOx avatar MoOx commented on May 12, 2024

first reply for everywhere :)

from ed-209.

bloodyowl avatar bloodyowl commented on May 12, 2024

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.

rhannequin avatar rhannequin commented on May 12, 2024

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.

bloodyowl avatar bloodyowl commented on May 12, 2024

Just let semicolons where they belong

from ed-209.

MoOx avatar MoOx commented on May 12, 2024

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.

madx avatar madx commented on May 12, 2024

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.

Nyalab avatar Nyalab commented on May 12, 2024

idgaf

from ed-209.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.