From 1eddb390add2f6ca412b612c133ce4a708c14461 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Thu, 17 Nov 2016 18:05:03 -0500 Subject: [PATCH 01/16] chore(package): update eslint-config-babel to version 3.0.0 (#423) https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bb4294b7..c92bd518 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "devDependencies": { "babel-eslint": "^7.0.0", "eslint": "^3.9.1", - "eslint-config-babel": "^2.0.1", + "eslint-config-babel": "^3.0.0", "eslint-plugin-babel": "^4.0.0", "eslint-plugin-flowtype": "^2.4.0", "espree": "^3.3.1", From 161b8e7a887dbc94c821c73a8aba4d449447371c Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 18 Nov 2016 08:52:17 -0500 Subject: [PATCH 02/16] use `*` (#421) --- index.js | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/index.js b/index.js index 392d9726..4bd3ca2c 100644 --- a/index.js +++ b/index.js @@ -370,23 +370,7 @@ exports.parseNoPatch = function (code, options) { allowImportExportEverywhere: options.allowImportExportEverywhere, // consistent with espree allowReturnOutsideFunction: true, allowSuperOutsideMethod: true, - plugins: [ - "flow", - "jsx", - "asyncFunctions", - "asyncGenerators", - "classConstructorCall", - "classProperties", - "decorators", - "doExpressions", - "exponentiationOperator", - "exportExtensions", - "functionBind", - "functionSent", - "objectRestSpread", - "trailingFunctionCommas", - "dynamicImport" - ] + plugins: ["*"] }; var ast; From a91a9d0fe4b69dd4985bf8e42046057de165c2e5 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Fri, 2 Dec 2016 16:51:16 -0500 Subject: [PATCH 03/16] Revert "use `*`" (#426) --- index.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 4bd3ca2c..392d9726 100644 --- a/index.js +++ b/index.js @@ -370,7 +370,23 @@ exports.parseNoPatch = function (code, options) { allowImportExportEverywhere: options.allowImportExportEverywhere, // consistent with espree allowReturnOutsideFunction: true, allowSuperOutsideMethod: true, - plugins: ["*"] + plugins: [ + "flow", + "jsx", + "asyncFunctions", + "asyncGenerators", + "classConstructorCall", + "classProperties", + "decorators", + "doExpressions", + "exponentiationOperator", + "exportExtensions", + "functionBind", + "functionSent", + "objectRestSpread", + "trailingFunctionCommas", + "dynamicImport" + ] }; var ast; From e6af5c501f752b4f3e071ade5e8fd96a471cda41 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Tue, 6 Dec 2016 18:02:37 -0500 Subject: [PATCH 04/16] add badges [skip ci] --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index a26f0baf..1e38efd2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -# babel-eslint -[![Build Status][travis-image]][travis-url] +# babel-eslint [![npm](https://img.shields.io/npm/v/babel-eslint.svg)](https://www.npmjs.com/package/babel-eslint) [![travis](https://img.shields.io/travis/babel/babel-eslint/master.svg)](https://travis-ci.org/babel/babel-eslint) [![npm-downloads](https://img.shields.io/npm/dm/babel-eslint.svg)](https://www.npmjs.com/package/babel-eslint) **babel-eslint** allows you to lint **ALL** valid Babel code with the fantastic [ESLint](https://github.com/eslint/eslint). @@ -99,6 +98,3 @@ Check out the [ESLint docs](http://eslint.org/docs/rules/) for all possible rule ```sh $ eslint your-files-here ``` - -[travis-url]: https://travis-ci.org/babel/babel-eslint -[travis-image]: https://travis-ci.org/babel/babel-eslint.svg?branch=master From 265d2190499176c7cd5a70f4a1f4fb5f8bc823ea Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 10 Jan 2017 19:36:02 +0100 Subject: [PATCH 05/16] chore(package): update eslint-config-babel to version 4.0.0 (#430) https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c92bd518..a9ba5345 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "devDependencies": { "babel-eslint": "^7.0.0", "eslint": "^3.9.1", - "eslint-config-babel": "^3.0.0", + "eslint-config-babel": "^4.0.0", "eslint-plugin-babel": "^4.0.0", "eslint-plugin-flowtype": "^2.4.0", "espree": "^3.3.1", From 781dc77f45d52b022b758380009d0c57e023f831 Mon Sep 17 00:00:00 2001 From: Nazim Hajidin Date: Sat, 14 Jan 2017 17:15:54 -0500 Subject: [PATCH 06/16] Update to use Node 4 features (#425) * Change for loops to forEach * Change more for loops * Arrow functions * Use object shorthand * Put this on one line * Change back to using for loops --- babylon-to-espree/toAST.js | 10 +- babylon-to-espree/toTokens.js | 2 +- index.js | 8 +- test/babel-eslint.js | 138 ++++++++--------- test/integration.js | 52 +++---- test/non-regression.js | 282 +++++++++++++++++----------------- 6 files changed, 246 insertions(+), 246 deletions(-) diff --git a/babylon-to-espree/toAST.js b/babylon-to-espree/toAST.js index 77190f36..c26fa5ba 100644 --- a/babylon-to-espree/toAST.js +++ b/babylon-to-espree/toAST.js @@ -31,7 +31,7 @@ function changeComments(nodeComments) { var astTransformVisitor = { noScope: true, - enter: function (path) { + enter (path) { var node = path.node; node.range = [node.start, node.end]; @@ -55,12 +55,12 @@ var astTransformVisitor = { // make '_paths' non-enumerable (babel-eslint #200) Object.defineProperty(node, "_paths", { value: node._paths, writable: true }); }, - exit: function (path) { + exit (path) { var node = path.node; [ fixDirectives, - ].forEach(function (fixer) { + ].forEach((fixer) => { fixer(path); }); @@ -211,7 +211,7 @@ var astTransformVisitor = { // template string range fixes if (path.isTemplateLiteral()) { - node.quasis.forEach(function (q) { + node.quasis.forEach((q) => { q.range[0] -= 1; if (q.tail) { q.range[1] += 1; @@ -244,7 +244,7 @@ function fixDirectives (path) { if (!directivesContainer.directives) return; - directivesContainer.directives.reverse().forEach(function (directive) { + directivesContainer.directives.reverse().forEach((directive) => { directive.type = "ExpressionStatement"; directive.expression = directive.value; delete directive.value; diff --git a/babylon-to-espree/toTokens.js b/babylon-to-espree/toTokens.js index dab4b21b..1f06d3e5 100644 --- a/babylon-to-espree/toTokens.js +++ b/babylon-to-espree/toTokens.js @@ -4,7 +4,7 @@ var toToken = require("./toToken"); module.exports = function (tokens, tt, code) { // transform tokens to type "Template" convertTemplateType(tokens, tt); - var transformedTokens = tokens.filter(function (token) { + var transformedTokens = tokens.filter((token) => { return token.type !== "CommentLine" && token.type !== "CommentBlock"; }); diff --git a/index.js b/index.js index 392d9726..7b742494 100644 --- a/index.js +++ b/index.js @@ -44,7 +44,7 @@ function monkeypatch() { estraverses.push(estraverseOfEslint); Object.assign(estraverseOfEslint.VisitorKeys, t.VISITOR_KEYS); - estraverses.forEach(function (estraverse) { + estraverses.forEach((estraverse) => { estraverse.VisitorKeys.MethodDefinition.push("decorators"); estraverse.VisitorKeys.Property.push("decorators"); }); @@ -100,7 +100,7 @@ function monkeypatch() { } // iterate through part of t.VISITOR_KEYS - var visitorKeysMap = pick(t.VISITOR_KEYS, function(k) { + var visitorKeysMap = pick(t.VISITOR_KEYS, (k) => { return t.FLIPPED_ALIAS_KEYS.Flow.concat([ "ArrayPattern", "ClassDeclaration", @@ -268,13 +268,13 @@ function monkeypatch() { } // set ArrayPattern/ObjectPattern visitor keys back to their original. otherwise // escope will traverse into them and include the identifiers within as declarations - estraverses.forEach(function (estraverse) { + estraverses.forEach((estraverse) => { estraverse.VisitorKeys.ObjectPattern = ["properties"]; estraverse.VisitorKeys.ArrayPattern = ["elements"]; }); visitFunction.call(this, node); // set them back to normal... - estraverses.forEach(function (estraverse) { + estraverses.forEach((estraverse) => { estraverse.VisitorKeys.ObjectPattern = t.VISITOR_KEYS.ObjectPattern; estraverse.VisitorKeys.ArrayPattern = t.VISITOR_KEYS.ArrayPattern; }); diff --git a/test/babel-eslint.js b/test/babel-eslint.js index 65e70b10..62463f44 100644 --- a/test/babel-eslint.js +++ b/test/babel-eslint.js @@ -37,7 +37,7 @@ function lookup(obj, keypath, backwardsDepth) { if (!keypath) { return obj; } return keypath.split(".").slice(0, -1 * backwardsDepth) - .reduce(function (base, segment) { return base && base[segment], obj; }); + .reduce((base, segment) => { return base && base[segment], obj; }); } function parseAndAssertSame(code) { @@ -82,57 +82,57 @@ function parseAndAssertSame(code) { // assert.equal(esAST, babylonAST); } -describe("babylon-to-esprima", function () { - describe("templates", function () { - it("empty template string", function () { +describe("babylon-to-esprima", () => { + describe("templates", () => { + it("empty template string", () => { parseAndAssertSame("``"); }); - it("template string", function () { + it("template string", () => { parseAndAssertSame("`test`"); }); - it("template string using $", function () { + it("template string using $", () => { parseAndAssertSame("`$`"); }); - it("template string with expression", function () { + it("template string with expression", () => { parseAndAssertSame("`${a}`"); }); - it("template string with multiple expressions", function () { + it("template string with multiple expressions", () => { parseAndAssertSame("`${a}${b}${c}`"); }); - it("template string with expression and strings", function () { + it("template string with expression and strings", () => { parseAndAssertSame("`a${a}a`"); }); - it("template string with binary expression", function () { + it("template string with binary expression", () => { parseAndAssertSame("`a${a + b}a`"); }); - it("tagged template", function () { + it("tagged template", () => { parseAndAssertSame("jsx``"); }); - it("tagged template with expression", function () { + it("tagged template with expression", () => { parseAndAssertSame("jsx``"); }); - it("tagged template with new operator", function () { + it("tagged template with new operator", () => { parseAndAssertSame("new raw`42`"); }); - it("template with nested function/object", function () { + it("template with nested function/object", () => { parseAndAssertSame("`outer${{x: {y: 10}}}bar${`nested${function(){return 1;}}endnest`}end`"); }); - it("template with braces inside and outside of template string #96", function () { + it("template with braces inside and outside of template string #96", () => { parseAndAssertSame("if (a) { var target = `{}a:${webpackPort}{}}}}`; } else { app.use(); }"); }); - it("template also with braces #96", function () { + it("template also with braces #96", () => { parseAndAssertSame( unpad(` export default function f1() { @@ -146,7 +146,7 @@ describe("babylon-to-esprima", function () { ); }); - it("template with destructuring #31", function () { + it("template with destructuring #31", () => { parseAndAssertSame( unpad(` module.exports = { @@ -160,103 +160,103 @@ describe("babylon-to-esprima", function () { }); }); - it("simple expression", function () { + it("simple expression", () => { parseAndAssertSame("a = 1"); }); - it("class declaration", function () { + it("class declaration", () => { parseAndAssertSame("class Foo {}"); }); - it("class expression", function () { + it("class expression", () => { parseAndAssertSame("var a = class Foo {}"); }); - it("jsx expression", function () { + it("jsx expression", () => { parseAndAssertSame(""); }); - it("jsx expression with 'this' as identifier", function () { + it("jsx expression with 'this' as identifier", () => { parseAndAssertSame(""); }); - it("jsx expression with a dynamic attribute", function () { + it("jsx expression with a dynamic attribute", () => { parseAndAssertSame(""); }); - it("jsx expression with a member expression as identifier", function () { + it("jsx expression with a member expression as identifier", () => { parseAndAssertSame(""); }); - it("jsx expression with spread", function () { + it("jsx expression with spread", () => { parseAndAssertSame("var myDivElement =
;"); }); - it("empty jsx text", function () { + it("empty jsx text", () => { parseAndAssertSame(""); }); - it("jsx text with content", function () { + it("jsx text with content", () => { parseAndAssertSame("Hello, world!"); }); - it("nested jsx", function () { + it("nested jsx", () => { parseAndAssertSame("
\n

Wat

\n
"); }); - it("default import", function () { + it("default import", () => { parseAndAssertSame("import foo from \"foo\";"); }); - it("import specifier", function () { + it("import specifier", () => { parseAndAssertSame("import { foo } from \"foo\";"); }); - it("import specifier with name", function () { + it("import specifier with name", () => { parseAndAssertSame("import { foo as bar } from \"foo\";"); }); - it("import bare", function () { + it("import bare", () => { parseAndAssertSame("import \"foo\";"); }); - it("export default class declaration", function () { + it("export default class declaration", () => { parseAndAssertSame("export default class Foo {}"); }); - it("export default class expression", function () { + it("export default class expression", () => { parseAndAssertSame("export default class {}"); }); - it("export default function declaration", function () { + it("export default function declaration", () => { parseAndAssertSame("export default function Foo() {}"); }); - it("export default function expression", function () { + it("export default function expression", () => { parseAndAssertSame("export default function () {}"); }); - it("export all", function () { + it("export all", () => { parseAndAssertSame("export * from \"foo\";"); }); - it("export named", function () { + it("export named", () => { parseAndAssertSame("export { foo };"); }); - it("export named alias", function () { + it("export named alias", () => { parseAndAssertSame("export { foo as bar };"); }); - it.skip("empty program with line comment", function () { + it.skip("empty program with line comment", () => { parseAndAssertSame("// single comment"); }); - it.skip("empty program with block comment", function () { + it.skip("empty program with block comment", () => { parseAndAssertSame(" /* multiline\n * comment\n*/"); }); - it("line comments", function () { + it("line comments", () => { parseAndAssertSame( unpad(` // single comment @@ -266,7 +266,7 @@ describe("babylon-to-esprima", function () { ); }); - it("block comments", function () { + it("block comments", () => { parseAndAssertSame( unpad(` /* single comment */ @@ -279,7 +279,7 @@ describe("babylon-to-esprima", function () { ); }); - it("block comments #124", function () { + it("block comments #124", () => { parseAndAssertSame( unpad(` React.createClass({ @@ -293,31 +293,31 @@ describe("babylon-to-esprima", function () { ); }); - it("null", function () { + it("null", () => { parseAndAssertSame("null"); }); - it("boolean", function () { + it("boolean", () => { parseAndAssertSame("if (true) {} else if (false) {}"); }); - it("regexp", function () { + it("regexp", () => { parseAndAssertSame("/affix-top|affix-bottom|affix|[a-z]/"); }); - it("regexp in a template string", function () { + it("regexp in a template string", () => { parseAndAssertSame("`${/\\d/.exec(\"1\")[0]}`"); }); - it("first line is empty", function () { + it("first line is empty", () => { parseAndAssertSame("\nimport Immutable from \"immutable\";"); }); - it("empty", function () { + it("empty", () => { parseAndAssertSame(""); }); - it("jsdoc", function () { + it("jsdoc", () => { parseAndAssertSame( unpad(` /** @@ -332,7 +332,7 @@ describe("babylon-to-esprima", function () { ); }); - it("empty block with comment", function () { + it("empty block with comment", () => { parseAndAssertSame( unpad(` function a () { @@ -346,8 +346,8 @@ describe("babylon-to-esprima", function () { ); }); - describe("babel 6 tests", function () { - it("MethodDefinition", function () { + describe("babel 6 tests", () => { + it("MethodDefinition", () => { parseAndAssertSame( unpad(` export default class A { @@ -357,11 +357,11 @@ describe("babylon-to-esprima", function () { ); }); - it("MethodDefinition 2", function () { + it("MethodDefinition 2", () => { parseAndAssertSame("export default class Bar { get bar() { return 42; }}"); }); - it("ClassMethod", function () { + it("ClassMethod", () => { parseAndAssertSame( unpad(` class A { @@ -372,7 +372,7 @@ describe("babylon-to-esprima", function () { ); }); - it("ClassMethod multiple params", function () { + it("ClassMethod multiple params", () => { parseAndAssertSame( unpad(` class A { @@ -383,7 +383,7 @@ describe("babylon-to-esprima", function () { ); }); - it("ClassMethod multiline", function () { + it("ClassMethod multiline", () => { parseAndAssertSame( unpad(` class A { @@ -401,11 +401,11 @@ describe("babylon-to-esprima", function () { ); }); - it("ClassMethod oneline", function () { + it("ClassMethod oneline", () => { parseAndAssertSame("class A { constructor(a, b, c) {} }"); }); - it("ObjectMethod", function () { + it("ObjectMethod", () => { parseAndAssertSame( unpad(` var a = { @@ -416,27 +416,27 @@ describe("babylon-to-esprima", function () { ); }); - it("do not allow import export everywhere", function() { - assert.throws(function () { + it("do not allow import export everywhere", () => { + assert.throws(() => { parseAndAssertSame("function F() { import a from \"a\"; }"); }, /SyntaxError: 'import' and 'export' may only appear at the top level/); }); - it("return outside function", function () { + it("return outside function", () => { parseAndAssertSame("return;"); }); - it("super outside method", function () { + it("super outside method", () => { parseAndAssertSame("function F() { super(); }"); }); - it("StringLiteral", function () { + it("StringLiteral", () => { parseAndAssertSame(""); parseAndAssertSame(""); parseAndAssertSame("a"); }); - it("getters and setters", function () { + it("getters and setters", () => { parseAndAssertSame("class A { get x ( ) { ; } }"); parseAndAssertSame( unpad(` @@ -475,19 +475,19 @@ describe("babylon-to-esprima", function () { ); }); - it("RestOperator", function () { + it("RestOperator", () => { parseAndAssertSame("var { a, ...b } = c"); parseAndAssertSame("var [ a, ...b ] = c"); parseAndAssertSame("var a = function (...b) {}"); }); - it("SpreadOperator", function () { + it("SpreadOperator", () => { parseAndAssertSame("var a = { b, ...c }"); parseAndAssertSame("var a = [ a, ...b ]"); parseAndAssertSame("var a = sum(...b)"); }); - it("Async/Await", function() { + it("Async/Await", () => { parseAndAssertSame( unpad(` async function a() { diff --git a/test/integration.js b/test/integration.js index 2e62188e..2814b4c3 100644 --- a/test/integration.js +++ b/test/integration.js @@ -24,7 +24,7 @@ var baseEslintOpts = { * @param function done */ function lint (opts, done) { - readFixture(opts.fixture, function (err, src) { + readFixture(opts.fixture, (err, src) => { if (err) return done(err); done(null, eslint.linter.verify(src, opts.eslint)); }); @@ -46,7 +46,7 @@ function readFixture (id, done) { } // readFixture -describe("Rules:", function () { +describe("Rules:", () => { describe("`strict`", strictSuite); }); // describe @@ -54,19 +54,19 @@ describe("Rules:", function () { function strictSuite () { var ruleId = "strict"; - describe("when set to 'never'", function () { + describe("when set to 'never'", () => { var eslintOpts = Object.assign({}, baseEslintOpts, { rules: {}, }); eslintOpts.rules[ruleId] = [errorLevel, "never"]; - ["global-with", "function-with"].forEach(function (fixture) { + ["global-with", "function-with"].forEach((fixture) => { it(`should error on ${fixture.match(/^[^-]+/)[0]} directive`, - function (done) { + (done) => { lint({ fixture: ["strict", fixture], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); assert(report[0].ruleId === ruleId); done(); @@ -78,17 +78,17 @@ function strictSuite () { }); // describe - describe("when set to 'global'", function () { + describe("when set to 'global'", () => { var eslintOpts = Object.assign({}, baseEslintOpts, { rules: {} }); eslintOpts.rules[ruleId] = [errorLevel, "global"]; - it("shouldn't error on single global directive", function (done) { + it("shouldn't error on single global directive", (done) => { lint({ fixture: ["strict", "global-with"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); assert(!report.length); done(); @@ -96,13 +96,13 @@ function strictSuite () { }); // it - it("should error twice on global directive: no and function directive: yes", function (done) { + it("should error twice on global directive: no and function directive: yes", (done) => { lint({ fixture: ["strict", "function-with"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); - [0, 1].forEach(function (i) { + [0, 1].forEach((i) => { assert(report[i].ruleId === ruleId); }); done(); @@ -110,11 +110,11 @@ function strictSuite () { }); // it - it("should error on function directive", function (done) { + it("should error on function directive", (done) => { lint({ fixture: ["strict", "global-with-function-with"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); assert(report[0].ruleId === ruleId); @@ -128,11 +128,11 @@ function strictSuite () { }); // it - it("should error on no directive", function (done) { + it("should error on no directive", (done) => { lint({ fixture: ["strict", "none"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); assert(report[0].ruleId === ruleId); done(); @@ -142,17 +142,17 @@ function strictSuite () { }); // describe - describe("when set to 'function'", function () { + describe("when set to 'function'", () => { var eslintOpts = Object.assign({}, baseEslintOpts, { rules: {} }); eslintOpts.rules[ruleId] = [errorLevel, "function"]; - it("shouldn't error on single function directive", function (done) { + it("shouldn't error on single function directive", (done) => { lint({ fixture: ["strict", "function-with"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); assert(!report.length); done(); @@ -160,13 +160,13 @@ function strictSuite () { }); // it - it("should error twice on function directive: no and global directive: yes", function (done) { + it("should error twice on function directive: no and global directive: yes", (done) => { lint({ fixture: ["strict", "global-with-function-without"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); - [0, 1].forEach(function (i) { + [0, 1].forEach((i) => { assert(report[i].ruleId === ruleId); }); done(); @@ -174,11 +174,11 @@ function strictSuite () { }); // it - it("should error on only global directive", function (done) { + it("should error on only global directive", (done) => { lint({ fixture: ["strict", "global-with"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); assert(report[0].ruleId === ruleId); done(); @@ -186,11 +186,11 @@ function strictSuite () { }); // it - it("should error on extraneous global directive", function (done) { + it("should error on extraneous global directive", (done) => { lint({ fixture: ["strict", "global-with-function-with"], eslint: eslintOpts, - }, function (err, report) { + }, (err, report) => { if (err) return done(err); assert(report[0].ruleId === ruleId); assert(report[0].nodeType.indexOf("Function") === -1); diff --git a/test/non-regression.js b/test/non-regression.js index e057fd07..52f30bc7 100644 --- a/test/non-regression.js +++ b/test/non-regression.js @@ -6,7 +6,7 @@ var unpad = require("../utils/unpad"); function verifyAndAssertMessages(code, rules, expectedMessages, sourceType, overrideConfig) { var config = { parser: require.resolve(".."), - rules: rules, + rules, env: { node: true, es6: true @@ -18,7 +18,7 @@ function verifyAndAssertMessages(code, rules, expectedMessages, sourceType, over experimentalObjectRestSpread: true, globalReturn: true }, - sourceType: sourceType + sourceType } }; @@ -34,7 +34,7 @@ function verifyAndAssertMessages(code, rules, expectedMessages, sourceType, over throw new Error(`Expected ${expectedMessages.length} message(s), got ${messages.length} ${JSON.stringify(messages)}`); } - messages.forEach(function (message, i) { + messages.forEach((message, i) => { var formatedMessage = `${message.line}:${message.column} ${message.message}${(message.ruleId ? ` ${message.ruleId}` : "")}`; if (formatedMessage !== expectedMessages[i]) { throw new Error( @@ -48,8 +48,8 @@ function verifyAndAssertMessages(code, rules, expectedMessages, sourceType, over }); } -describe("verify", function () { - it("arrow function support (issue #1)", function () { +describe("verify", () => { + it("arrow function support (issue #1)", () => { verifyAndAssertMessages( "describe('stuff', () => {});", {}, @@ -57,7 +57,7 @@ describe("verify", function () { ); }); - it("EOL validation (issue #2)", function () { + it("EOL validation (issue #2)", () => { verifyAndAssertMessages( "module.exports = \"something\";", { "eol-last": 1, "semi": 1 }, @@ -65,7 +65,7 @@ describe("verify", function () { ); }); - xit("Readable error messages (issue #3)", function () { + xit("Readable error messages (issue #3)", () => { verifyAndAssertMessages( "{ , res }", {}, @@ -73,7 +73,7 @@ describe("verify", function () { ); }); - it("Modules support (issue #5)", function () { + it("Modules support (issue #5)", () => { verifyAndAssertMessages( unpad(` import Foo from 'foo'; @@ -86,7 +86,7 @@ describe("verify", function () { ); }); - it("Rest parameters (issue #7)", function () { + it("Rest parameters (issue #7)", () => { verifyAndAssertMessages( "function foo(...args) { return args; }", { "no-undef": 1 }, @@ -94,7 +94,7 @@ describe("verify", function () { ); }); - it("Exported classes should be used (issue #8)", function () { + it("Exported classes should be used (issue #8)", () => { verifyAndAssertMessages( "class Foo {} module.exports = Foo;", { "no-unused-vars": 1 }, @@ -102,7 +102,7 @@ describe("verify", function () { ); }); - it("super keyword in class (issue #10)", function () { + it("super keyword in class (issue #10)", () => { verifyAndAssertMessages( "class Foo { constructor() { super() } }", { "no-undef": 1 }, @@ -110,7 +110,7 @@ describe("verify", function () { ); }); - it("Rest parameter in destructuring assignment (issue #11)", function () { + it("Rest parameter in destructuring assignment (issue #11)", () => { verifyAndAssertMessages( "const [a, ...rest] = ['1', '2', '3']; module.exports = rest;", { "no-undef": 1 }, @@ -118,7 +118,7 @@ describe("verify", function () { ); }); - it("JSX attribute names marked as variables (issue #12)", function () { + it("JSX attribute names marked as variables (issue #12)", () => { verifyAndAssertMessages( "module.exports =
", { "no-undef": 1 }, @@ -126,7 +126,7 @@ describe("verify", function () { ); }); - it("Multiple destructured assignment with compound properties (issue #16)", function () { + it("Multiple destructured assignment with compound properties (issue #16)", () => { verifyAndAssertMessages( "module.exports = { ...a.a, ...a.b };", { "no-dupe-keys": 1 }, @@ -134,7 +134,7 @@ describe("verify", function () { ); }); - it("Arrow function with non-block bodies (issue #20)", function () { + it("Arrow function with non-block bodies (issue #20)", () => { verifyAndAssertMessages( "\"use strict\"; () => 1", { "strict": [1, "global"] }, @@ -143,7 +143,7 @@ describe("verify", function () { ); }); - it("#242", function () { + it("#242", () => { verifyAndAssertMessages( "\"use strict\"; asdf;", { "no-irregular-whitespace": 1 }, @@ -152,7 +152,7 @@ describe("verify", function () { ); }); - it("await keyword (issue #22)", function () { + it("await keyword (issue #22)", () => { verifyAndAssertMessages( "async function foo() { await bar(); }", { "no-unused-expressions": 1 }, @@ -160,7 +160,7 @@ describe("verify", function () { ); }); - it("arrow functions (issue #27)", function () { + it("arrow functions (issue #27)", () => { verifyAndAssertMessages( "[1, 2, 3].map(i => i * 2);", { "func-names": 1, "space-before-blocks": 1 }, @@ -168,7 +168,7 @@ describe("verify", function () { ); }); - it("comment with padded-blocks (issue #33)", function () { + it("comment with padded-blocks (issue #33)", () => { verifyAndAssertMessages( unpad(` if (a) { @@ -181,8 +181,8 @@ describe("verify", function () { ); }); - describe("flow", function () { - it("check regular function", function () { + describe("flow", () => { + it("check regular function", () => { verifyAndAssertMessages( "function a(b, c) { b += 1; c += 1; return b + c; } a;", { "no-unused-vars": 1, "no-undef": 1 }, @@ -190,7 +190,7 @@ describe("verify", function () { ); }); - it("type alias", function () { + it("type alias", () => { verifyAndAssertMessages( "type SomeNewType = any;", { "no-undef": 1 }, @@ -198,7 +198,7 @@ describe("verify", function () { ); }); - it("type cast expression #102", function () { + it("type cast expression #102", () => { verifyAndAssertMessages( "for (let a of (a: Array)) {}", {}, @@ -206,7 +206,7 @@ describe("verify", function () { ); }); - it("multiple nullable type annotations and return #108", function () { + it("multiple nullable type annotations and return #108", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -222,7 +222,7 @@ describe("verify", function () { ); }); - it("type parameters", function () { + it("type parameters", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -235,7 +235,7 @@ describe("verify", function () { ); }); - it("nested type annotations", function () { + it("nested type annotations", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -249,7 +249,7 @@ describe("verify", function () { ); }); - it("type in var declaration", function () { + it("type in var declaration", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -261,7 +261,7 @@ describe("verify", function () { ); }); - it("object type annotation", function () { + it("object type annotation", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -273,7 +273,7 @@ describe("verify", function () { ); }); - it("object property types", function () { + it("object property types", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -288,7 +288,7 @@ describe("verify", function () { ); }); - it("namespaced types", function () { + it("namespaced types", () => { verifyAndAssertMessages( unpad(` var React = require('react-native'); @@ -306,7 +306,7 @@ describe("verify", function () { ); }); - it("ArrayTypeAnnotation", function () { + it("ArrayTypeAnnotation", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -317,7 +317,7 @@ describe("verify", function () { ); }); - it("ClassImplements", function () { + it("ClassImplements", () => { verifyAndAssertMessages( unpad(` import type Bar from 'foo'; @@ -328,7 +328,7 @@ describe("verify", function () { ); }); - it("type alias creates declaration + usage", function () { + it("type alias creates declaration + usage", () => { verifyAndAssertMessages( unpad(` type Foo = any; @@ -339,7 +339,7 @@ describe("verify", function () { ); }); - it("type alias with type parameters", function () { + it("type alias with type parameters", () => { verifyAndAssertMessages( unpad(` import type Bar from 'foo'; @@ -352,7 +352,7 @@ describe("verify", function () { ); }); - it("export type alias", function () { + it("export type alias", () => { verifyAndAssertMessages( unpad(` import type Foo2 from 'foo'; @@ -363,7 +363,7 @@ describe("verify", function () { ); }); - it("polymorphpic types #109", function () { + it("polymorphpic types #109", () => { verifyAndAssertMessages( "export default function groupByEveryN(array: Array, n: number): Array> { n; }", { "no-unused-vars": 1, "no-undef": 1 }, @@ -371,7 +371,7 @@ describe("verify", function () { ); }); - it("types definition from import", function () { + it("types definition from import", () => { verifyAndAssertMessages( unpad(` import type Promise from 'bluebird'; @@ -383,7 +383,7 @@ describe("verify", function () { ); }); - it("polymorphpic/generic types for class #123", function () { + it("polymorphpic/generic types for class #123", () => { verifyAndAssertMessages( unpad(` class Box { @@ -397,7 +397,7 @@ describe("verify", function () { ); }); - it("polymorphpic/generic types for function #123", function () { + it("polymorphpic/generic types for function #123", () => { verifyAndAssertMessages( unpad(` export function identity(value) { @@ -409,7 +409,7 @@ describe("verify", function () { ); }); - it("polymorphpic/generic types for type alias #123", function () { + it("polymorphpic/generic types for type alias #123", () => { verifyAndAssertMessages( unpad(` import Bar from './Bar'; @@ -420,7 +420,7 @@ describe("verify", function () { ); }); - it("polymorphpic/generic types - outside of fn scope #123", function () { + it("polymorphpic/generic types - outside of fn scope #123", () => { verifyAndAssertMessages( unpad(` export function foo(value) { value; }; @@ -432,7 +432,7 @@ describe("verify", function () { ); }); - it("polymorphpic/generic types - extending unknown #123", function () { + it("polymorphpic/generic types - extending unknown #123", () => { verifyAndAssertMessages( unpad(` import Bar from 'bar'; @@ -443,7 +443,7 @@ describe("verify", function () { ); }); - it("support declarations #132", function () { + it("support declarations #132", () => { verifyAndAssertMessages( unpad(` declare class A { static () : number } @@ -457,7 +457,7 @@ describe("verify", function () { ); }); - it("1", function () { + it("1", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -469,7 +469,7 @@ describe("verify", function () { ); }); - it("2", function () { + it("2", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -480,7 +480,7 @@ describe("verify", function () { ); }); - it("3", function () { + it("3", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -492,7 +492,7 @@ describe("verify", function () { ); }); - it("4", function () { + it("4", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -505,7 +505,7 @@ describe("verify", function () { ); }); - it("5", function () { + it("5", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -517,7 +517,7 @@ describe("verify", function () { ); }); - it("6", function () { + it("6", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -528,7 +528,7 @@ describe("verify", function () { ); }); - it("7", function () { + it("7", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -539,7 +539,7 @@ describe("verify", function () { ); }); - it("8", function () { + it("8", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -551,7 +551,7 @@ describe("verify", function () { ); }); - it("9", function () { + it("9", () => { verifyAndAssertMessages( "export default function (a: T1, b: T2) { b; }", { "no-unused-vars": 1, "no-undef": 1 }, @@ -559,7 +559,7 @@ describe("verify", function () { ); }); - it("10", function () { + it("10", () => { verifyAndAssertMessages( "var a=function(a: T1, b: T2) {return a + b;}; a;", { "no-unused-vars": 1, "no-undef": 1 }, @@ -567,7 +567,7 @@ describe("verify", function () { ); }); - it("11", function () { + it("11", () => { verifyAndAssertMessages( "var a={*id(x: T): T { x; }}; a;", { "no-unused-vars": 1, "no-undef": 1 }, @@ -575,7 +575,7 @@ describe("verify", function () { ); }); - it("12", function () { + it("12", () => { verifyAndAssertMessages( "var a={async id(x: T): T { x; }}; a;", { "no-unused-vars": 1, "no-undef": 1 }, @@ -583,7 +583,7 @@ describe("verify", function () { ); }); - it("13", function () { + it("13", () => { verifyAndAssertMessages( "var a={123(x: T): T { x; }}; a;", { "no-unused-vars": 1, "no-undef": 1 }, @@ -591,7 +591,7 @@ describe("verify", function () { ); }); - it("14", function () { + it("14", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -603,7 +603,7 @@ describe("verify", function () { ); }); - it("15", function () { + it("15", () => { verifyAndAssertMessages( unpad(` import type Foo2 from 'foo'; @@ -614,7 +614,7 @@ describe("verify", function () { ); }); - it("16", function () { + it("16", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -625,7 +625,7 @@ describe("verify", function () { ); }); - it("17", function () { + it("17", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -636,7 +636,7 @@ describe("verify", function () { ); }); - it("18", function () { + it("18", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -649,7 +649,7 @@ describe("verify", function () { ); }); - it("19", function () { + it("19", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -661,7 +661,7 @@ describe("verify", function () { ); }); - it("20", function () { + it("20", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -675,7 +675,7 @@ describe("verify", function () { ); }); - it("21", function () { + it("21", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -688,7 +688,7 @@ describe("verify", function () { ); }); - it("22", function () { + it("22", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -701,7 +701,7 @@ describe("verify", function () { ); }); - it("23", function () { + it("23", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -712,7 +712,7 @@ describe("verify", function () { ); }); - it("24", function () { + it("24", () => { verifyAndAssertMessages( unpad(` import type Baz from 'baz'; @@ -723,7 +723,7 @@ describe("verify", function () { ); }); - it("25", function () { + it("25", () => { verifyAndAssertMessages( "export default class Bar { bar(): T { return 42; }}", { "no-unused-vars": 1, "no-undef": 1 }, @@ -731,7 +731,7 @@ describe("verify", function () { ); }); - it("26", function () { + it("26", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -743,7 +743,7 @@ describe("verify", function () { ); }); - it("27", function () { + it("27", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -755,7 +755,7 @@ describe("verify", function () { ); }); - it("28", function () { + it("28", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -767,7 +767,7 @@ describe("verify", function () { ); }); - it("29", function () { + it("29", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -779,7 +779,7 @@ describe("verify", function () { ); }); - it("30", function () { + it("30", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -790,7 +790,7 @@ describe("verify", function () { ); }); - it("31", function () { + it("31", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -801,7 +801,7 @@ describe("verify", function () { ); }); - it("32", function () { + it("32", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -812,7 +812,7 @@ describe("verify", function () { ); }); - it("33", function () { + it("33", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -823,7 +823,7 @@ describe("verify", function () { ); }); - it("34", function () { + it("34", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -835,7 +835,7 @@ describe("verify", function () { ); }); - it("35", function () { + it("35", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -846,7 +846,7 @@ describe("verify", function () { ); }); - it("36", function () { + it("36", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -858,7 +858,7 @@ describe("verify", function () { ); }); - it("37", function () { + it("37", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -872,7 +872,7 @@ describe("verify", function () { ); }); - it("38", function () { + it("38", () => { verifyAndAssertMessages( unpad(` import type {foo, bar} from 'baz'; @@ -883,7 +883,7 @@ describe("verify", function () { ); }); - it("39", function () { + it("39", () => { verifyAndAssertMessages( unpad(` import type {foo as bar} from 'baz'; @@ -894,7 +894,7 @@ describe("verify", function () { ); }); - it("40", function () { + it("40", () => { verifyAndAssertMessages( unpad(` import type from 'foo'; @@ -905,7 +905,7 @@ describe("verify", function () { ); }); - it("41", function () { + it("41", () => { verifyAndAssertMessages( unpad(` import type, {foo} from 'bar'; @@ -916,7 +916,7 @@ describe("verify", function () { ); }); - it("42", function () { + it("42", () => { verifyAndAssertMessages( unpad(` import type * as namespace from 'bar'; @@ -927,7 +927,7 @@ describe("verify", function () { ); }); - it("43", function () { + it("43", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -938,7 +938,7 @@ describe("verify", function () { ); }); - it("44", function () { + it("44", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -949,7 +949,7 @@ describe("verify", function () { ); }); - it("45", function () { + it("45", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -960,7 +960,7 @@ describe("verify", function () { ); }); - it("46", function () { + it("46", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -971,7 +971,7 @@ describe("verify", function () { ); }); - it("47", function () { + it("47", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -982,7 +982,7 @@ describe("verify", function () { ); }); - it("48", function () { + it("48", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -993,7 +993,7 @@ describe("verify", function () { ); }); - it("49", function () { + it("49", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; @@ -1007,7 +1007,7 @@ describe("verify", function () { }); }); - it("class usage", function () { + it("class usage", () => { verifyAndAssertMessages( "class Lol {} module.exports = Lol;", { "no-unused-vars": 1 }, @@ -1015,7 +1015,7 @@ describe("verify", function () { ); }); - it("class definition: gaearon/redux#24", function () { + it("class definition: gaearon/redux#24", () => { verifyAndAssertMessages( unpad(` export default function root(stores) { @@ -1029,7 +1029,7 @@ describe("verify", function () { ); }); - it("class properties #71", function () { + it("class properties #71", () => { verifyAndAssertMessages( "class Lol { foo = 'bar'; }", { "no-undef": 1 }, @@ -1037,7 +1037,7 @@ describe("verify", function () { ); }); - it("template strings #31", function () { + it("template strings #31", () => { verifyAndAssertMessages( "console.log(`${a}, b`);", { "comma-spacing": 1 }, @@ -1045,7 +1045,7 @@ describe("verify", function () { ); }); - it("template with destructuring #31", function () { + it("template with destructuring #31", () => { verifyAndAssertMessages( unpad(` module.exports = { @@ -1060,8 +1060,8 @@ describe("verify", function () { ); }); - describe("decorators #72", function () { - it("class declaration", function () { + describe("decorators #72", () => { + it("class declaration", () => { verifyAndAssertMessages( unpad(` import classDeclaration from 'decorator'; @@ -1076,7 +1076,7 @@ describe("verify", function () { ); }); - it("method definition", function () { + it("method definition", () => { verifyAndAssertMessages( unpad(` import classMethodDeclarationA from 'decorator'; @@ -1095,7 +1095,7 @@ describe("verify", function () { ); }); - it("method definition get/set", function () { + it("method definition get/set", () => { verifyAndAssertMessages( unpad(` import classMethodDeclarationA from 'decorator'; @@ -1116,7 +1116,7 @@ describe("verify", function () { ); }); - it("object property", function () { + it("object property", () => { verifyAndAssertMessages( unpad(` import classMethodDeclarationA from 'decorator'; @@ -1136,7 +1136,7 @@ describe("verify", function () { ); }); - it("object property get/set", function () { + it("object property get/set", () => { verifyAndAssertMessages( unpad(` import classMethodDeclarationA from 'decorator'; @@ -1159,7 +1159,7 @@ describe("verify", function () { }); }); - it("detects minimal no-unused-vars case #120", function () { + it("detects minimal no-unused-vars case #120", () => { verifyAndAssertMessages( "var unused;", { "no-unused-vars": 1 }, @@ -1170,7 +1170,7 @@ describe("verify", function () { // This two tests are disabled, as the feature to visit properties when // there is a spread/rest operator has been removed as it caused problems // with other rules #249 - it.skip("visits excluded properties left of spread #95", function () { + it.skip("visits excluded properties left of spread #95", () => { verifyAndAssertMessages( "var originalObject = {}; var {field1, field2, ...clone} = originalObject;", { "no-unused-vars": 1 }, @@ -1178,7 +1178,7 @@ describe("verify", function () { ); }); - it.skip("visits excluded properties left of spread #210", function () { + it.skip("visits excluded properties left of spread #210", () => { verifyAndAssertMessages( "const props = { yo: 'yo' }; const { ...otherProps } = props;", { "no-unused-vars": 1 }, @@ -1186,7 +1186,7 @@ describe("verify", function () { ); }); - it("does not mark spread variables false-positive", function () { + it("does not mark spread variables false-positive", () => { verifyAndAssertMessages( "var originalObject = {}; var {field1, field2, ...clone} = originalObject;", { "no-undef": 1, "no-redeclare": 1 }, @@ -1194,7 +1194,7 @@ describe("verify", function () { ); }); - it("does not mark spread variables false-positive", function () { + it("does not mark spread variables false-positive", () => { verifyAndAssertMessages( "const props = { yo: 'yo' }; const { ...otherProps } = props;", { "no-undef": 1, "no-redeclare": 1 }, @@ -1202,7 +1202,7 @@ describe("verify", function () { ); }); - it("does not mark spread variables as use-before-define #249", function () { + it("does not mark spread variables as use-before-define #249", () => { verifyAndAssertMessages( "var originalObject = {}; var {field1, field2, ...clone} = originalObject;", { "no-use-before-define": 1 }, @@ -1210,7 +1210,7 @@ describe("verify", function () { ); }); - it("detects no-unused-vars with object destructuring #142", function () { + it("detects no-unused-vars with object destructuring #142", () => { verifyAndAssertMessages( "const {Bacona} = require('baconjs')", { "no-undef": 1, "no-unused-vars": 1 }, @@ -1218,7 +1218,7 @@ describe("verify", function () { ); }); - it("don't warn no-unused-vars with spread #142", function () { + it("don't warn no-unused-vars with spread #142", () => { verifyAndAssertMessages( unpad(` export default function test(data) { @@ -1233,7 +1233,7 @@ describe("verify", function () { ); }); - it("excludes comment tokens #153", function () { + it("excludes comment tokens #153", () => { verifyAndAssertMessages( unpad(` var a = [ @@ -1258,7 +1258,7 @@ describe("verify", function () { ); }); - it("ternary and parens #149", function () { + it("ternary and parens #149", () => { verifyAndAssertMessages( "true ? (true) : false;", { "space-infix-ops": 1 }, @@ -1266,7 +1266,7 @@ describe("verify", function () { ); }); - it("line comment space-in-parens #124", function () { + it("line comment space-in-parens #124", () => { verifyAndAssertMessages( unpad(` React.createClass({ @@ -1282,7 +1282,7 @@ describe("verify", function () { ); }); - it("block comment space-in-parens #124", function () { + it("block comment space-in-parens #124", () => { verifyAndAssertMessages( unpad(` React.createClass({ @@ -1300,21 +1300,21 @@ describe("verify", function () { ); }); - it("no no-undef error with rest #11", function () { + it("no no-undef error with rest #11", () => { verifyAndAssertMessages("const [a, ...rest] = ['1', '2', '3']; a; rest;", { "no-undef": 1, "no-unused-vars": 1 }, [ ] ); }); - it("async function with space-before-function-paren #168", function () { + it("async function with space-before-function-paren #168", () => { verifyAndAssertMessages("it('handles updates', async function() {});", { "space-before-function-paren": [1, "never"] }, [ ] ); }); - it("default param flow type no-unused-vars #184", function () { + it("default param flow type no-unused-vars #184", () => { verifyAndAssertMessages( unpad(` type ResolveOptionType = { @@ -1333,7 +1333,7 @@ describe("verify", function () { ); }); - it("no-use-before-define #192", function () { + it("no-use-before-define #192", () => { verifyAndAssertMessages( unpad(` console.log(x); @@ -1344,7 +1344,7 @@ describe("verify", function () { ); }); - it("jsx and stringliteral #216", function () { + it("jsx and stringliteral #216", () => { verifyAndAssertMessages( "
", {}, @@ -1352,7 +1352,7 @@ describe("verify", function () { ); }); - it("getter/setter #218", function () { + it("getter/setter #218", () => { verifyAndAssertMessages( unpad(` class Person { @@ -1364,7 +1364,7 @@ describe("verify", function () { ); }); - it("getter/setter #220", function () { + it("getter/setter #220", () => { verifyAndAssertMessages( unpad(` var B = { @@ -1381,7 +1381,7 @@ describe("verify", function () { ); }); - it("fixes issues with flow types and ObjectPattern", function () { + it("fixes issues with flow types and ObjectPattern", () => { verifyAndAssertMessages( unpad(` import type Foo from 'bar'; @@ -1395,7 +1395,7 @@ describe("verify", function () { ); }); - it("correctly detects redeclares if in script mode #217", function () { + it("correctly detects redeclares if in script mode #217", () => { verifyAndAssertMessages( unpad(` var a = 321; @@ -1407,7 +1407,7 @@ describe("verify", function () { ); }); - it("correctly detects redeclares if in module mode #217", function () { + it("correctly detects redeclares if in module mode #217", () => { verifyAndAssertMessages( unpad(` var a = 321; @@ -1419,7 +1419,7 @@ describe("verify", function () { ); }); - it("no-implicit-globals in script", function () { + it("no-implicit-globals in script", () => { verifyAndAssertMessages( "var leakedGlobal = 1;", { "no-implicit-globals": 1 }, @@ -1432,7 +1432,7 @@ describe("verify", function () { ); }); - it("no-implicit-globals in module", function () { + it("no-implicit-globals in module", () => { verifyAndAssertMessages( "var leakedGlobal = 1;", { "no-implicit-globals": 1 }, @@ -1445,7 +1445,7 @@ describe("verify", function () { ); }); - it("no-implicit-globals in default", function () { + it("no-implicit-globals in default", () => { verifyAndAssertMessages( "var leakedGlobal = 1;", { "no-implicit-globals": 1 }, @@ -1458,7 +1458,7 @@ describe("verify", function () { ); }); - it("allowImportExportEverywhere option (#327)", function () { + it("allowImportExportEverywhere option (#327)", () => { verifyAndAssertMessages( unpad(` if (true) { import Foo from 'foo'; } @@ -1475,7 +1475,7 @@ describe("verify", function () { ); }); - it("with does not crash parsing in script mode (strict off) #171", function () { + it("with does not crash parsing in script mode (strict off) #171", () => { verifyAndAssertMessages( "with (arguments) { length; }", {}, @@ -1484,7 +1484,7 @@ describe("verify", function () { ); }); - xit("with does crash parsing in module mode (strict on) #171", function () { + xit("with does crash parsing in module mode (strict on) #171", () => { verifyAndAssertMessages( "with (arguments) { length; }", {}, @@ -1492,7 +1492,7 @@ describe("verify", function () { ); }); - it("new.target is not reported as undef #235", function () { + it("new.target is not reported as undef #235", () => { verifyAndAssertMessages( "function foo () { return new.target }", { "no-undef": 1 }, @@ -1500,7 +1500,7 @@ describe("verify", function () { ); }); - it("decorator does not create TypeError #229", function () { + it("decorator does not create TypeError #229", () => { verifyAndAssertMessages( unpad(` class A { @@ -1513,7 +1513,7 @@ describe("verify", function () { ); }); - it("Flow definition does not trigger warnings #223", function () { + it("Flow definition does not trigger warnings #223", () => { verifyAndAssertMessages( unpad(` import { Map as $Map } from 'immutable'; @@ -1524,7 +1524,7 @@ describe("verify", function () { ); }); - it("newline-before-return with comments #289", function () { + it("newline-before-return with comments #289", () => { verifyAndAssertMessages( unpad(` function a() { @@ -1542,7 +1542,7 @@ describe("verify", function () { ); }); - it("spaced-comment with shebang #163", function () { + it("spaced-comment with shebang #163", () => { verifyAndAssertMessages( unpad(` #!/usr/bin/env babel-node @@ -1553,8 +1553,8 @@ describe("verify", function () { ); }); - describe("Class Property Declarations", function() { - it("no-redeclare false positive 1", function() { + describe("Class Property Declarations", () => { + it("no-redeclare false positive 1", () => { verifyAndAssertMessages( unpad(` class Group { @@ -1569,7 +1569,7 @@ describe("verify", function () { ); }); - it("no-redeclare false positive 2", function() { + it("no-redeclare false positive 2", () => { verifyAndAssertMessages( unpad(` function validate() {} @@ -1582,7 +1582,7 @@ describe("verify", function () { ); }); - it("check references", function() { + it("check references", () => { verifyAndAssertMessages( unpad(` var a; @@ -1601,7 +1601,7 @@ describe("verify", function () { }); }); - it("dynamic import support", function () { + it("dynamic import support", () => { verifyAndAssertMessages( "import('test-module').then(() => {})", {}, From 0e5aca3fa81347c40f1fe638bef70e6d8d01f034 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Sun, 15 Jan 2017 06:59:51 -0500 Subject: [PATCH 07/16] chore(package): update eslint-config-babel to version 6.0.0 (#433) * chore(package): update eslint-config-babel to version 6.0.0 Closes #432 https://greenkeeper.io/ * Fix linting --- .gitignore | 1 - package.json | 2 +- test/babel-eslint.js | 4 +- test/non-regression.js | 2 +- yarn.lock | 1013 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 1017 insertions(+), 5 deletions(-) create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore index 2d6ddb5d..93f13619 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ node_modules npm-debug.log -yarn.lock diff --git a/package.json b/package.json index a9ba5345..5c616f90 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "devDependencies": { "babel-eslint": "^7.0.0", "eslint": "^3.9.1", - "eslint-config-babel": "^4.0.0", + "eslint-config-babel": "^6.0.0", "eslint-plugin-babel": "^4.0.0", "eslint-plugin-flowtype": "^2.4.0", "espree": "^3.3.1", diff --git a/test/babel-eslint.js b/test/babel-eslint.js index 62463f44..41586c09 100644 --- a/test/babel-eslint.js +++ b/test/babel-eslint.js @@ -73,9 +73,9 @@ function parseAndAssertSame(code) { } err.message += unpad(` espree: - ${util.inspect(lookup(esAST, traversal, 2), {depth: err.depth, colors: true})} + ${util.inspect(lookup(esAST, traversal, 2), { depth: err.depth, colors: true })} babel-eslint: - ${util.inspect(lookup(babylonAST, traversal, 2), {depth: err.depth, colors: true})} + ${util.inspect(lookup(babylonAST, traversal, 2), { depth: err.depth, colors: true })} `); throw err; } diff --git a/test/non-regression.js b/test/non-regression.js index 52f30bc7..ee8c03a9 100644 --- a/test/non-regression.js +++ b/test/non-regression.js @@ -1359,7 +1359,7 @@ describe("verify", () => { set a (v) { } } `), - { "space-before-function-paren": 1, "keyword-spacing": [1, {"before": true}], "indent": 1 }, + { "space-before-function-paren": 1, "keyword-spacing": [1, { "before": true }], "indent": 1 }, [] ); }); diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..5cfc9dba --- /dev/null +++ b/yarn.lock @@ -0,0 +1,1013 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +acorn-jsx@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" + dependencies: + acorn "^3.0.4" + +acorn@^3.0.4: + version "3.3.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + +acorn@^4.0.1: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + +ajv-keywords@^1.0.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.0.tgz#c11e6859eafff83e0dafc416929472eca946aa2c" + +ajv@^4.7.0: + version "4.10.4" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.10.4.tgz#c0974dd00b3464984892d6010aa9c2c945933254" + dependencies: + co "^4.6.0" + json-stable-stringify "^1.0.1" + +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^2.0.0" + +babel-eslint@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2" + dependencies: + babel-code-frame "^6.16.0" + babel-traverse "^6.15.0" + babel-types "^6.15.0" + babylon "^6.13.0" + lodash.pickby "^4.6.0" + +babel-messages@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" + dependencies: + babel-runtime "^6.0.0" + +babel-runtime@^6.0.0, babel-runtime@^6.20.0: + version "6.20.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + +babel-traverse@^6.15.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" + dependencies: + babel-code-frame "^6.20.0" + babel-messages "^6.8.0" + babel-runtime "^6.20.0" + babel-types "^6.21.0" + babylon "^6.11.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-types@^6.15.0, babel-types@^6.21.0: + version "6.21.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" + dependencies: + babel-runtime "^6.20.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + +babylon@^6.11.0, babylon@^6.13.0: + version "6.15.0" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" + +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +browser-stdout@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +caller-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + dependencies: + callsites "^0.2.0" + +callsites@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + +chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +circular-json@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" + +cli-cursor@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + +cli-width@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" + +co@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +commander@2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.6: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +core-js@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.4.1.tgz#4de911e667b0eae9124e34254b53aea6fc618d3e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +d@^0.1.1, d@~0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" + dependencies: + es5-ext "~0.10.2" + +debug@2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +debug@^2.1.1, debug@^2.2.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" + dependencies: + ms "0.7.2" + +deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + +del@^2.0.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" + dependencies: + globby "^5.0.0" + is-path-cwd "^1.0.0" + is-path-in-cwd "^1.0.0" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + rimraf "^2.2.8" + +diff@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" + +doctrine@^1.2.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + +es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: + version "0.10.12" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" + dependencies: + es6-iterator "2" + es6-symbol "~3.1" + +es6-iterator@2: + version "2.0.0" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" + dependencies: + d "^0.1.1" + es5-ext "^0.10.7" + es6-symbol "3" + +es6-map@^0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-set "~0.1.3" + es6-symbol "~3.1.0" + event-emitter "~0.3.4" + +es6-set@~0.1.3: + version "0.1.4" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + es6-iterator "2" + es6-symbol "3" + event-emitter "~0.3.4" + +es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" + dependencies: + d "~0.1.1" + es5-ext "~0.10.11" + +es6-weak-map@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + dependencies: + d "^0.1.1" + es5-ext "^0.10.8" + es6-iterator "2" + es6-symbol "3" + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +escope@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" + dependencies: + es6-map "^0.1.3" + es6-weak-map "^2.0.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-config-babel@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-6.0.0.tgz#66feedf6ce6e04abe585cec1a65b5bcc96bed50a" + +eslint-plugin-babel@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.0.0.tgz#a92114e2c493ac3034b030d7ecf96e174a76ef3f" + +eslint-plugin-flowtype@^2.4.0: + version "2.29.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.29.2.tgz#91b4fde0400c4c37ca4440b43bdbc95fc405bea9" + dependencies: + lodash "^4.15.0" + +eslint@^3.9.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.13.1.tgz#564d2646b5efded85df96985332edd91a23bff25" + dependencies: + babel-code-frame "^6.16.0" + chalk "^1.1.3" + concat-stream "^1.4.6" + debug "^2.1.1" + doctrine "^1.2.2" + escope "^3.6.0" + espree "^3.3.1" + estraverse "^4.2.0" + esutils "^2.0.2" + file-entry-cache "^2.0.0" + glob "^7.0.3" + globals "^9.14.0" + ignore "^3.2.0" + imurmurhash "^0.1.4" + inquirer "^0.12.0" + is-my-json-valid "^2.10.0" + is-resolvable "^1.0.0" + js-yaml "^3.5.1" + json-stable-stringify "^1.0.0" + levn "^0.3.0" + lodash "^4.0.0" + mkdirp "^0.5.0" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.1" + pluralize "^1.2.1" + progress "^1.1.8" + require-uncached "^1.0.2" + shelljs "^0.7.5" + strip-bom "^3.0.0" + strip-json-comments "~2.0.1" + table "^3.7.8" + text-table "~0.2.0" + user-home "^2.0.0" + +espree@^3.3.1: + version "3.3.2" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" + dependencies: + acorn "^4.0.1" + acorn-jsx "^3.0.0" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +esrecurse@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" + dependencies: + estraverse "~4.1.0" + object-assign "^4.0.1" + +estraverse@^4.1.1, estraverse@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + +estraverse@~4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.1.1.tgz#f6caca728933a850ef90661d0e17982ba47111a2" + +esutils@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + +event-emitter@~0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" + dependencies: + d "~0.1.1" + es5-ext "~0.10.7" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + +fast-levenshtein@~2.0.4: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-entry-cache@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361" + dependencies: + flat-cache "^1.2.1" + object-assign "^4.0.1" + +flat-cache@^1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96" + dependencies: + circular-json "^0.3.1" + del "^2.0.2" + graceful-fs "^4.1.2" + write "^0.2.1" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +generate-function@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" + +generate-object-property@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/generate-object-property/-/generate-object-property-1.2.0.tgz#9c0e1c40308ce804f4783618b937fa88f99d50d0" + dependencies: + is-property "^1.0.0" + +glob@7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globals@^9.0.0, globals@^9.14.0: + version "9.14.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" + +globby@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +growl@1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +ignore@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@^2.0.3, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +inquirer@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" + dependencies: + ansi-escapes "^1.1.0" + ansi-regex "^2.0.0" + chalk "^1.0.0" + cli-cursor "^1.0.1" + cli-width "^2.0.0" + figures "^1.3.5" + lodash "^4.3.0" + readline2 "^1.0.1" + run-async "^0.1.0" + rx-lite "^3.1.2" + string-width "^1.0.1" + strip-ansi "^3.0.0" + through "^2.3.6" + +interpret@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c" + +invariant@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + dependencies: + loose-envify "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + +is-my-json-valid@^2.10.0: + version "2.15.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + dependencies: + generate-function "^2.0.0" + generate-object-property "^1.1.0" + jsonpointer "^4.0.0" + xtend "^4.0.0" + +is-path-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" + +is-path-in-cwd@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc" + dependencies: + is-path-inside "^1.0.0" + +is-path-inside@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + dependencies: + path-is-inside "^1.0.1" + +is-property@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" + +is-resolvable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62" + dependencies: + tryit "^1.0.1" + +isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +js-tokens@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" + +js-yaml@^3.5.1: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +json3@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +jsonpointer@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/jsonpointer/-/jsonpointer-4.0.1.tgz#4fd92cb34e0e9db3c89c8622ecf51f9b978c6cb9" + +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +lodash._baseassign@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" + dependencies: + lodash._basecopy "^3.0.0" + lodash.keys "^3.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basecreate@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash.create@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" + dependencies: + lodash._baseassign "^3.0.0" + lodash._basecreate "^3.0.0" + lodash._isiterateecall "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.pickby@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" + +lodash@^4.0.0, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0: + version "4.17.4" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" + +loose-envify@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8" + dependencies: + js-tokens "^2.0.0" + +minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +mocha@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-3.2.0.tgz#7dc4f45e5088075171a68896814e6ae9eb7a85e3" + dependencies: + browser-stdout "1.3.0" + commander "2.9.0" + debug "2.2.0" + diff "1.4.0" + escape-string-regexp "1.0.5" + glob "7.0.5" + growl "1.9.2" + json3 "3.3.2" + lodash.create "3.1.1" + mkdirp "0.5.1" + supports-color "3.1.2" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +mute-stream@0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optionator@^0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.4" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + wordwrap "~1.0.0" + +os-homedir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-is-inside@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +pluralize@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +progress@^1.1.8: + version "1.1.8" + resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" + +readable-stream@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readline2@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + mute-stream "0.0.5" + +rechoir@^0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + dependencies: + resolve "^1.1.6" + +regenerator-runtime@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" + +require-uncached@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + dependencies: + caller-path "^0.1.0" + resolve-from "^1.0.0" + +resolve-from@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + +resolve@^1.1.6: + version "1.2.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" + +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + +rimraf@^2.2.8: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + +run-async@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" + dependencies: + once "^1.3.0" + +rx-lite@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" + +shelljs@^0.7.5: + version "0.7.6" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" + dependencies: + glob "^7.0.0" + interpret "^1.0.0" + rechoir "^0.6.2" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +string-width@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string-width@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^3.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +supports-color@3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" + dependencies: + has-flag "^1.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +table@^3.7.8: + version "3.8.3" + resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" + dependencies: + ajv "^4.7.0" + ajv-keywords "^1.0.0" + chalk "^1.1.1" + lodash "^4.0.0" + slice-ansi "0.0.4" + string-width "^2.0.0" + +text-table@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + +through@^2.3.6: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + +to-fast-properties@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" + +tryit@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + dependencies: + prelude-ls "~1.1.2" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +user-home@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" + dependencies: + os-homedir "^1.0.0" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +wordwrap@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +write@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757" + dependencies: + mkdirp "^0.5.1" + +xtend@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" From 52b4a138a06eefe4a482fd5438937dd54cf272ab Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Tue, 28 Feb 2017 23:39:49 -0500 Subject: [PATCH 08/16] update readme [skip ci] --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1e38efd2..ab69d9eb 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,11 @@ **babel-eslint** allows you to lint **ALL** valid Babel code with the fantastic [ESLint](https://github.com/eslint/eslint). -#### Note: You don't need to use babel-eslint if you are using ES2015 (ES6), ES2016 (ES7) or ES2017 (ES8). ESLint actually supports ES2015/ES2016/ES2017, JSX, and object rest/spread by default now. +### Why Use babel-eslint -##### At the moment, you'll need it if you use stuff like class properties, decorators, types. +You only need to use babel-eslint if you are using types (Flow) or experimental features not supported in ESLint itself yet. Otherwise try the default parser (you don't have to use it just because you are using Babel). + +--- > If there is an issue, first check if it can be reproduced with the regular parser or with the latest versions of `eslint` and `babel-eslint`! @@ -43,21 +45,19 @@ It just needs to export a `parse` method that takes in a string of code and outp ## Usage +> ESLint 1.x | Use <= 5.x + +> ESLint 2.x | Use >= 6.x + ### Supported ESLint versions ESLint | babel-eslint ------------ | ------------- -1.x | <= 5.x -2.x | >= 6.x 3.x | >= 6.x ### Install ```sh -$ npm install eslint@1.x babel-eslint@5 --save-dev - -$ npm install eslint@2.x babel-eslint@6 --save-dev - $ npm install eslint@3.x babel-eslint@6 --save-dev ``` From bdeb86f0d02af714bffee5b319844fc623414c6d Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Tue, 28 Feb 2017 23:41:03 -0500 Subject: [PATCH 09/16] remove deprecated rule examples [skip ci] --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ab69d9eb..ff6e41a5 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,7 @@ Modules/strict mode Please check out [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) for React/JSX issues - `no-unused-vars` with jsx -Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues such as (and more): -- `generator-star` with async/await functions [#78](https://github.com/babel/babel-eslint/issues/78) -- `object-shorthand` with spread operator [#131](https://github.com/babel/babel-eslint/issues/131) +Please check out [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) for other issues ## How does it work? From 6b4c4ca36a9d1930468fb105c1d88fa4d908c315 Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Sat, 11 Mar 2017 22:15:47 -0500 Subject: [PATCH 10/16] Upgrade outdated dependencies --- package.json | 16 ++++---- yarn.lock | 113 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 80 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index 5c616f90..64bcfec3 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "url": "https://github.com/babel/babel-eslint.git" }, "dependencies": { - "babel-code-frame": "^6.16.0", - "babel-traverse": "^6.15.0", - "babel-types": "^6.15.0", - "babylon": "^6.13.0", + "babel-code-frame": "^6.22.0", + "babel-traverse": "^6.23.1", + "babel-types": "^6.23.0", + "babylon": "^6.16.1", "lodash.pickby": "^4.6.0" }, "scripts": { @@ -39,11 +39,11 @@ "homepage": "https://github.com/babel/babel-eslint", "devDependencies": { "babel-eslint": "^7.0.0", - "eslint": "^3.9.1", + "eslint": "^3.17.1", "eslint-config-babel": "^6.0.0", - "eslint-plugin-babel": "^4.0.0", - "eslint-plugin-flowtype": "^2.4.0", - "espree": "^3.3.1", + "eslint-plugin-babel": "^4.1.1", + "eslint-plugin-flowtype": "^2.30.3", + "espree": "^3.4.0", "mocha": "^3.0.0" } } diff --git a/yarn.lock b/yarn.lock index 5cfc9dba..baea50f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8,14 +8,14 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" +acorn@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^4.0.1: - version "4.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" - ajv-keywords@^1.0.0: version "1.5.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.0.tgz#c11e6859eafff83e0dafc416929472eca946aa2c" @@ -67,6 +67,14 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: esutils "^2.0.2" js-tokens "^2.0.0" +babel-code-frame@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" + dependencies: + chalk "^1.1.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + babel-eslint@^7.0.0: version "7.1.1" resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.1.1.tgz#8a6a884f085aa7060af69cfc77341c2f99370fb2" @@ -77,6 +85,12 @@ babel-eslint@^7.0.0: babylon "^6.13.0" lodash.pickby "^4.6.0" +babel-messages@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + dependencies: + babel-runtime "^6.22.0" + babel-messages@^6.8.0: version "6.8.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" @@ -90,6 +104,13 @@ babel-runtime@^6.0.0, babel-runtime@^6.20.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" +babel-runtime@^6.22.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" + dependencies: + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + babel-traverse@^6.15.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" @@ -104,6 +125,20 @@ babel-traverse@^6.15.0: invariant "^2.2.0" lodash "^4.2.0" +babel-traverse@^6.23.1: + version "6.23.1" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" + dependencies: + babel-code-frame "^6.22.0" + babel-messages "^6.23.0" + babel-runtime "^6.22.0" + babel-types "^6.23.0" + babylon "^6.15.0" + debug "^2.2.0" + globals "^9.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + babel-types@^6.15.0, babel-types@^6.21.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" @@ -113,10 +148,23 @@ babel-types@^6.15.0, babel-types@^6.21.0: lodash "^4.2.0" to-fast-properties "^1.0.1" +babel-types@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" + dependencies: + babel-runtime "^6.22.0" + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^1.0.1" + babylon@^6.11.0, babylon@^6.13.0: version "6.15.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" +babylon@^6.15.0, babylon@^6.16.1: + version "6.16.1" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" + balanced-match@^0.4.1: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" @@ -210,18 +258,12 @@ d@^0.1.1, d@~0.1.1: dependencies: es5-ext "~0.10.2" -debug@2.2.0: +debug@2.2.0, debug@^2.1.1, debug@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" -debug@^2.1.1, debug@^2.2.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.0.tgz#bc596bcabe7617f11d9fa15361eded5608b8499b" - dependencies: - ms "0.7.2" - deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -318,19 +360,19 @@ eslint-config-babel@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-6.0.0.tgz#66feedf6ce6e04abe585cec1a65b5bcc96bed50a" -eslint-plugin-babel@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.0.0.tgz#a92114e2c493ac3034b030d7ecf96e174a76ef3f" +eslint-plugin-babel@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.1.1.tgz#ef285c87039b67beb3bbd227f5b0eed4fb376b87" -eslint-plugin-flowtype@^2.4.0: - version "2.29.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.29.2.tgz#91b4fde0400c4c37ca4440b43bdbc95fc405bea9" +eslint-plugin-flowtype@^2.30.3: + version "2.30.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.30.3.tgz#57835d2c0ed388da7a2725803ec32af2f437c301" dependencies: lodash "^4.15.0" -eslint@^3.9.1: - version "3.13.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.13.1.tgz#564d2646b5efded85df96985332edd91a23bff25" +eslint@^3.17.1: + version "3.17.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.17.1.tgz#b80ae12d9c406d858406fccda627afce33ea10ea" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" @@ -338,7 +380,7 @@ eslint@^3.9.1: debug "^2.1.1" doctrine "^1.2.2" escope "^3.6.0" - espree "^3.3.1" + espree "^3.4.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -367,11 +409,11 @@ eslint@^3.9.1: text-table "~0.2.0" user-home "^2.0.0" -espree@^3.3.1: - version "3.3.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.3.2.tgz#dbf3fadeb4ecb4d4778303e50103b3d36c88b89c" +espree@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.0.tgz#41656fa5628e042878025ef467e78f125cb86e1d" dependencies: - acorn "^4.0.1" + acorn "4.0.4" acorn-jsx "^3.0.0" esprima@^2.6.0: @@ -449,7 +491,7 @@ generate-object-property@^1.1.0: dependencies: is-property "^1.0.0" -glob@7.0.5: +glob@7.0.5, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: version "7.0.5" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" dependencies: @@ -460,17 +502,6 @@ glob@7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - globals@^9.0.0, globals@^9.14.0: version "9.14.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" @@ -608,6 +639,10 @@ js-tokens@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" +js-tokens@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" + js-yaml@^3.5.1: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" @@ -737,10 +772,6 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" -ms@0.7.2: - version "0.7.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" - mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" From 702d6b8279549df555451e4fe64173eb4b803327 Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Mon, 20 Mar 2017 10:27:28 -0400 Subject: [PATCH 11/16] Remove broken ESLint tests --- eslint | 1 - package.json | 2 -- 2 files changed, 3 deletions(-) delete mode 160000 eslint diff --git a/eslint b/eslint deleted file mode 160000 index fdce86d2..00000000 --- a/eslint +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fdce86d24e30a31c0c819262b72ab6b454cb552a diff --git a/package.json b/package.json index 64bcfec3..e5d595ef 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,6 @@ "lodash.pickby": "^4.6.0" }, "scripts": { - "bootstrap": "git submodule update --init && cd eslint && npm install", - "eslint": "cd eslint && mocha -c tests/lib/rules/*.js -r ../eslint-tester.js", "test": "npm run lint && npm run test-only", "test-only": "mocha", "lint": "eslint index.js babylon-to-espree test", From b49ab204a2091861f9645ce95e019ee88a9b08eb Mon Sep 17 00:00:00 2001 From: Kai Cataldo Date: Mon, 20 Mar 2017 10:33:14 -0400 Subject: [PATCH 12/16] Updates ESLint version/remove unnecessary config --- .eslintrc.js | 4 - eslint-tester.js | 6 - package.json | 3 +- yarn.lock | 282 ++++++++++++++++++++++------------------------- 4 files changed, 131 insertions(+), 164 deletions(-) delete mode 100644 eslint-tester.js diff --git a/.eslintrc.js b/.eslintrc.js index 1f91933f..20f31f1e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,10 +1,6 @@ module.exports = { root: true, extends: "babel", - parserOptions: { - ecmaVersion: 7, - sourceType: "module" - }, rules: { "no-var": 0, "max-len": 0 diff --git a/eslint-tester.js b/eslint-tester.js deleted file mode 100644 index 905a625d..00000000 --- a/eslint-tester.js +++ /dev/null @@ -1,6 +0,0 @@ -var ESLintTester = require("./eslint").RuleTester; - -console.log("Use babel-eslint for test suite"); -ESLintTester.setDefaultConfig({ - parser: "../../index" -}); diff --git a/package.json b/package.json index e5d595ef..9babfaba 100644 --- a/package.json +++ b/package.json @@ -37,9 +37,8 @@ "homepage": "https://github.com/babel/babel-eslint", "devDependencies": { "babel-eslint": "^7.0.0", - "eslint": "^3.17.1", + "eslint": "^3.18.0", "eslint-config-babel": "^6.0.0", - "eslint-plugin-babel": "^4.1.1", "eslint-plugin-flowtype": "^2.30.3", "espree": "^3.4.0", "mocha": "^3.0.0" diff --git a/yarn.lock b/yarn.lock index baea50f7..b17637e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17,12 +17,12 @@ acorn@^3.0.4: resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" ajv-keywords@^1.0.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.0.tgz#c11e6859eafff83e0dafc416929472eca946aa2c" + version "1.5.1" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" ajv@^4.7.0: - version "4.10.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.10.4.tgz#c0974dd00b3464984892d6010aa9c2c945933254" + version "4.11.5" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" @@ -59,15 +59,7 @@ arrify@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" -babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.20.0.tgz#b968f839090f9a8bc6d41938fb96cb84f7387b26" - dependencies: - chalk "^1.1.0" - esutils "^2.0.2" - js-tokens "^2.0.0" - -babel-code-frame@^6.22.0: +babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -91,19 +83,6 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-messages@^6.8.0: - version "6.8.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" - dependencies: - babel-runtime "^6.0.0" - -babel-runtime@^6.0.0, babel-runtime@^6.20.0: - version "6.20.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.20.0.tgz#87300bdcf4cd770f09bf0048c64204e17806d16f" - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.10.0" - babel-runtime@^6.22.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.23.0.tgz#0a9489f144de70efb3ce4300accdb329e2fc543b" @@ -111,21 +90,7 @@ babel-runtime@^6.22.0: core-js "^2.4.0" regenerator-runtime "^0.10.0" -babel-traverse@^6.15.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.21.0.tgz#69c6365804f1a4f69eb1213f85b00a818b8c21ad" - dependencies: - babel-code-frame "^6.20.0" - babel-messages "^6.8.0" - babel-runtime "^6.20.0" - babel-types "^6.21.0" - babylon "^6.11.0" - debug "^2.2.0" - globals "^9.0.0" - invariant "^2.2.0" - lodash "^4.2.0" - -babel-traverse@^6.23.1: +babel-traverse@^6.15.0, babel-traverse@^6.23.1: version "6.23.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.23.1.tgz#d3cb59010ecd06a97d81310065f966b699e14f48" dependencies: @@ -139,16 +104,7 @@ babel-traverse@^6.23.1: invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.15.0, babel-types@^6.21.0: - version "6.21.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.21.0.tgz#314b92168891ef6d3806b7f7a917fdf87c11a4b2" - dependencies: - babel-runtime "^6.20.0" - esutils "^2.0.2" - lodash "^4.2.0" - to-fast-properties "^1.0.1" - -babel-types@^6.23.0: +babel-types@^6.15.0, babel-types@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.23.0.tgz#bb17179d7538bad38cd0c9e115d340f77e7e9acf" dependencies: @@ -157,11 +113,7 @@ babel-types@^6.23.0: lodash "^4.2.0" to-fast-properties "^1.0.1" -babylon@^6.11.0, babylon@^6.13.0: - version "6.15.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.15.0.tgz#ba65cfa1a80e1759b0e89fb562e27dccae70348e" - -babylon@^6.15.0, babylon@^6.16.1: +babylon@^6.13.0, babylon@^6.15.0, babylon@^6.16.1: version "6.16.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" @@ -236,7 +188,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.6: +concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -252,18 +204,24 @@ core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" dependencies: - es5-ext "~0.10.2" + es5-ext "^0.10.9" -debug@2.2.0, debug@^2.1.1, debug@^2.2.0: +debug@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" dependencies: ms "0.7.1" +debug@^2.1.1, debug@^2.2.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" + dependencies: + ms "0.7.2" + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -284,64 +242,64 @@ diff@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" -doctrine@^1.2.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" dependencies: esutils "^2.0.2" isarray "^1.0.0" -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.14" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.14.tgz#625bc9ab9cac0f6fb9dc271525823d1800b3d360" dependencies: es6-iterator "2" es6-symbol "~3.1" -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" - -es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" - dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" - -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" + +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" + dependencies: + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" + +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" + d "1" + es5-ext "~0.10.14" es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" @@ -360,27 +318,24 @@ eslint-config-babel@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/eslint-config-babel/-/eslint-config-babel-6.0.0.tgz#66feedf6ce6e04abe585cec1a65b5bcc96bed50a" -eslint-plugin-babel@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-babel/-/eslint-plugin-babel-4.1.1.tgz#ef285c87039b67beb3bbd227f5b0eed4fb376b87" - eslint-plugin-flowtype@^2.30.3: version "2.30.3" resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.30.3.tgz#57835d2c0ed388da7a2725803ec32af2f437c301" dependencies: lodash "^4.15.0" -eslint@^3.17.1: - version "3.17.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.17.1.tgz#b80ae12d9c406d858406fccda627afce33ea10ea" +eslint@^3.18.0: + version "3.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.18.0.tgz#647e985c4ae71502d20ac62c109f66d5104c8a4b" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" - concat-stream "^1.4.6" + concat-stream "^1.5.2" debug "^2.1.1" - doctrine "^1.2.2" + doctrine "^2.0.0" escope "^3.6.0" espree "^3.4.0" + esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -416,9 +371,15 @@ espree@^3.4.0: acorn "4.0.4" acorn-jsx "^3.0.0" -esprima@^2.6.0: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" esrecurse@^4.1.0: version "4.1.0" @@ -427,7 +388,7 @@ esrecurse@^4.1.0: estraverse "~4.1.0" object-assign "^4.0.1" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -439,12 +400,12 @@ esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: - d "~0.1.1" - es5-ext "~0.10.7" + d "1" + es5-ext "~0.10.14" exit-hook@^1.0.0: version "1.1.1" @@ -491,7 +452,7 @@ generate-object-property@^1.1.0: dependencies: is-property "^1.0.0" -glob@7.0.5, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: +glob@7.0.5: version "7.0.5" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" dependencies: @@ -502,9 +463,20 @@ glob@7.0.5, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + globals@^9.0.0, globals@^9.14.0: - version "9.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034" + version "9.16.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" globby@^5.0.0: version "5.0.0" @@ -540,8 +512,8 @@ has-flag@^1.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" ignore@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" + version "3.2.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.6.tgz#26e8da0644be0bb4cb39516f6c79f0e0f4ffe48c" imurmurhash@^0.1.4: version "0.1.4" @@ -597,8 +569,8 @@ is-fullwidth-code-point@^2.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" is-my-json-valid@^2.10.0: - version "2.15.0" - resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" + version "2.16.0" + resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" dependencies: generate-function "^2.0.0" generate-object-property "^1.1.0" @@ -635,20 +607,16 @@ isarray@^1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" -js-tokens@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-2.0.0.tgz#79903f5563ee778cc1162e6dcf1a0027c97f9cb5" - js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" js-yaml@^3.5.1: - version "3.7.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + version "3.8.2" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.2.tgz#02d3e2c0f6beab20248d412c352203827d786721" dependencies: argparse "^1.0.7" - esprima "^2.6.0" + esprima "^3.1.1" json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: version "1.0.1" @@ -731,10 +699,10 @@ lodash@^4.0.0, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" loose-envify@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.0.tgz#6b26248c42f6d4fa4b0d8542f78edfcde35642a8" + version "1.3.1" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: - js-tokens "^2.0.0" + js-tokens "^3.0.0" minimatch@^3.0.2: version "3.0.3" @@ -772,6 +740,10 @@ ms@0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + mute-stream@0.0.5: version "0.0.5" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" @@ -785,8 +757,8 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" object-assign@^4.0.1, object-assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" once@^1.3.0: version "1.4.0" @@ -821,6 +793,10 @@ path-is-inside@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" +path-parse@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1" + pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -852,8 +828,8 @@ progress@^1.1.8: resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" readable-stream@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + version "2.2.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" dependencies: buffer-shims "^1.0.0" core-util-is "~1.0.0" @@ -878,8 +854,8 @@ rechoir@^0.6.2: resolve "^1.1.6" regenerator-runtime@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.1.tgz#257f41961ce44558b18f7814af48c17559f9faeb" + version "0.10.3" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.3.tgz#8c4367a904b51ea62a908ac310bf99ff90a82a3e" require-uncached@^1.0.2: version "1.0.3" @@ -893,8 +869,10 @@ resolve-from@^1.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" resolve@^1.1.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" + version "1.3.2" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" + dependencies: + path-parse "^1.0.5" restore-cursor@^1.0.1: version "1.0.1" @@ -904,8 +882,8 @@ restore-cursor@^1.0.1: onetime "^1.0.0" rimraf@^2.2.8: - version "2.5.4" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" dependencies: glob "^7.0.5" @@ -920,8 +898,8 @@ rx-lite@^3.1.2: resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" shelljs@^0.7.5: - version "0.7.6" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" dependencies: glob "^7.0.0" interpret "^1.0.0" From 515adefc54bb6097ad2fdc076614606ad0ae4262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Couto?= Date: Mon, 20 Mar 2017 21:45:11 +0000 Subject: [PATCH 13/16] Add option to disable code frame. (#446) * Add option to disable code hightlight. * Rename codeHighlight with codeFrame * Add codeFrame tests * Remove colors from test assertions --- index.js | 19 ++++++++---- test/fixtures/rules/syntax-error.js | 6 ++++ test/integration.js | 48 +++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 6 deletions(-) create mode 100644 test/fixtures/rules/syntax-error.js diff --git a/index.js b/index.js index 7b742494..22e791b3 100644 --- a/index.js +++ b/index.js @@ -366,6 +366,7 @@ exports.parse = function (code, options) { exports.parseNoPatch = function (code, options) { var opts = { + codeFrame: options.hasOwnProperty("codeFrame") ? options.codeFrame : true, sourceType: options.sourceType, allowImportExportEverywhere: options.allowImportExportEverywhere, // consistent with espree allowReturnOutsideFunction: true, @@ -394,14 +395,20 @@ exports.parseNoPatch = function (code, options) { ast = parse(code, opts); } catch (err) { if (err instanceof SyntaxError) { + err.lineNumber = err.loc.line; - err.column = err.loc.column + 1; + err.column = err.loc.column; + + if (opts.codeFrame) { + err.lineNumber = err.loc.line; + err.column = err.loc.column + 1; - // remove trailing "(LINE:COLUMN)" acorn message and add in esprima syntax error message start - err.message = "Line " + err.lineNumber + ": " + err.message.replace(/ \((\d+):(\d+)\)$/, "") + - // add codeframe - "\n\n" + - codeFrame(code, err.lineNumber, err.column, { highlightCode: true }); + // remove trailing "(LINE:COLUMN)" acorn message and add in esprima syntax error message start + err.message = "Line " + err.lineNumber + ": " + err.message.replace(/ \((\d+):(\d+)\)$/, "") + + // add codeframe + "\n\n" + + codeFrame(code, err.lineNumber, err.column, { highlightCode: true }); + } } throw err; diff --git a/test/fixtures/rules/syntax-error.js b/test/fixtures/rules/syntax-error.js new file mode 100644 index 00000000..6fa194a1 --- /dev/null +++ b/test/fixtures/rules/syntax-error.js @@ -0,0 +1,6 @@ +class ClassName { + constructor() { + + }, + aMethod() {} +} diff --git a/test/integration.js b/test/integration.js index 2814b4c3..c446ed34 100644 --- a/test/integration.js +++ b/test/integration.js @@ -200,4 +200,52 @@ function strictSuite () { // it }); // describe + describe("When \"codeFrame\"", () => { + // Strip chalk colors, these are not relevant for the test + const stripAnsi = (str) => str.replace( + /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, + "" + ); + + it("should display codeFrame when option is absent", (done) => { + lint({ + fixture: ["syntax-error"], + eslint: baseEslintOpts + }, (err, report) => { + if (err) return done(err); + assert(stripAnsi(report[0].message).indexOf("^\n 5 |") > -1); + done(); + }); + }); + + it("should display codeFrame when option is true", (done) => { + lint({ + fixture: ["syntax-error"], + eslint: Object.assign({}, baseEslintOpts, { + parserOptions: { + codeFrame: true + } + }) + }, (err, report) => { + if (err) return done(err); + assert(stripAnsi(report[0].message).indexOf("^\n 5 |") > -1); + done(); + }); + }); + + it("should not display codeFrame when option is false", (done) => { + lint({ + fixture: ["syntax-error"], + eslint: Object.assign({}, baseEslintOpts, { + parserOptions: { + codeFrame: false + } + }) + }, (err, report) => { + if (err) return done(err); + assert(stripAnsi(report[0].message).indexOf("^\n 5 |") === -1); + done(); + }); + }); + }); } From a2c3b30e6a86a39e0cb44a95a1990ca54415bd1f Mon Sep 17 00:00:00 2001 From: Alex Rattray Date: Mon, 20 Mar 2017 14:46:07 -0700 Subject: [PATCH 14/16] [flow] Process polymorphic type bounds on functions (#444) --- index.js | 13 +++++++++++++ test/non-regression.js | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 22e791b3..3bb83811 100644 --- a/index.js +++ b/index.js @@ -176,6 +176,18 @@ function monkeypatch() { } } + function visitTypeParameters(typeParameters) { + var params = typeParameters.params; + + // visit bounds on polymorphpic types, eg; `Foo` in `fn(a: T): T` + for (var i = 0; i < params.length; i++) { + var param = params[i]; + if (param.typeAnnotation) { + visitTypeAnnotation.call(this, param.typeAnnotation); + } + } + } + function checkIdentifierOrVisit(node) { if (node.typeAnnotation) { visitTypeAnnotation.call(this, node.typeAnnotation); @@ -249,6 +261,7 @@ function monkeypatch() { var typeParamScope; if (node.typeParameters) { typeParamScope = nestTypeParamScope(this.scopeManager, node); + visitTypeParameters.call(this, node.typeParameters); } if (node.returnType) { checkIdentifierOrVisit.call(this, node.returnType); diff --git a/test/non-regression.js b/test/non-regression.js index ee8c03a9..395a6de5 100644 --- a/test/non-regression.js +++ b/test/non-regression.js @@ -222,13 +222,13 @@ describe("verify", () => { ); }); - it("type parameters", () => { + it("type parameter bounds", () => { verifyAndAssertMessages( unpad(` import type Foo from 'foo'; import type Foo2 from 'foo'; - function log(a: T1, b: T2) { return a + b; } - log(1, 2); + function log(a: T1, b: T2) { return a + b; } + log(1, 2); `), { "no-unused-vars": 1, "no-undef": 1 }, [] From 44994124941b1e50772ee2661cf5d8c910105308 Mon Sep 17 00:00:00 2001 From: wtgtybhertgeghgtwtg Date: Mon, 20 Mar 2017 14:50:09 -0700 Subject: [PATCH 15/16] Use `lodash` instead of `lodash.pickby`. (#435) --- index.js | 2 +- package.json | 2 +- yarn.lock | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 3bb83811..fea9d054 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ var babylonToEspree = require("./babylon-to-espree"); -var pick = require("lodash.pickby"); +var pick = require("lodash").pickBy; var Module = require("module"); var path = require("path"); var parse = require("babylon").parse; diff --git a/package.json b/package.json index 9babfaba..5996554d 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "babel-traverse": "^6.23.1", "babel-types": "^6.23.0", "babylon": "^6.16.1", - "lodash.pickby": "^4.6.0" + "lodash": "^4.17.4" }, "scripts": { "test": "npm run lint && npm run test-only", diff --git a/yarn.lock b/yarn.lock index b17637e8..9cb3a50a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -250,8 +250,8 @@ doctrine@^2.0.0: isarray "^1.0.0" es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.14" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.14.tgz#625bc9ab9cac0f6fb9dc271525823d1800b3d360" + version "0.10.15" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" dependencies: es6-iterator "2" es6-symbol "~3.1" @@ -694,7 +694,7 @@ lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" -lodash@^4.0.0, lodash@^4.15.0, lodash@^4.2.0, lodash@^4.3.0: +lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" From 4db4db54d18d5d2833ed9a02c5e4cde20474e995 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Mon, 20 Mar 2017 17:53:26 -0400 Subject: [PATCH 16/16] 7.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5996554d..5909e7f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "babel-eslint", - "version": "7.1.1", + "version": "7.2.0", "description": "Custom parser for ESLint", "main": "index.js", "files": [