{"_id":"@arizzitano/eslint-config-edx-es5","_rev":"4-2e5e36638dceb7b142c79d9dbaf9b180","name":"@arizzitano/eslint-config-edx-es5","description":"ESLint config for edX JavaScript ES5 code.","dist-tags":{"latest":"2.0.2"},"versions":{"2.0.0":{"name":"@arizzitano/eslint-config-edx-es5","version":"2.0.0","description":"ESLint config for edX JavaScript ES5 code.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/edx/eslint-config-edx.git"},"keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","dependencies":{"eslint":"^3.16.0","eslint-config-airbnb-base":"^4.0.0","eslint-plugin-dollar-sign":"1.0.0","eslint-plugin-import":"^1.7.0"},"_id":"@arizzitano/eslint-config-edx-es5@2.0.0","scripts":{},"_shasum":"064b9ce31dd9d08b45a81dba6e0d2d7dea77c8dd","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.2","_npmUser":{"name":"arizzitano","email":"arizzitano@gmail.com"},"dist":{"shasum":"064b9ce31dd9d08b45a81dba6e0d2d7dea77c8dd","tarball":"https://registry.npmjs.org/@arizzitano/eslint-config-edx-es5/-/eslint-config-edx-es5-2.0.0.tgz","integrity":"sha512-IrXFcyGcimPY3GKlNWntTuQt4OFC43ZBnG7ZDqQXXKVoqu6I8qb1UNE8mUefFxG119wyXEJmTIxmRssnHnAayg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGF7gmRViSB9SwbSWyIW+x7iRiBh/ICPIb8N8EzXwEZqAiB4GFrGCIYZ/qDGeobK6kEyJM5oy4w1yAWzqtWVGJMjgA=="}]},"maintainers":[{"name":"arizzitano","email":"arizzitano@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/eslint-config-edx-es5-2.0.0.tgz_1492615385366_0.2985385365318507"}},"2.0.1":{"name":"@arizzitano/eslint-config-edx-es5","version":"2.0.1","description":"ESLint config for edX JavaScript ES5 code.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/edx/eslint-config-edx.git"},"keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","dependencies":{"eslint":"^3.16.0","eslint-config-airbnb-base":"^11.1.0","eslint-plugin-dollar-sign":"1.0.0","eslint-plugin-import":"^1.7.0"},"_id":"@arizzitano/eslint-config-edx-es5@2.0.1","scripts":{},"_shasum":"74e13988dc2b285fd4334421f002b415e6e95a08","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.2","_npmUser":{"name":"arizzitano","email":"arizzitano@gmail.com"},"dist":{"shasum":"74e13988dc2b285fd4334421f002b415e6e95a08","tarball":"https://registry.npmjs.org/@arizzitano/eslint-config-edx-es5/-/eslint-config-edx-es5-2.0.1.tgz","integrity":"sha512-RcjL5pEubQLxzwcWJX9X1X0nB3uTk+qslPakXWY6pFU3wLfmcjf1ASL4tXDQadcxW6ezKAfENVGlwcDuNiR5KA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKBIKrWzLaT1ALmWpux3ILqodVP1YZl2sMmyMxrDQo8AIhAKqfgY4hEPswXMk63Kh6ohLE4pKjn5V57ygAkZDnsFiY"}]},"maintainers":[{"name":"arizzitano","email":"arizzitano@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/eslint-config-edx-es5-2.0.1.tgz_1492629013075_0.955798841547221"}},"2.0.2":{"name":"@arizzitano/eslint-config-edx-es5","version":"2.0.2","description":"ESLint config for edX JavaScript ES5 code.","main":"index.js","repository":{"type":"git","url":"git+https://github.com/edx/eslint-config-edx.git"},"keywords":["eslint","eslintconfig","edx","mooc"],"license":"Apache-2.0","bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","dependencies":{"eslint":"^3.16.0","eslint-config-airbnb-base":"^11.1.0","eslint-plugin-dollar-sign":"1.0.0","eslint-plugin-import":"^2.2.0"},"_id":"@arizzitano/eslint-config-edx-es5@2.0.2","scripts":{},"_shasum":"143c1501e558168164da35937464b6128e073e0a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.2","_npmUser":{"name":"arizzitano","email":"arizzitano@gmail.com"},"dist":{"shasum":"143c1501e558168164da35937464b6128e073e0a","tarball":"https://registry.npmjs.org/@arizzitano/eslint-config-edx-es5/-/eslint-config-edx-es5-2.0.2.tgz","integrity":"sha512-mWhULOZT7o7CKLp85ZLKzRh1RN/VEiEDt2oCKTsXHJfWUS3zaLeBkkjayjKQADW10WaMdjZ63rOkIb9ytbMzBg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKmNxgFRflGWCf/0VgUmPBjCLgbNo10ZpTilJNMO/MegIhAJWk+vEZl594Sn/0IOHWKsDqcz1hb7kOotjRi+ht/2hK"}]},"maintainers":[{"name":"arizzitano","email":"arizzitano@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/eslint-config-edx-es5-2.0.2.tgz_1492697763103_0.4166005563456565"}}},"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","maintainers":[{"name":"arizzitano","email":"arizzitano@gmail.com"}],"time":{"modified":"2022-06-12T14:47:53.332Z","created":"2017-04-19T15:23:06.210Z","2.0.0":"2017-04-19T15:23:06.210Z","2.0.1":"2017-04-19T19:10:14.000Z","2.0.2":"2017-04-20T14:16:03.895Z"},"homepage":"https://github.com/edx/eslint-config-edx/blob/master/packages/eslint-config-edx-es5/README.md","keywords":["eslint","eslintconfig","edx","mooc"],"repository":{"type":"git","url":"git+https://github.com/edx/eslint-config-edx.git"},"bugs":{"url":"https://github.com/edx/eslint-config-edx/issues"},"license":"Apache-2.0","readmeFilename":"README.md"}