{"_id":"eslint-config-edx-es5","_rev":"28-7ae77cd2fd32ff05e518ff0e9002d389","name":"eslint-config-edx-es5","dist-tags":{"latest":"4.0.1"},"versions":{"0.0.0":{"name":"eslint-config-edx-es5","version":"0.0.0","keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","_id":"eslint-config-edx-es5@0.0.0","maintainers":[{"name":"bjacobel","email":"bjacobel@gmail.com"}],"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"dist":{"shasum":"1ab6fab156488f9e270a702996cc72939a245b67","tarball":"https://registry.npmjs.org/eslint-config-edx-es5/-/eslint-config-edx-es5-0.0.0.tgz","integrity":"sha512-VIqkaWGZwnxsR9vaiT51HmYNAmgx5nqi4tG0vjnv6lzKrMqtPap7r4ad6nEaDB5rG1RNMq2oVV4ELxttkE4kAg==","signatures":[{"sig":"MEUCIQDWaknQR2soRl7unt+6xbcQoPcpboQ1Emb/6gDHwQm1YAIgZhtfDc7H21o8LLO/1lTDMXVCPyubNsjlq0MeEv2/NyY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"1ab6fab156488f9e270a702996cc72939a245b67","scripts":{},"_npmUser":{"name":"bjacobel","email":"bjacobel@gmail.com"},"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"_npmVersion":"3.10.10","description":"ESLint config for edX JavaScript ES5 code.","directories":{},"_nodeVersion":"6.9.5","dependencies":{"eslint":"^3.15.0","eslint-plugin-import":"^1.9.2","eslint-config-airbnb-base":"^3.0.1","eslint-plugin-dollar-sign":"0.0.5"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-edx-es5-0.0.0.tgz_1487366509806_0.6151116646360606","host":"packages-18-east.internal.npmjs.com"}},"1.2.1":{"name":"eslint-config-edx-es5","version":"1.2.1","keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","_id":"eslint-config-edx-es5@1.2.1","maintainers":[{"name":"bjacobel","email":"bjacobel@gmail.com"}],"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"dist":{"shasum":"bb372339b0f8daae64b9385cff8497d11cb9d560","tarball":"https://registry.npmjs.org/eslint-config-edx-es5/-/eslint-config-edx-es5-1.2.1.tgz","integrity":"sha512-mpFLZBSZl/BuYmur10E72U/r5gbLv9KR/eBZANEKbA73pb0pplmBZM+lnrPAB6XMO9O6162sTVOYhDYYgem4ew==","signatures":[{"sig":"MEUCIQCyOey4dfc0tUR1w6vegdjzdVC3HCF2R4MScfYUtC5EJgIgGEKkajGoKOXRBmYFgBKqO1P0rSqOOAtNMSCK8TsfChA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"bb372339b0f8daae64b9385cff8497d11cb9d560","scripts":{},"_npmUser":{"name":"bjacobel","email":"bjacobel@gmail.com"},"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"_npmVersion":"3.10.10","description":"ESLint config for edX JavaScript ES5 code.","directories":{},"_nodeVersion":"6.9.5","dependencies":{"eslint":"^2.13.1","eslint-plugin-import":"^1.9.2","eslint-config-airbnb-base":"^3.0.1","eslint-plugin-dollar-sign":"0.0.5"},"peerDependencies":{"eslint":"^2.12.0","eslint-plugin-import":"^1.9.2","eslint-plugin-dollar-sign":"0.0.5"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-edx-es5-1.2.1.tgz_1487952740103_0.22472204943187535","host":"packages-12-west.internal.npmjs.com"}},"2.0.0":{"name":"eslint-config-edx-es5","version":"2.0.0","keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","_id":"eslint-config-edx-es5@2.0.0","maintainers":[{"name":"bjacobel","email":"bjacobel@gmail.com"}],"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"dist":{"shasum":"744aa492c44ed1fdcce63d5054d9d87ea3ed373b","tarball":"https://registry.npmjs.org/eslint-config-edx-es5/-/eslint-config-edx-es5-2.0.0.tgz","integrity":"sha512-t8A/l50uY09BcL3YljI+Voy+6uUv497XFowx9vk53NnZDd53gWZZb0htqUZOaaPN+lJYpaD7/RNhsuouiTsyAw==","signatures":[{"sig":"MEYCIQDQcN2W7vLAmNw/sZNqHCPIQajy7/vK/MxJIrSfJ0vVhAIhAJtrOjzvYRDEcByf/eSZbBVH2mM8tu1vlcyCTSsM2+yj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"744aa492c44ed1fdcce63d5054d9d87ea3ed373b","scripts":{},"_npmUser":{"name":"bjacobel","email":"bjacobel@gmail.com"},"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"_npmVersion":"3.10.10","description":"ESLint config for edX JavaScript ES5 code.","directories":{},"_nodeVersion":"6.9.5","dependencies":{"eslint":"^3.16.0","eslint-plugin-import":"^1.7.0","eslint-config-airbnb-base":"^3.0.1","eslint-plugin-dollar-sign":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-edx-es5-2.0.0.tgz_1487959803111_0.3061706677544862","host":"packages-18-east.internal.npmjs.com"}},"3.0.0":{"name":"eslint-config-edx-es5","version":"3.0.0","keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","_id":"eslint-config-edx-es5@3.0.0","maintainers":[{"name":"arizzitano","email":"arizzitano@gmail.com"},{"name":"bjacobel","email":"bjacobel@gmail.com"},{"name":"edx","email":"npmjs@edx.org"}],"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"dist":{"shasum":"6b6105148406c757089150ea29523a3011be0aba","tarball":"https://registry.npmjs.org/eslint-config-edx-es5/-/eslint-config-edx-es5-3.0.0.tgz","integrity":"sha512-9NpQn+D6+gGvGuR+e9nVCusxHjlkkPa4hZeQbaivjR6oJySIbIR0DqG3H2FAuWKoWFk/iHCqaXV9csEovHBgLw==","signatures":[{"sig":"MEYCIQDG1wC6Q6zagPpi+mzxWtBSIywfB98EEBSkRsA5yiy05wIhAINhUwaWVUijHft5q/GyaGWMVZKAKG9aSIWxbPnmAWuT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"6b6105148406c757089150ea29523a3011be0aba","scripts":{},"_npmUser":{"name":"arizzitano","email":"arizzitano@gmail.com"},"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"_npmVersion":"3.10.10","description":"ESLint config for edX JavaScript ES5 code.","directories":{},"_nodeVersion":"6.10.2","dependencies":{"eslint":"^3.16.0","eslint-plugin-import":"^2.2.0","eslint-config-airbnb-base":"^11.1.0","eslint-plugin-dollar-sign":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-edx-es5-3.0.0.tgz_1492707543793_0.9839550263714045","host":"packages-18-east.internal.npmjs.com"}},"3.0.0-fff653c":{"name":"eslint-config-edx-es5","version":"3.0.0-fff653c","keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","_id":"eslint-config-edx-es5@3.0.0-fff653c","maintainers":[{"name":"alasdairswan","email":"aswan@edx.org"},{"name":"andywarmstrong","email":"andya@edx.org"},{"name":"arizzitano","email":"arizzitano@gmail.com"},{"name":"bjacobel","email":"bjacobel@gmail.com"},{"name":"chrisahrens","email":"christina@edx.org"},{"name":"djen","email":"djen@edx.org"},{"name":"edx","email":"npmjs@edx.org"},{"name":"harryrein","email":"hrein@edx.org"}],"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"dist":{"shasum":"11d59fe9b97ba43b0e6563658577393918d9e0fa","tarball":"https://registry.npmjs.org/eslint-config-edx-es5/-/eslint-config-edx-es5-3.0.0-fff653c.tgz","integrity":"sha512-S4E8hr4pKNSVjm2JBA6BjpQ133xsdTMEXfuQFOIh4G24Ud7KDbu40Izwbh8c+r4CxU4axEkWWXNozX25jBYKqQ==","signatures":[{"sig":"MEUCIQDvZ1XxsFka8rG5xjiuc4NgY+LzEJeXtWBl2blhp7pRxwIgZZ3mnlJWFUICCWfvG12l+mpf+1cIMEOtVDUupK/sZ1M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"11d59fe9b97ba43b0e6563658577393918d9e0fa","scripts":{},"_npmUser":{"name":"arizzitano","email":"arizzitano@gmail.com"},"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"_npmVersion":"3.10.10","description":"ESLint config for edX JavaScript ES5 code.","directories":{},"_nodeVersion":"6.10.3","dependencies":{"eslint":"^4.2.0","eslint-plugin-import":"^2.6.1","eslint-config-airbnb-base":"github:arizzitano/eslint-config-airbnb-base","eslint-plugin-dollar-sign":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-edx-es5-3.0.0-fff653c.tgz_1499968635411_0.04941582423634827","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"eslint-config-edx-es5","version":"4.0.0","keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","_id":"eslint-config-edx-es5@4.0.0","maintainers":[{"name":"alasdairswan","email":"aswan@edx.org"},{"name":"chrisahrens","email":"christina@edx.org"},{"name":"harryrein","email":"hrein@edx.org"},{"name":"djen","email":"djen@edx.org"},{"name":"andywarmstrong","email":"andya@edx.org"},{"name":"arizzitano","email":"arizzitano@gmail.com"},{"name":"edx","email":"npmjs@edx.org"},{"name":"bjacobel","email":"bjacobel@gmail.com"}],"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"dist":{"shasum":"3da1c718cde0a5f3cc324b0c297e1fe935bfbdad","tarball":"https://registry.npmjs.org/eslint-config-edx-es5/-/eslint-config-edx-es5-4.0.0.tgz","integrity":"sha512-vHlmMbSQfxTuCsYSjVfWmAIA+Lzl8695ugRw+CRaj80AQjIUBmhP/V5wK6u1zxu0oO+4fXgURFInwOkkURXbmg==","signatures":[{"sig":"MEYCIQDuuB0YtDEHgrlmZVHWMj0tqwg7Q1QE6Wl7gD/QTu6EOwIhAKFful6c1SofbPWTXsATR8GGqIluq7mYTL5bsBkF1oQM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"3da1c718cde0a5f3cc324b0c297e1fe935bfbdad","scripts":{},"_npmUser":{"name":"arizzitano","email":"arizzitano@gmail.com"},"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"_npmVersion":"3.10.10","description":"ESLint config for edX JavaScript ES5 code.","directories":{},"_nodeVersion":"6.10.3","dependencies":{"eslint":"^4.5.0","eslint-plugin-import":"^2.7.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-dollar-sign":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-edx-es5-4.0.0.tgz_1503941290460_0.6155037109274417","host":"s3://npm-registry-packages"}},"4.0.1":{"name":"eslint-config-edx-es5","version":"4.0.1","keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","_id":"eslint-config-edx-es5@4.0.1","maintainers":[{"name":"alasdairswan","email":"aswan@edx.org"},{"name":"chrisahrens","email":"christina@edx.org"},{"name":"harryrein","email":"hrein@edx.org"},{"name":"djen","email":"djen@edx.org"},{"name":"andywarmstrong","email":"andya@edx.org"},{"name":"arizzitano","email":"arizzitano@gmail.com"},{"name":"edx","email":"npmjs@edx.org"},{"name":"bjacobel","email":"bjacobel@gmail.com"}],"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"dist":{"shasum":"9be744eb5cae06587cd433489066907b80508322","tarball":"https://registry.npmjs.org/eslint-config-edx-es5/-/eslint-config-edx-es5-4.0.1.tgz","integrity":"sha512-NazW7j4tcm1pxKabWZDKFlvbD/2usN2ZmW3LoYvM+f68fH0+1yX+R2kI/3WB9oatGOs5ScBVN33h05WakjVw5A==","signatures":[{"sig":"MEUCIDVnD/FgVf0a+mwE7BQn6yCELtaMU4g2soMYT21SAXcwAiEAuZKkEg5ArYr/07y9gQyNTvDyPGwrGwtmFB2aiMnlDIs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_npmUser":{"name":"arizzitano","email":"arizzitano@gmail.com"},"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"_npmVersion":"5.5.1","description":"ESLint config for edX JavaScript ES5 code.","directories":{},"_nodeVersion":"8.9.3","dependencies":{"eslint":"^4.5.0","eslint-plugin-import":"^2.7.0","eslint-config-airbnb-base":"^11.3.2","eslint-plugin-dollar-sign":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-edx-es5-4.0.1.tgz_1515530232148_0.23234645370393991","host":"s3://npm-registry-packages"}}},"time":{"created":"2017-02-17T21:21:50.537Z","modified":"2026-07-10T14:29:58.522Z","0.0.0":"2017-02-17T21:21:50.537Z","1.2.1":"2017-02-24T16:12:21.994Z","2.0.0":"2017-02-24T18:10:03.768Z","3.0.0":"2017-04-20T16:59:04.366Z","3.0.0-fff653c":"2017-07-13T17:57:16.433Z","4.0.0":"2017-08-28T17:28:11.400Z","4.0.1":"2018-01-09T20:37:13.167Z"},"bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"license":"Apache-2.0","homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","keywords":["eslint","eslintconfig","edx","mooc"],"repository":{"url":"git+https://github.com/edx/eslint-config-edx.git","type":"git"},"description":"ESLint config for edX JavaScript ES5 code.","maintainers":[{"email":"npmjs@edx.org","name":"edx-old-org"},{"email":"edx-semantic-release@edx.org","name":"edx-semantic-release"},{"email":"npm@feanil.com","name":"feanil"},{"email":"openedx-semantic-release-bot@openedx.org","name":"openedx-semantic-release-bot"},{"email":"arbrandes@arbrand.es","name":"arbrandes"},{"email":"djen@edx.org","name":"djen"}],"readme":"## `eslint-config-edx-es5`\n[![npm version](https://badge.fury.io/js/eslint-config-edx-es5.svg)](https://badge.fury.io/js/eslint-config-edx-es5)\n\nThis is the edX ESLint shareable config for linting ES5 JavaScript. See [`eslint-config-edx`](https://npmjs.com/package/eslint-config-edx) if you need to lint ES2015+ code.\n\nNote that versions of this config prior to v2.0.0 are INCOMPATIBLE with eslint-config-edx.\n\nedX maintains high-level documentation on the [Open edX Developer's Guide](http://edx.readthedocs.io/projects/edx-developer-guide/en/latest/user_interface_development.html?highlight=ux#adding-a-ui-page) on how we write new JavaScript features, including our use of RequireJS, Underscore and Backbone. This document seeks to be a lower-level guide on the semantics of how we write ES5 JavaScript, including nuts and bolts about spacing, syntax, and variable naming.\n\nFor the most part, edX follows the thoroughly documented [Airbnb JavaScript Style Guide for ES5](https://github.com/airbnb/javascript/tree/es5-deprecated/es5). Airbnb's JavaScript style is becoming the community standard, and their `eslint-config-airbnb` is the most-downloaded ESLint config on NPM. Because the main Airbnb ESLint config assumes use of ES6, and edX's JavaScript is primarily written in ES5, this config is an extension of `eslint-config-airbnb-base/legacy`, Airbnb's styleguide for ES5. Some of our rules also reference the [Airbnb ES6 styleguide](http://airbnb.io/javascript/), the more modern and currently supported version.\n\nIn addition to the base Airbnb rules, edX adds or extends several of our own. They are described below.\n\n####[`dollar-sign`](https://github.com/erikdesjardins/eslint-plugin-dollar-sign)\n- **Setting**: `[\"error\", \"ignoreProperties\"]`\n- **Explanation**: All variables that represent jQuery objects should be named starting with a `$`. Object properties may ignore this rule.\n- **Example**:\n\n    ```javascript\n    // Correct pattern\n    var $fooSpan = $('span#foo');\n\n    var ignoreProps = {};\n    ignoreProps.fooSpan = $('span#foo');\n\n    // Linter error\n    var fooSpan = $('span#foo');\n    ```\n\n####[`func-names`](http://eslint.org/docs/rules/func-names)\n- **Setting**: `\"off\"`\n- **Explanation**: Ignore this rule, it doesn't play nicely with RequireJS code.\n\n####[`indent`](http://eslint.org/docs/rules/indent)\n- **Setting**: `[\"error\", 4]`\n- **Explanation**: edX is standardized on indenting all code with four spaces. The JavaScript community generally prefers two spaces; edX uses four because of our use of Python (see [PEP8](https://www.python.org/dev/peps/pep-0008/)) and the desire to have consistency in our codebases.\n- **Example**:\n\n\t```javascript\n\t// Correct pattern\n\tvar example = function() {\n\t    if (numberOfSpaces !== 4) {\n\t        throw new Error('Use four spaces for indentation.');\n\t    }\n\t};\n\t```\n\n####[`max-len`](http://eslint.org/docs/rules/max-len)\n- **Setting**: `[\"error\", 120]`\n- **Explanation**: Use a maximum of 120 characters on a line. (The Airbnb default is 100, which we feel is too low.)\n\n####[`new-cap`](http://eslint.org/docs/rules/new-cap)\n- **Setting**: `\"off\"`\n- **Explanation**: Disable the rule stating functions can only start with a capital letter if they are constructors.\n- **Example**:\n\n    ```javascript\n    // Correct pattern\n    var htmlFoo = HtmlUtils.HTML('foo');\n    ```\n\n####[`no-else-return`](http://eslint.org/docs/rules/no-else-return)\n- **Setting**: `\"off\"`\n- **Explanation**: An `else` block after an `if` which contains a `return` is allowed. Technically the `else` is redundant (and Airbnb disallows it), but this rule allows for more readable control flow.\n- **Example**:\n\n    ```javascript\n    // Correct pattern\n    if (fooString === 'foo') {\n        return 30;\n    } else {\n        return 50;\n    }\n    ```\n\n####[`no-shadow`](http://eslint.org/docs/rules/no-shadow)\n- **Setting**: `\"error\"`\n- **Explanation**: Do not redefine variables in a child scope that are already declared in the upper scope.\n- **Example**:\n\n    ```javascript\n    // Linter error\n    var foo = 'bar';\n    if (fizz) {\n        var foo = 'buzz';\n    }\n    ```\n\n####[`object-curly-spacing`](http://eslint.org/docs/rules/object-curly-spacing)\n- **Setting**: `[\"error\", \"never\"]`\n- **Explanation**: Do not insert extra spaces inside of curly brackets.\n- **Example**:\n\n    ```javascript\n    // Correct pattern\n    var obj = {foo: 42};\n\n    // Linter error\n    var obj2 = { foo: 42 };\n    ```\n\n####[`one-var`](http://eslint.org/docs/rules/one-var)\n- **Setting**: `\"off\"`\n- **Explanation**: Declare all variables at the top of your scope. You may use a single `var` statement (separating declarations by commas and newlines), or you may use multiple `var` statements. Just don't initialize multiple variables per line (see next rule).\n- **Example**:\n\n    ```javascript\n    // All correct patterns\n    function() {\n        var foo, bar, baz,\n            fizz = 'buzz',\n            foz = 49;\n\n        if (fizz) {\n            // No more variable declarations below\n        }\n    }\n\n    function() {\n        var foo, bar, baz;\n        var fizz = 'buzz',\n            foz = 49;\n\n        if (fizz) {\n            // No more variable declarations below\n        }\n    }\n\n    function() {\n        var foo;\n        var bar;\n        var baz;\n        var fizz = 'buzz';\n        var foz = 49;\n\n        if (fizz) {\n            // No more variable declarations below\n        }\n    }\n    ```\n\n####[`one-var-declaration-per-line`](http://eslint.org/docs/rules/one-var-declaration-per-line)\n- **Setting**: `[\"error\", \"initializations\"]`\n- **Explanation**: Variables that are not initialized can be declared on the same line. Only one initialization is allowed per line.\n- **Example**:\n\n    ```javascript\n    // Correct pattern\n    var foo, bar,\n        fizz = 'buzz',\n        fozz = 'bizz';\n\n    // Linter error\n    var foo, bar, fizz = 'buzz', fozz = 'bizz';\n    ```\n\n####[`space-before-function-paren`](http://eslint.org/docs/rules/space-before-function-paren)\n- **Setting**: `[\"error\", \"never\"]`\n- **Explanation**: Do not add a space between a function and the opening parentheses containing its arguments, whether the function is anonymous or named.\n- **Example**:\n\n    ```javascript\n    // Correct patterns\n    function foo(arg) {\n\n    }\n\n    var bar = function() {\n\n    };\n\n    // Linter errors\n    function foo (arg) {\n\n    }\n\n    var bar = function () {\n\n    };\n    ```\n\n####[`strict`](http://eslint.org/docs/rules/strict)\n- **Setting**: `[\"error\", \"safe\"]`\n- **Explanation**: If you're writing code that will run in the browser (i.e., AMD modules used by RequireJS), every top-level function declaration must have a `'use strict';` in it. Do not use `'use strict';` anywhere else. If you're writing code that will run in Node (i.e., a CommonJS module, Karma config or Gulp task), use a single `'use strict';` at global scope at the top of the module.\n- **Example**:\n\t- For browser code:\n\n\t    ```javascript\n\t    (function(define) {\n\t        'use strict';\n\n\t        define(['foo'], function(foo) {\n\t            foo();\n\t        });\n\t    }());\n\t\t```\n\n\t- For Node code:\n\n\t    ```javascript\n\t    /* eslint-env node */\n\t    'use strict';\n\t    var foo = require('foo');\n\t    foo();\n\t    ```\n\n\t\tInstead of a `/* eslint-env node */` directive, you can also tell ESLint that a directory of `.js` files should be treated as Node-specific code with a directory-specific `.eslintrc.json`:\n\n\t    ```\n\t    project\n\t    ├── .eslintrc.json\n\t    ├── browser\n\t    │   └── amd-module.js\n\t    └── node\n\t        ├── .eslintrc.json\n            ├── commonjs-module-1.js\n\t        └── commonjs-module-2.js\n\t    ```\n\n\t\t`project/node/.eslintrc.json`:\n\n\t    ```\n\t    {\n\t        \"env\": \"node\"\n\t    }\n\t    ```\n","readmeFilename":"README.md"}