summaryrefslogtreecommitdiff
path: root/tools/eslint/lib/options.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-02-15 14:45:53 -0800
committerRich Trott <rtrott@gmail.com>2016-02-18 10:13:13 -0800
commitd7aa8fa088f3b8a31c7d85c6d71824c8c60e7c17 (patch)
tree739f4a86de562584f10eba7f1a06a406d8d66366 /tools/eslint/lib/options.js
parentd3c3a928c3a2f9e961881b47ef0796e57ae8d429 (diff)
downloadnode-new-d7aa8fa088f3b8a31c7d85c6d71824c8c60e7c17.tar.gz
tools: update ESLint to version 2.1.0
Update ESLint to 2.1.0. ESLint has a number of potentially-useful new features but this change attempts to be minimal in its changes. However, some things could not be avoided reasonably. ESLint 2.1.0 found a few lint issues that ESLing 1.x missed with template strings that did not take advantage of any features of template strings, and `let` declarations where `const` sufficed. Additionally, ESLint 2.1.0 removes some granularity around enabling ES6 features. Some features (e.g., spread operator) that had been turned off in our configuration for ESLint 1.x are now permitted. 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>
Diffstat (limited to 'tools/eslint/lib/options.js')
-rw-r--r--tools/eslint/lib/options.js18
1 files changed, 14 insertions, 4 deletions
diff --git a/tools/eslint/lib/options.js b/tools/eslint/lib/options.js
index 3fee3854b0..ba3b7fa203 100644
--- a/tools/eslint/lib/options.js
+++ b/tools/eslint/lib/options.js
@@ -18,8 +18,10 @@ var optionator = require("optionator");
// exports "parse(args)", "generateHelp()", and "generateHelpForOption(optionName)"
module.exports = optionator({
prepend: "eslint [options] file.js [file.js] [dir]",
- concatRepeatedArrays: true,
- mergeRepeatedObjects: true,
+ defaults: {
+ concatRepeatedArrays: true,
+ mergeRepeatedObjects: true
+ },
options: [
{
heading: "Basic configuration"
@@ -113,7 +115,10 @@ module.exports = optionator({
{
option: "ignore-pattern",
type: "[String]",
- description: "Pattern of files to ignore (in addition to those in .eslintignore)"
+ description: "Pattern of files to ignore (in addition to those in .eslintignore)",
+ concatRepeatedArrays: [true, {
+ oneValuePerFlag: true
+ }]
},
{
heading: "Using stdin"
@@ -140,7 +145,7 @@ module.exports = optionator({
},
{
option: "max-warnings",
- type: "Number",
+ type: "Int",
default: "-1",
description: "Number of warnings to trigger nonzero exit code"
},
@@ -204,6 +209,11 @@ module.exports = optionator({
type: "Boolean",
default: "true",
description: "Allow comments to change eslint config/rules"
+ },
+ {
+ option: "print-config",
+ type: "Boolean",
+ description: "Print the configuration to be used"
}
]
});