summaryrefslogtreecommitdiff
path: root/.eslintrc.yaml
Commit message (Collapse)AuthorAgeFilesLines
* tools: replace assert-throw-arguments custom lintRich Trott2017-08-021-1/+6
| | | | | | | | | | | | The functionality of ESLint custom rule assert-throws-arguments can be replaced with no-restricted-syntax entries. PR-URL: https://github.com/nodejs/node/pull/14547 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: remove legacy indentation lintingRich Trott2017-07-301-12/+7
| | | | | | | | | | | | All linting now uses the current ESLint 4.3.0 indentation linting. Remove legacy indentation rules. PR-URL: https://github.com/nodejs/node/pull/14515 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
* tools: enable stricter linting in lib directoryRich Trott2017-07-241-10/+10
| | | | | | | | | | | | | | | | | | | Enable ESLint 4.x linting and disable legacy linting in the lib directory. While doing this, some indentation in the .eslintrc.yaml file itself was noticed to be incorrect. Fixed that too. PR-URL: https://github.com/nodejs/node/pull/14403 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
* tools: enforce consistent spacing inside bracesSebastiaan Deckers2017-07-211-3/+4
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/14162 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: fix error in eslintrc commentRich Trott2017-07-071-1/+1
| | | | | | | | | | | | | 46d7cb88c7f8b416e667c52de80e6766115b3781 introduced an error in a comment in `.eslintrc.yaml`. The second option needs to be an integer specifying the number of spaces per level of indentation. PR-URL: https://github.com/nodejs/node/pull/14108 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
* tools: remove align-multiline-assignment lint ruleRich Trott2017-07-061-1/+0
| | | | | | | | | | | | | In preparation for stricter indentation linting, remove the align-multiline-assignment custom rule, as it may conflict with the ESLint stricter indentation linting. PR-URL: https://github.com/nodejs/node/pull/14079 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
* tools: eslint - use `error` and `off`Refael Ackermann2017-07-051-97/+97
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/14061 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* tools: use no-use-before-define ESLint ruleVse Mozhet Byt2017-07-041-0/+3
| | | | | | | | Also fix repl and url libs for the rule. PR-URL: https://github.com/nodejs/node/pull/14032 Refs: http://eslint.org/docs/rules/no-use-before-define Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
* tools: update ESLint to v4.0.0Rich Trott2017-06-171-8/+19
| | | | | | | | | | | | Update ESLint and configuration to version 4.0.0. PR-URL: https://github.com/nodejs/node/pull/13645 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: fix order of ESLint rulesMichaël Zasso2017-06-061-17/+17
| | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/13363 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
* tools: relax lint rule for regexpsRich Trott2017-05-051-1/+4
| | | | | | | | | | | | | | | | | Relax the rule for maximum line length in JS files if the line contains a regular expression literal. This will avoid the need to convert a regular expression literal into a RegExp constructor call broken across multiple lines in order to satisfy the maximum line length rule. That practice hampers readability. PR-URL: https://github.com/nodejs/node/pull/12807 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* tools: require function declarationsRich Trott2017-05-011-0/+1
| | | | | | | | | | | Except for arrow functions, require function declarations instead of function expressions via linting. This is the predominant style in our code base (77 instances of expressions to 2344 instances of declarations). PR-URL: https://github.com/nodejs/node/pull/12711 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
* tools: use no-useless-concat ESLint ruleVse Mozhet Byt2017-04-251-0/+1
| | | | | | | | | | | | | | | * Add `no-useless-concat: error` to .eslintrc.yaml. * Apply no-useless-concat rule to tests. PR-URL: https://github.com/nodejs/node/pull/12613 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
* tools: enable no-useless-return eslint rulecjihrig2017-04-251-0/+1
| | | | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/12577 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
* doc: add eslint-plugin-markdownVse Mozhet Byt2017-04-251-0/+3
| | | | | | | | | | | | | | | | | * install eslint-plugin-markdown * add doc/.eslintrc.yaml * add `<!-- eslint-disable rule -->` or `<!-- eslint-disable -->` for the rest of problematic code * .js files in doc folder added to .eslintignore * update Makefile and vcbuild.bat PR-URL: https://github.com/nodejs/node/pull/12563 Refs: https://github.com/nodejs/node/pull/12557#issuecomment-296015032 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
* tools: add `root: true` in main .eslintrc.yamlVse Mozhet Byt2017-04-241-0/+2
| | | | | | | | | | | | | | | | | This option prevents ESlint from unnecessary searching in parent folders. It also protects ESlint rules from accidental rewriting by a config in a parent folder. PR-URL: https://github.com/nodejs/node/pull/12570 Fixes: https://github.com/nodejs/node/issues/12566 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
* tools,lib: enable strict equality lint ruleRich Trott2017-04-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Enablie a lint rule to require `===` and `!==` instead of `==` and `!=` except in some well-defined cases: * comparing against `null` as a shorthand for also checking for `undefined` * comparing the result of `typeof` * comparing literal values In cases where `==` or `!=` are being used as optimizations, use an ESLint comment to disable the `eqeqeq` rule for that line explicitly. I rather like this because it's a signal that the usage is intentional and not a mistake. PR-URL: https://github.com/nodejs/node/pull/12446 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: enforce two arguments in assert.throwsMichaël Zasso2017-04-131-1/+1
| | | | | | | | Enables the requireTwo option of our custom rule. PR-URL: https://github.com/nodejs/node/pull/12270 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* tools: remove assert.fail() lint ruleRich Trott2017-04-121-3/+0
| | | | | | | | | | | assert.fail() has been updated to accept a single argument so that is no longer an error. Remove lint rule that checks for assert.fail() with a single argument. PR-URL: https://github.com/nodejs/node/pull/12293 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: replace custom assert.fail lint ruleRich Trott2017-04-121-1/+3
| | | | | | | | | | | | Replace custom lint rule for `assert.fail()` function signature errors with a restricted-syntax rule. PR-URL: https://github.com/nodejs/node/pull/12287 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* tools: replace custom new-with-error ruleRich Trott2017-04-081-3/+5
| | | | | | | | | | | | Use no-restricted-syntax to implement the requirement that `Error` objects must be thrown with the `new` keyword. PR-URL: https://github.com/nodejs/node/pull/12249 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
* tools: replace custom ESLint timers ruleRich Trott2017-04-041-1/+7
| | | | | | | | | | | | | ESLint 3.19.0 allows the specification of selectors that represent disallowed syntax. Replace our custom rule for timer arguments with a pair of `no-restricted-syntax` option objects. PR-URL: https://github.com/nodejs/node/pull/12162 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* linkedlist: remove public moduleBrian White2017-04-041-1/+1
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/12113 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* tools: add unescaped regexp dot rule to linterBrian White2017-03-291-0/+1
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/11834 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
* tools: ignore URLs in line length lintingRich Trott2017-03-201-1/+1
| | | | | | | | | | | | Where inclusion of a lengthy URL causes a line to exceed 80 characters in our code base, do not report the line length as a linting error. PR-URL: https://github.com/nodejs/node/pull/11890 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* tools: enable unicode-bom ESLint ruleAnna Henningsen2017-02-241-0/+1
| | | | | | | | | | | | | | Disallow UTF-8 Byte Order Marks in the source tree. That Node can read these files is still tested by `test/sequential/test-module-loading.js`. PR-URL: https://github.com/nodejs/node/pull/11479 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* tools: enable one-var-declaration-per-line ESLint ruleMichaël Zasso2017-02-211-0/+1
| | | | | | | | | | | | This rule enforces new lines around variable declarations. It is configured to spot only variables that are initialized. PR-URL: https://github.com/nodejs/node/pull/11462 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* tools: enable ES2017 syntax support in ESLintMichaël Zasso2017-02-111-1/+1
| | | | | | | | | | | | | This allows us to use async functions. PR-URL: https://github.com/nodejs/node/pull/11210 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
* tools: enable no-throw-literal ESLint ruleRich Trott2017-02-071-0/+1
| | | | | | | | | | | | | Only throw the Error object itself or an object using the Error object as base objects for user-defined exceptions. PR-URL: https://github.com/nodejs/node/pull/11168 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* tools: rename eslintrc to an undeprecated formatSakthipriyan Vairamani2017-01-181-0/+156
As per ESLint documentation, http://eslint.org/docs/user-guide/configuring#configuration-file-formats the file format .eslintrc is deprecated. This patch just renames the files to .yaml and the structure is already in yaml format. PR-URL: https://github.com/nodejs/node/pull/7699 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Rich Trott <rtrott@gmail.com>