Giter VIP home page Giter VIP logo

coding-standards's People

Contributors

aju avatar alexbirkett avatar androa avatar audungk avatar cybuhh avatar kbrabrand avatar lukaszblachastp avatar mdrobny avatar nilzor avatar nonemoticoner avatar noodny avatar olekenneth avatar rexxars avatar sgulseth avatar voldern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coding-standards's Issues

[JavaScript] Consistent return not working?

In our .eslintrc there is a rule "consistent-return": 2.
http://eslint.org/docs/rules/consistent-return.html

Do have any idea what this kind of code works in our project? :

.catch(err => {
    if (err instanceof NotFoundError) {
        return reply(Boom.notFound(err.message));
    }
    reply(err);
});

Here is more important question: why after upgrading to eslint 2.1.0 it is an error and only changing it to this will work:

.catch(err => {
    if (err instanceof NotFoundError) {
        reply(Boom.notFound(err.message));
        return;
    }
    reply(err);
});

The only thing I found in Eslint changelog (https://github.com/eslint/eslint/blob/master/CHANGELOG.md) is:
Fix: consistent-return checks the last (refs #3530, fixes #3373) for v2.0.0-alpha-1 - December 11, 2015

[JavaScript] Update to support ESLint 2.0.0

Update the project to make it support the latest version of ESLint.

ESLint should also probably be added to peerDependencies to make sure it verifies to some extent that it gets the correct version.

JavaScript - Variable declaration

Could you update Variable declaration section in https://github.com/vgno/coding-standards/tree/master/javascript#variable-declaration?

First of all you read as close as possible to the place where it's first used., on a new line and then var object = {}, key;. Doesn't make any sense, does it?

To make it faster you can copy recently updated text from: https://github.com/yandex/codestyle/blob/master/javascript.md#variable-declaration ;)

I wanted to send a PR but somehow I don't have permission.

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.