vgno / coding-standards Goto Github PK
View Code? Open in Web Editor NEWA repository collecting Coding Standards, lint-configs and other related coding standards related resources.
License: MIT License
A repository collecting Coding Standards, lint-configs and other related coding standards related resources.
License: MIT License
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.
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
We have https://github.com/vgno/coding-standards/blob/master/javascript/README.md#const-keyword in place now.
Should we not allow the const keyword?
IMHO we should allow more ES6 features now on a general basis. Maybe a separate issue?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.