summaryrefslogtreecommitdiff
path: root/.eslintrc
AgeCommit message (Collapse)Author
2016-10-05tools: disallow extra blank lines at EOF/BOFRich Trott
Enabling linting to disallow extra blank lines at the start or end of JavaScript files in our code base. Fixes: https://github.com/nodejs/node/issues/8918 PR-URL: https://github.com/nodejs/node/pull/8920 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-10-02test: clean up test-timers-immediateRich Trott
Clean up test-timers-immediate. Use of `let` also requires a tweak to ESLint rules (but it's one that we should do as timers is pretty much the reason it exists). PR-URL: https://github.com/nodejs/node/pull/8857 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-09-20tools: add additional ESLint rulesTeddy Katz
PR-URL: https://github.com/nodejs/node/pull/8643 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@keybase.io>
2016-09-12tools: replace custom ESLint rule with built-inRich Trott
ESLint 3.5.0 introduces a `no-restricted-properties` rule. Replace our custom `no-deepEqual` rule with this rule. PR-URL: https://github.com/nodejs/node/pull/8478 Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-16tools: update ESLint to 3.3.0 and enable rulesRich Trott
Update ESLint 3.3.0 and update .eslintrc: * replace deprecated no-negated-in-lhs rule with no-unsafe-negation * http://eslint.org/docs/rules/no-negated-in-lhs * http://eslint.org/docs/rules/no-unsafe-negation * enable no-template-curly-in-string * http://eslint.org/docs/rules/no-template-curly-in-string * enable no-global-assign * http://eslint.org/docs/rules/no-global-assign * enable func-call-spacing * http://eslint.org/docs/rules/func-call-spacing PR-URL: https://github.com/nodejs/node/pull/8097 Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jasnell - James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-08-14tools: enable rest-spread-spacingRich Trott
There are currently 17 instances of the spread operator and all of them have no space between the operator and the subsequent argument. This change enables a lint rule to enforce that same style on any future uses of the spread operator. Refs: https://github.com/nodejs/node/pull/6573/files/7a1b47f329f2e6481ef8f54951570197fd98378d#r74479351 PR-URL: https://github.com/nodejs/node/pull/8073 Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-08-09tools: enable linting for chained propertiesRich Trott
Refs: https://github.com/nodejs/node/pull/7920 PR-URL: https://github.com/nodejs/node/pull/7999 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2016-07-13tools: consistent .eslintrc formattingsilverwind
All quotes in .eslintrc were unnecessary and inconsistently placed across the file. Additionally, format the globals to be consistent with the style of whitespace and sorted them alphabetically. PR-URL: https://github.com/nodejs/node/pull/7691 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-07-12tools: enforce JS brace style with lintingRich Trott
Enable `brace-style` in ESLint. Ref: https://github.com/nodejs/node/pull/7094#discussion_r70149215 PR-URL: https://github.com/nodejs/node/pull/7630 Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2016-05-19tools: disallow deprecated define getter/setterRich Trott
PR-URL: https://github.com/nodejs/node/pull/6774 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Refs: https://github.com/nodejs/node/pull/6768
2016-05-12tools: enforce linting for unix-style line endingsRich Trott
PR-URL: https://github.com/nodejs/node/pull/6685 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
2016-05-11tools: disallow multiple spaces except indentationRich Trott
Except for indentation, disallow multiple whitespace around logical expressions, conditional expressions, declarations, array elements, object properties, sequences and function parameters. PR-URL: https://github.com/nodejs/node/pull/6645 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-05-08tools: lint for object literal spacingRich Trott
There has been occasional nits for spacing in object literals in PRs but the project does not lint for it and it is not always handled consistently in the existing code, even on adjacent lines of a file. This change enables a linting rule requiring no space between the key and the colon, and requiring at least one space (but allowing for more so property values can be lined up if desired) between the colon and the value. This appears to be the most common style used in the current code base. Example code the complies with lint rule: myObj = { foo: 'bar' }; Examples that do not comply with the lint rule: myObj = { foo : 'bar' }; myObj = { foo:'bar' }; PR-URL: https://github.com/nodejs/node/pull/6592 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
2016-05-07tools: lint for use of space in template stringsRich Trott
There are over 70 files in the project using template strings and all of them have followed the convention of no spaces in curly braces. Good: `${foo}` Not used: `${ foo }` Since the project has adopted a convention, and ESLint has a rule to enforce exactly this convention, enable the rule. PR-URL: https://github.com/nodejs/node/pull/6591 Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-04-28tools: lint for function argument alignmentRich Trott
In function calls that span multiple lines, apply a custom lint rule to enforce argument alignment. With this rule, the following code will be flagged as an error by the linter because the arguments on the second line start in a different column than on the first line: myFunction(a, b, c, d); The following code will not be flagged as an error by the linter: myFunction(a, b, c, d); PR-URL: https://github.com/nodejs/node/pull/6390 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Imran Iqbal <imran@imraniqbal.org> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Ryan Graham <r.m.graham@gmail.com>
2016-04-22tools: enforce deepStrictEqual over deepEqualRich Trott
Introduce a lint rule that enforces use of `assert.deepStrictEqual()` over `assert.deepEqual()`. PR-URL: https://github.com/nodejs/node/pull/6213 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-20tools: lint rule for assert.fail()Rich Trott
`assert.fail()` is often mistakenly used with a single argument even in Node.js core. (See fixes to previous instances in b7f4b1ba4cca320cf576aa73fae15902fd801190, 28e9a022df3ef89a0ea21e4ad86655eb408a8d96. and 676e61872f54dd546e324599c7871c20b798386a.) This commit adds a linting rule to identify instances of this issue. PR-URL: https://github.com/nodejs/node/pull/6261 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-04-18tools: lint for alignment of variable assignmentsRich Trott
Enforce alignment/indentation on variable assignments that span multiple lines. PR-URL: https://github.com/nodejs/node/pull/6242 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-03-07tools: enable no-self-assign ESLint ruleRich Trott
Enabled no-self-assign rule in ESLint. This required one change in a benchmark file. Changed a loop (that is outside of the benchmark itself, so performance is not critical) from a for loop that repeats a string to use String.prototype.repeat() instead. While at it, took the opportunity to const-ify the benchmark file. Also moved the "Strict" section in the .eslintrc to match where it is in the ESLint documentation. Updated the link for Strict rules to point to the ESLint website rather than the GitHub-hosted code. PR-URL: https://github.com/nodejs/node/pull/5552 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-03-03tools: enable no-extra-parens in ESLintRich Trott
Enable `no-extra-parens`. This rule restricts the use of parentheses to only where they are necessary. It is set to be restricted to report only function expressions. PR-URL: https://github.com/nodejs/node/pull/5512 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-24tools: apply custom buffer lint rule to /lib onlyRich Trott
The lint rule is there to avoid a circular-dependency issue that only applies to `/lib`. In preparation for linting `/benchmark`, apply that rule to `/lib` only to avoid churn in `/benchmark`. Refs: https://github.com/nodejs/node/issues/3983#issuecomment-158956113 PR-URL: https://github.com/nodejs/node/pull/5371 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-24tools: enable additional lint rulesRich Trott
Enable additional likely-uncontroversial lint rules: * `comma-dangle` set to prohibit dangling commas on objects and arrays that are defined on a single line. Multi-line definitions can use or omit a trailing comma. * `no-unused-labels` Prohibits defining a label that is not used. * `no-path-concat` Prohibits string-concatenation using i`__dirname` and `__filename`. Use `path.join()`, `path.resolve()`, or template strings instead. * `no-new-symbol` disallow use of `new` operator with `Symbol` object. Violating this rule would result in a `TypeError` at runtime.` PR-URL: https://github.com/nodejs/node/pull/5357 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2016-02-21tools: add Node.js-specific ESLint rulesRich Trott
Add these rules: * no-restricted-modules: See http://eslint.org/docs/rules/no-restricted-modules. It has been configured to prohibit the use of the deprecated `sys` and `_linklist` modules. * no-new-require: See http://eslint.org/docs/rules/no-new-require * no-mixed-requires: http://eslint.org/docs/rules/no-mixed-requires PR-URL: https://github.com/nodejs/node/pull/5320 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-02-18tools: replace obsolete ESLint rulesRich Trott
Now that we are using ESLint 2, replace ESLint 1 rules with their ESLint 2 equivalents. PR-URL: https://github.com/nodejs/node/pull/5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-02-18tools: remove obsolete lint rulesRich Trott
We are about to upgrade from ESlint 1 to ESLint 2. Remove lint rules that will not exist in ESLint 2. PR-URL: https://github.com/nodejs/node/pull/5214 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: jbergstroem - Johan Bergström <bugs@bergstroem.nu> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Myles Borins <myles.borins@gmail.com>
2016-02-15tools: add recommended ES6 lint rulesRich Trott
Add the following (seemingly non-controversial) ESLint rules: * `constructor-super`: Verify calls of `super()` in constructors. Flags situations that will result in runtime errors. Since we do not have 100% code coverage in tests, linting for runtime errors is useful. * `no-class-assign`: Flags cases where a class declaration is overwritten via variable assignment later. It is difficult to think of a situation where this is not an error, and easy to think of situations (particularly in lengthy test files) where it could come up. * `no-const-assign`: Assigning to a const after declaration is a runtime error. * `no-dupe-class-members`: Declare a class member twice, then only the second one counts. This is analogous to redeclaring a variable. * `no-this-before-super`: Using `this` or `super` in a derived class before a call to `super()` is a `ReferenceError` PR-URL: https://github.com/nodejs/node/pull/5210 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Rod Vagg <rod@vagg.org>
2016-02-12tools: add recommended linting rulesRich Trott
This change adds ESLint rules that meet two criteria: * recommended by ESLint * require no code changes These rules are: * `no-func-assign`: Disallow overwriting a function that was written as a function declaration. * `no-negated-in-lhs`: Disallow negated left operand of `in` operator. It prevents `if(!a in b)` when `if(!(a in b))` is intended. * `no-obj-calls`: Disallow global object function calls. It prevents errors like `JSON()` and `Math()`. to exercise the code in tests or whatever, it can sneak in. * `use-isnan`: Prevents errors like `if (foo == NaN)` * `no-octal`: Disallows confusing constructs like `var num = 071;` * `no-delete-var`: Delete works on properties, not variables. Disallows `delete foo`. PR-URL: https://github.com/nodejs/node/pull/5188 Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2016-02-10tools: remove excessive comments from .eslintrcRich Trott
The comments make the config hard to scan. They do not provide any information that isn't in the documentation links referred to in comments (that are not being removed here). Additionally, all rule config sections are alphabetically ordered for easier scanning etc. PR-URL: https://github.com/nodejs/node/pull/5151 Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-10tools: enable no-proto rule for linterJackson Tian
Enable `no-proto` in `.eslintrc`. Use `Object.setPrototypeOf()` and `Object.getPrototypeOf()` instead of. PR-URL: https://github.com/nodejs/node/pull/5140 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-09tools: disallow mixed spaces and tabs for indentsRich Trott
Enable eslint rule disallowing mixing tabs and spaces for indentation. Modify the one file that had been mixing tabs and spaces. PR-URL: https://github.com/nodejs/node/pull/5135 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-09tools: alphabetize eslint stylistic issues sectionRich Trott
Rearrange the style rules in .eslintrc to be in alphabetical order. This has two benefits: It means the rules appear in the same order as they do in the ESLint documentation, easing cross-referencing. It also means that it is much easier to determine with visual inspection if a rule is set or not. https://github.com/nodejs/node/pull/5135 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-02-07tools: lint for empty character classes in regexRich Trott
Enable linting rule to forbid empty character classes in regular expressions. See http://eslint.org/docs/rules/no-empty-character-class Organize "Possible Error" rules in .eslintrc in alphabetical order to match eslint documentation. PR-URL: https://github.com/nodejs/node/pull/5115 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04tools: lint for spacing around unary operatorsRich Trott
Enable `space-unary-ops` in `.eslintrc`. This prohibits things like: i ++ // use `i++` instead typeof(foo) // use `typeof foo` or `typeof (foo)` instead Ref: https://github.com/nodejs/node/pull/4772#discussion_r51732299 PR-URL: https://github.com/nodejs/node/pull/5063 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-02-04tools: enable no-redeclare rule for linterRich Trott
PR-URL: https://github.com/nodejs/node/pull/5047 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-01-28tools: add arrow function rules to eslintcjihrig
This commit enables the following rules: * arrow-parens - requires parens around arrow function arguments * arrow-spacing - ensures a space on each side of the => * no-arrow-condition - prevents accidental use of => in cases where the user really intends to use <= PR-URL: https://github.com/nodejs/node/pull/4813 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-26tools: enable assorted ESLint error rulesRoman Reiss
Enables assorted rules from the category of possible errors. These should not get in the way in any form. - http://eslint.org/docs/rules/no-control-regex - http://eslint.org/docs/rules/no-extra-boolean-cast - http://eslint.org/docs/rules/no-invalid-regexp - http://eslint.org/docs/rules/no-irregular-whitespace - http://eslint.org/docs/rules/no-unexpected-multiline PR-URL: https://github.com/nodejs/node/pull/4864 Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
2016-01-19tools: enable space-in-parens ESLint ruleRoman Reiss
Ref: http://eslint.org/docs/rules/space-in-parens.html PR-URL: https://github.com/nodejs/node/pull/4753 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
2016-01-16tools: enable no-extra-semi rule in eslintMichaël Zasso
PR-URL: https://github.com/nodejs/node/pull/2205 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-13tools: update eslint configMichaël Zasso
The no-reserved-keys rule doesn't exist anymore and we don't need ES3 compatibility. escape and unescape are now known by eslint. --reset flag was removed and it is now the default behavior. PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
2016-01-05tools: implement no-unused-vars for eslintRich Trott
PR-URL: https://github.com/nodejs/node/pull/4536 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-11-10tools: enforce `throw new Error()` with lint ruleRich Trott
Add linting rule requiring `throw new Error()` over `throw Error()`. PR-URL: https://github.com/nodejs/node/pull/3714 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2015-10-27tools: enable prefer-const eslint ruleSakthipriyan Vairamani
Description from: http://eslint.org/docs/rules/prefer-const.html If a variable is never modified, using the `const` declaration is better. `const` declaration tells readers, "this variable is never modified," reducing cognitive load and improving maintainability. Refer: https://github.com/nodejs/node/issues/3118 PR-URL: https://github.com/nodejs/node/pull/3152 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
2015-09-15tools: enable arrow functions in .eslintrcSakthipriyan Vairamani
As of v8 4.5, arrow functions are rolled out. This patch allows eslint to accept arrow functions as well. PR-URL: #2840 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-08-22tools: enable space-after-keywords in eslintBrendan Ashworth
Requires that you do: if (x) { ... } Rather than: if(x) { ... }
2015-08-04test: add tests for persistent repl historyJeremiah Senkpiel
PR-URL: https://github.com/nodejs/io.js/pull/2224 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2015-06-29tools: re-enable comma-spacing linter ruleRoman Reiss
The rule was disabled because of an eslint bug which is now resolved. All code in lib was already conforming and only test code needed a few changes to make the linter happy with this rule enabled. Ref: https://github.com/eslint/eslint/issues/2408 PR-URL: https://github.com/nodejs/io.js/pull/2072 Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com> Reviewed-by: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Alex Kocharin <alex@kocharin.ru>
2015-06-15tools: enable whitespace related rules in eslintRoman Reiss
Enables rules for trailing whitespace, final newline and maximum consecutive empty lines. PR-URL: https://github.com/nodejs/io.js/pull/1971 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-11tools: enable/add additional eslint rulesRoman Reiss
Enables the following rules: - no-undef: Valuable rule to error on usage of undefined variables - require-buffer: Custom rule that forbids usage of the global Buffer inside lib/ because of REPL issues. PR-URL: https://github.com/nodejs/io.js/pull/1794 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-05-28tools: add objectLiteralShorthandProperties to .eslintrcEvan Lucas
Required to make linting pass for using object literal shorthand properties. PR-URL: https://github.com/nodejs/io.js/pull/1760 Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
2015-05-19test: enable linting for testsRoman Reiss
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>