upgrade to babel 5.1.8
This commit is contained in:
parent
729cedc925
commit
d301c8e099
@ -82,11 +82,6 @@ var astTransformVisitor = {
|
||||
return t.inherits(t.thisExpression(), node);
|
||||
}
|
||||
|
||||
if (t.isClassProperty(node)) {
|
||||
// eslint doesn't like these
|
||||
this.remove();
|
||||
}
|
||||
|
||||
// functions
|
||||
|
||||
if (t.isFunction(node)) {
|
||||
|
||||
@ -2,7 +2,7 @@ var acornToEsprima = require("./acorn-to-esprima");
|
||||
var traverse = require("babel-core").traverse;
|
||||
var assign = require("lodash.assign");
|
||||
var Module = require("module");
|
||||
var acorn = require("babel-core").acorn;
|
||||
var parse = require("babel-core").parse;
|
||||
var path = require("path");
|
||||
var t = require("babel-core").types;
|
||||
|
||||
@ -60,24 +60,8 @@ exports.parse = function (code) {
|
||||
}
|
||||
|
||||
var opts = {
|
||||
ecmaVersion: 7,
|
||||
locations: true,
|
||||
ranges: true,
|
||||
sourceType: "module",
|
||||
plugins: {
|
||||
jsx: true,
|
||||
flow: true
|
||||
},
|
||||
features: {
|
||||
"es7.asyncFunctions": true,
|
||||
"es7.classProperties": true,
|
||||
"es7.comprehensions": true,
|
||||
"es7.decorators": true,
|
||||
"es7.doExpressions": true,
|
||||
"es7.exponentiationOperator": true,
|
||||
"es7.exportExtensions": true,
|
||||
"es7.objectRestSpread": true
|
||||
}
|
||||
};
|
||||
|
||||
var comments = opts.onComment = [];
|
||||
@ -85,7 +69,7 @@ exports.parse = function (code) {
|
||||
|
||||
var ast;
|
||||
try {
|
||||
ast = acorn.parse(code, opts);
|
||||
ast = parse(code, opts);
|
||||
} catch (err) {
|
||||
if (err instanceof SyntaxError) {
|
||||
err.lineNumber = err.loc.line;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "babel-eslint",
|
||||
"version": "2.0.2",
|
||||
"version": "3.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
@ -8,7 +8,7 @@
|
||||
"url": "https://github.com/babel/babel-eslint.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-core": "^5.0.0-beta4",
|
||||
"babel-core": "^5.1.8",
|
||||
"lodash.assign": "^3.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@ -100,14 +100,6 @@ describe("verify", function () {
|
||||
);
|
||||
});
|
||||
|
||||
it("Variables in JSX should be used (issues #15, #17, #21, #29)", function () {
|
||||
verifyAndAssertMessages(
|
||||
"import App from './App'; export default (<App />);",
|
||||
{ "no-unused-vars": 1, "no-undef": 1 },
|
||||
[]
|
||||
);
|
||||
});
|
||||
|
||||
it("Multiple destructured assignment with compound properties (issue #16)", function () {
|
||||
verifyAndAssertMessages(
|
||||
"module.exports = { ...a.a, ...a.b };",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user