{"id":189872,"date":"2013-08-15T21:35:03","date_gmt":"2013-08-15T17:35:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=189872"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=189872","title":{"rendered":"<span class=\"post_title\">\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>JavaScript, the winning style<\/h4>\n<p>  <img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/235\/4c5\/8cc\/2354c58cc3d2d65d765241b41606f2e4.png\"\/><br \/>  \u041a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435, \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432: \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u043b\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u043c\u043d\u043e\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043b\u0435\u0433\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0441\u0440\u0430\u0437\u0443, \u0434\u0440\u0443\u0433\u0438\u0435 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u0435\u0449\u0435 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041d\u043e\u0432\u044b\u043c \u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 (\u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u0438\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043b\u0438\u0448\u044c \u0447\u0442\u043e \u0435\u0433\u043e \u043b\u0435\u0433\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c) \u0438 \u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u0432\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u0432\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f. \u042d\u0442\u043e \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u0440\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u044b\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b. <\/p>\n<p>  \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u041f\u0438\u0442\u043e\u043d\u0430 \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u0432\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b <a href=\"http:\/\/www.python.org\/dev\/peps\/pep-0008\/\">\u00abStyle Guide for Python Code\u00bb<\/a>, \u0443 \u044f\u0437\u044b\u043a\u0430 JavaScript \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u044b\u0445 6 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0433\u0430\u0439\u0434\u043e\u0432: <\/p>\n<ul>\n<li><a href=\"http:\/\/google-styleguide.googlecode.com\/svn\/trunk\/javascriptguide.xml\">Google JavaScript Style Guide<\/a> <\/li>\n<li><a href=\"https:\/\/npmjs.org\/doc\/coding-style.html\">npm\u2019s coding style<\/a><\/li>\n<li><a href=\"http:\/\/nodeguide.com\/style.html\">Felix\u2019s Node.js Style Guide<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/rwaldron\/idiomatic.js\/\">Idiomatic JavaScript<\/a><\/li>\n<li><a href=\"http:\/\/contribute.jquery.org\/style-guide\/js\/\">jQuery JavaScript Style Guide<\/a><\/li>\n<li><a href=\"http:\/\/javascript.crockford.com\/code.html\">Douglas Crockford\u2019s JavaScript coding style<\/a><\/li>\n<\/ul>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u0433\u0430\u0439\u0434\u043e\u0432, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445 \u043a\u043e\u0434\u0430, \u0442\u0430\u043a\u0438\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a JSLint \u0438 JSHint. \u0418 \u0432 \u043d\u0438\u0445 \u0443\u0436\u0435 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u044b \u0441\u0432\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<b> \u0412\u043e\u043f\u0440\u043e\u0441 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 JavaScript, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0431\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439?<\/b> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430. <br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  <\/p>\n<h5>\u041e\u0442\u0441\u0442\u0443\u043f<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>2 \u043f\u0440\u043e\u0431\u0435\u043b\u0430, \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438 \u0431\u0435\u0437 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438: Google, npm, Node.js, Idiomatic<\/b><\/li>\n<li>\u0422\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044f: jQuery<\/li>\n<li>4 \u043f\u0440\u043e\u0431\u0435\u043b\u0430: Crockford<\/li>\n<\/ul>\n<h5>\u041f\u0440\u043e\u0431\u0435\u043b \u043c\u0435\u0436\u0434\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u0411\u0435\u0437 \u043f\u0440\u043e\u0431\u0435\u043b\u0430, \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435: Google, npm, Node.js<\/b>\n<pre><code class=\"javascript\">project.MyClass = function(arg1, arg2) { <\/code><\/pre>\n<p>  <\/li>\n<li>\u0421 \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u043c, \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435: Idiomatic, jQuery\n<pre><code class=\"javascript\">for ( i = 0; i &lt; length; i++ ) { <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: Crockford<\/li>\n<\/ul>\n<p>  \u041c\u043d\u043e\u0433\u0438\u0435 \u0433\u0430\u0439\u0434\u044b \u0442\u0430\u043a \u0436\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0442, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a (trailing spaces)<\/p>\n<h5>\u0414\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u041c\u0430\u043a\u0441\u0438\u043c\u0443\u043c 80 \u0437\u043d\u0430\u043a\u043e\u0432: Google, npm, Node.js, Crockford<\/b>\n<p>  \u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0435 \u0441\u0442\u0440\u043e\u043a, \u043e\u0442\u0441\u0442\u0443\u043f \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u0435\u043d 2, \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0430\u0434\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0442\u043e \u0432\u044b\u0440\u043e\u0432\u043d\u044f\u0442\u044c \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0442\u043e\u043c\u0443 \u043c\u0435\u0441\u0442\u0435 \u0433\u0434\u0435 \u0441\u0442\u043e\u0438\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442. \u041a\u0430\u043a \u0434\u0440\u0443\u0433\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 4 \u043f\u0440\u043e\u0431\u0435\u043b\u0430 \u0432\u043c\u0435\u0441\u0442\u043e 2, \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0438\u0442\u0435 \u0434\u043b\u0438\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. <\/p>\n<\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: jQuery, Idiomatic<\/li>\n<\/ul>\n<h5>\u0422\u043e\u0447\u043a\u0430 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0443 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439: Google, Node.js, Crockford<\/b><\/li>\n<li>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445: npm<\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: jQuery, Idiomatic<\/li>\n<\/ul>\n<h5>\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438: <\/h5>\n<p>  <\/p>\n<ul>\n<li><b>JSDoc<\/b>: Google, Idiomatic<\/li>\n<li>\u0412 Idiomatic Style Guide \u0442\u0430\u043a \u0436\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u044b \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043d\u043e JSDoc \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435<\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: npm, Node.js, jQuery, Crockford<\/li>\n<\/ul>\n<h5>\u041a\u0430\u0432\u044b\u0447\u043a\u0438<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u043e\u0434\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438. \u041b\u0443\u0447\u0448\u0435 <code>'value'<\/code>, \u0447\u0435\u043c <code>&quot;value&quot;:<\/code> Google, Node.js<\/b><\/li>\n<li>\u0414\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438 &quot;: jQuery<\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: npm, Idiomatic, Crockford<\/li>\n<\/ul>\n<h5>\u0414\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 <\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u041e\u0434\u043d\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435: Node.js<\/b>\n<pre><code class=\"javascript\">var foo = ''; var bar = ''; <\/code><\/pre>\n<p>  <\/li>\n<li> \u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u043c\u044b\u0435 \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438 \u0432 \u043a\u043e\u043d\u0446\u0435 \u0441\u0442\u0440\u043e\u043a\u0438, \u043a\u0430\u043a \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435: Idiomatic, jQuery\n<pre><code class=\"javascript\">var foo = &quot;&quot;,    bar = &quot;&quot;,    quux; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0417\u0430\u043f\u044f\u0442\u0430\u044f \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438: npm\n<pre><code class=\"javascript\">var foo = &quot;&quot;   , bar = &quot;&quot;   , quux; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: Google, Crockford<\/li>\n<\/ul>\n<h5>\u0421\u043a\u043e\u0431\u043a\u0438<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u0421\u0442\u0430\u0432\u044c\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0443\u044e \u0441\u043a\u043e\u0431\u043a\u0438 \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u043e\u043a\u0435: Google, npm, Node, Idiomatic, jQuery, Crockford<\/b>\n<pre><code class=\"java\">function thisIsBlock() { <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0441\u043a\u043e\u0431\u043a\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435\u0433\u0434\u0430, \u0434\u0430\u0436\u0435 \u0432 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0433\u0434\u0435 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c.<\/p>\n<\/li>\n<li>\u0412 npm \u0433\u0430\u0439\u0434\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u0441\u043a\u043e\u0431\u043a\u0438 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0442\u0435\u043b\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443.\n<pre><code class=\"javascript\">if (foo) bar() while (foo) {   bar() } <\/code><\/pre>\n<\/li>\n<\/ul>\n<h5>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u041d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435: Google, Crockford<\/b>\n<p>  <i>Google: <\/i>   <\/p>\n<blockquote><p>Global name conflicts are difficult to debug, and can cause intractable problems when two projects try to integrate. In order to make it possible to share common JavaScript code, we\u2019ve adopted conventions to prevent collisions.<\/p><\/blockquote>\n<p>   <i>\u041f\u0435\u0440\u0435\u0432\u043e\u0434:<\/i>  <\/p>\n<blockquote><p> \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c, \u0438 \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442 \u0441\u0442\u0430\u0442\u044c \u043f\u0440\u0438\u0447\u0438\u043d\u044b\u0439 \u043d\u0435\u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u0434\u0432\u0443\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c \u043d\u0430\u0434\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0414\u0430 \u0431\u044b \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432\u0435\u0441\u044c \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 JavaScript, \u043c\u044b \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0441\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0440\u0435\u0447\u0438\u044f.    <\/p><\/blockquote>\n<\/li>\n<li>Crockford \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043e\u0432\u0441\u0435.<\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: Idiomatic, jQuery, npm, Node<\/li>\n<\/ul>\n<h4>\u0418\u043c\u0435\u043d\u0430<\/h4>\n<h5>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u041f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0431\u0443\u043a\u0432\u044b, \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439: Google, npm, Node, Idiomatic<\/b>\n<pre><code class=\"javascript\">var foo = &quot;&quot;; var fooName = &quot;&quot;; <\/code><\/pre>\n<\/li>\n<\/ul>\n<h5>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b<\/h5>\n<ul>\n<li><b>\u0412\u0441\u0435 \u0441\u043b\u043e\u0432\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438: Google, npm, Node<\/b>\n<pre><code class=\"javascript\">var CONS = 'VALUE'; var CONSTANT_NAME = 'VALUE'; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: jQuery, Idiomatic, Crockford<\/li>\n<\/ul>\n<h5>\u0424\u0443\u043d\u043a\u0446\u0438\u0438<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u041f\u0435\u0440\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u0441 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0439 \u0431\u0443\u043a\u0432\u044b, \u0432\u0441\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 (camelCaps): Google, npm, Node, Idiomatic <\/b>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0438\u0442\u0435\u043b\u044c\u043d\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u043e\u0435 \u0438\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<pre><code class=\"javascript\">function veryLongOperationName function short().. <\/code><\/pre>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u044b\u0439\u0442\u0435 \u0441\u043b\u043e\u0432\u0430 is, set, get:<\/p>\n<pre><code class=\"javascript\">function isReady() function setName() function getName() <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: jQuery, Crockford <\/li>\n<\/ul>\n<h5>\u041c\u0430\u0441\u0441\u0438\u0432\u044b<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0444\u043e\u0440\u043c\u0443 \u0441\u043b\u043e\u0432\u0430: Idiomatic<\/b>\n<pre><code class=\"javascript\"> var documents = []; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f:Google, jQuery, npm, Node, Crockford <\/li>\n<\/ul>\n<h5>\u041e\u0431\u044a\u0435\u0442\u044b \u0438 \u043a\u043b\u0430\u0441\u0441\u044b<\/h5>\n<p>  <\/p>\n<ul>\n<li><b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435: Google, npm, Node<\/b>\n<pre><code class=\"javascript\">var thisIsObject = new Date; <\/code><\/pre>\n<p>  <\/li>\n<li>\u0411\u0435\u0437 \u043e\u0441\u043e\u0431\u043e\u0433\u043e \u043c\u043d\u0435\u043d\u0438\u044f: jQuery, Idiomatic, Crockford <\/li>\n<\/ul>\n<h5>\u0414\u0440\u0443\u0433\u043e\u0435<\/h5>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 all-lower-hyphen-css-case \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a: npm<\/p>\n<h4>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 JSHint \u0438 .jshintrc \u0444\u0430\u0439\u043b<\/h4>\n<p>  JSHint \u2014 \u044d\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c \u043d\u0430 \u043e\u0448\u0438\u0431\u043a\u0438 \u0432 \u043a\u043e\u0434\u0435. \u041e\u043d \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0448\u0438\u0440\u043e\u043a\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u043c\u0438. \u0422\u0430\u043a \u0436\u0435 \u044d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0442\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u043e \u0438 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0434\u0430. \u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 <a href=\"http:\/\/www.jshint.com\/docs\/#options\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>. \u041d\u0438\u0436\u0435 \u043d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440 .jshintrc \u0444\u0430\u0439\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0441\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u043c \u0432\u044b\u0448\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c. \u041f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0430 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0438 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d JSHint \u043f\u043b\u0430\u0433\u0438\u043d, \u0442\u043e \u0432\u0430\u0448 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u043a\u043e\u0434 \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438.<\/p>\n<pre><code class=\"javascript\">{   &quot;camelcase&quot; : true,   &quot;indent&quot;: 2,   &quot;undef&quot;: true,   &quot;quotmark&quot;: &quot;single&quot;,   &quot;maxlen&quot;: 80,   &quot;trailing&quot;: true,   &quot;curly&quot;: true } <\/code><\/pre>\n<p>  \u0412\u043e \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code class=\"javascript\">\/* jshint browser:true, jquery:true *\/ <\/code><\/pre>\n<p>  \u0412 \u0444\u0430\u0439\u043b\u044b Node.js \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c:<\/p>\n<pre><code class=\"javascript\">\/*jshint node:true *\/ <\/code><\/pre>\n<p>  \u0412\u043e \u0432\u0441\u0435 \u0442\u0438\u043f\u044b JS \u0444\u0430\u0439\u043b\u043e\u0432, \u0442\u0430\u043a \u0436\u0435 \u043b\u0443\u0447\u0448\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<pre><code class=\"javascript\">'use strict'; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043f\u043e\u0432\u043b\u0438\u044f\u0435\u0442 \u0438 \u043d\u0430 JSHint \u0438 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 JavaScript \u0432 \u0446\u0435\u043b\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043d\u0435\u0442 \u043c\u0435\u043d\u0435\u0435 \u0442\u0435\u0440\u043f\u0438\u043c\u044b\u043c \u043a \u043e\u0448\u0438\u0431\u043a\u0430\u043c, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u0435\u0435. <a href=\"http:\/\/learn.javascript.ru\/strict-mode\">\u041f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e &#8216;use strict&#8217;<\/a> (\u0432\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0441\u044b\u043b\u043a\u0430)<\/p>\n<h4>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u0434\u0430 JSHint \u043f\u0435\u0440\u0435\u0434 git commit<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0431\u044b\u0442\u044c \u0443\u0432\u0435\u0440\u0435\u043d\u044b \u0432 \u0442\u043e\u043c \u0447\u0442\u043e \u0432\u0441\u0435 \u0432\u0430\u0448\u0438 JS \u0444\u0430\u0439\u043b\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043e\u0431\u0449\u0435\u043c\u0443 \u0441\u0442\u0438\u043b\u044e, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432 .jshintrc. \u0422\u043e \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u0432\u0430\u0448 <b>.git\/hooks\/pre-commit<\/b> \u0444\u0430\u0439\u043b. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0437\u0430\u043a\u043e\u043c\u0438\u0442\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u043d\u0430 \u043d\u0430\u0440\u0443\u0448\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u0438\u0441\u0442\u0438\u043a\u0438 \u043a\u043e\u0434\u0430. \u0418 \u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u043e\u0432\u044b\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f, \u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0440\u0432\u0430\u043d\u0430. <\/p>\n<pre><code class=\"bash\">#!\/bin\/bash # Pre-commit Git hook to run JSHint on JavaScript files. # # If you absolutely must commit without testing, # use: git commit --no-verify  filenames=($(git diff --cached --name-only HEAD))  which jshint &&gt; \/dev\/null if [ $? -ne 0 ]; then   echo &quot;error: jshint not found&quot;   echo &quot;install with: sudo npm install -g jshint&quot;   exit 1 fi  for i in &quot;${filenames[@]}&quot; do \tif [[ $i =~ \\.js$ ]]; \tthen \t\techo jshint $i \t\tjshint $i \t\tif [ $? -ne 0 ]; \t\tthen \t\t\texit 1 \t\tfi \tfi done <\/code><\/pre>\n<p>  ps.<br \/>  \u041f\u043e \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432\u0448\u0438\u0445 (\u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e), \u0431\u044b\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0430 <a href=\"https:\/\/github.com\/Seravo\/js-winning-style\">Git \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/a> \u043b\u044e\u0431\u043e\u0439 \u0436\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u0441\u0432\u043e\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 .jshintrc \u0438\u043b\u0438 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e.<\/p>\n<p>  <i>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430:<br \/>  \u042f \u0437\u043d\u0430\u044e \u043b\u0438\u0447\u043d\u043e \u0430\u0432\u0442\u043e\u0440\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0434\u043e\u0431\u0440\u043e \u043d\u0430 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435. \u041e\u0431 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0445 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044f\u0445 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0438\u043b\u0438 \u043e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u043e\u0448\u0443 \u0441\u043e\u043e\u0431\u0449\u0438\u0442\u044c \u043c\u043d\u0435, \u043b\u044e\u0431\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u043c \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u0438\u0441\u043a\u0443\u0441\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434, \u043d\u043e \u044f \u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f, \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u043a\u0442\u043e \u0434\u043e\u0447\u0438\u0442\u0430\u043b \u0432\u0441\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430. <\/p>\n<p>  \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: <a href=\"http:\/\/seravo.fi\/2013\/javascript-the-winning-style\">(http:\/\/seravo.fi\/2013\/javascript-the-winning-style)<\/a><\/i>   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/189872\/\"> http:\/\/habrahabr.ru\/post\/189872\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>JavaScript, the winning style<\/h4>\n<p>  <img decoding=\"async\" align=\"right\" src=\"http:\/\/habrastorage.org\/storage2\/235\/4c5\/8cc\/2354c58cc3d2d65d765241b41606f2e4.png\"\/><br \/>  \u041a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c \u0441\u0442\u0438\u043b\u0435, \u0438\u043c\u0435\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432: \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u043b\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a, \u043c\u043d\u043e\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043b\u0435\u0433\u043a\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0442\u044c \u043f\u043e\u0447\u0442\u0438 \u0441\u0440\u0430\u0437\u0443, \u0434\u0440\u0443\u0433\u0438\u0435 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043e\u0442\u043b\u0430\u0434\u0438\u0442\u044c \u0435\u0449\u0435 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041d\u043e\u0432\u044b\u043c \u0436\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u043b\u0438\u0448\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430 (\u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u0438\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u043a\u043e\u0434\u0435, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043b\u0438\u0448\u044c \u0447\u0442\u043e \u0435\u0433\u043e \u043b\u0435\u0433\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c) \u0438 \u0438\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0449\u0435 \u0432\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442.<\/p>\n<p>  \u041a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430 \u0441\u0442\u0430\u043d\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u0432\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f. \u042d\u0442\u043e \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u0440\u0430\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u0432\u044b\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043e\u0431\u0449\u0438\u0445 \u043f\u0440\u0430\u0432\u0438\u043b. <\/p>\n<p>  \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u041f\u0438\u0442\u043e\u043d\u0430 \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u0439 \u0441\u0432\u043e\u0434 \u043f\u0440\u0430\u0432\u0438\u043b <a href=\"http:\/\/www.python.org\/dev\/peps\/pep-0008\/\">\u00abStyle Guide for Python Code\u00bb<\/a>, \u0443 \u044f\u0437\u044b\u043a\u0430 JavaScript \u0442\u0430\u043a\u043e\u0433\u043e \u043d\u0435\u0442. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0430 \u0432\u044b\u0431\u043e\u0440 \u0435\u0441\u0442\u044c \u0446\u0435\u043b\u044b\u0445 6 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0433\u0430\u0439\u0434\u043e\u0432: <\/p>\n<ul>\n<li><a href=\"http:\/\/google-styleguide.googlecode.com\/svn\/trunk\/javascriptguide.xml\">Google JavaScript Style Guide<\/a> <\/li>\n<li><a href=\"https:\/\/npmjs.org\/doc\/coding-style.html\">npm\u2019s coding style<\/a><\/li>\n<li><a href=\"http:\/\/nodeguide.com\/style.html\">Felix\u2019s Node.js Style Guide<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/rwaldron\/idiomatic.js\/\">Idiomatic JavaScript<\/a><\/li>\n<li><a href=\"http:\/\/contribute.jquery.org\/style-guide\/js\/\">jQuery JavaScript Style Guide<\/a><\/li>\n<li><a href=\"http:\/\/javascript.crockford.com\/code.html\">Douglas Crockford\u2019s JavaScript coding style<\/a><\/li>\n<\/ul>\n<p>  \u041f\u043e\u043c\u0438\u043c\u043e \u0433\u0430\u0439\u0434\u043e\u0432, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0442\u0430\u043a \u0436\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043e\u0431 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445 \u043a\u043e\u0434\u0430, \u0442\u0430\u043a\u0438\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a JSLint \u0438 JSHint. \u0418 \u0432 \u043d\u0438\u0445 \u0443\u0436\u0435 \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u044b \u0441\u0432\u043e\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<b> \u0412\u043e\u043f\u0440\u043e\u0441 \u0432 \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 JavaScript, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u0431\u044b \u0430\u043a\u0442\u0443\u0430\u043b\u0435\u043d \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0431\u044b \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439?<\/b> \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0438 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-189872","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/189872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=189872"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/189872\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=189872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=189872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}