Fix eslint (#4897)

* Fix eslint call

* Fix linting errors
This commit is contained in:
Daniel Tschinder
2016-11-26 17:24:38 +01:00
committed by Henry Zhu
parent 53de56d069
commit 1d9e509df2
5 changed files with 11 additions and 9 deletions

View File

@@ -68,11 +68,11 @@ export let hooks = [
function (self, parent) {
if (
(parent.isIfStatement() && (self.key === 'consequent' || self.key === 'alternate')) ||
(parent.isLoop() && self.key === 'body')
(parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate")) ||
(parent.isLoop() && self.key === "body")
) {
self.replaceWith({
type: 'BlockStatement',
type: "BlockStatement",
body: []
});
return true;

View File

@@ -42,7 +42,7 @@ export default class Renamer {
let isDefault = exportDeclar.isExportDefaultDeclaration();
if (isDefault && (parentDeclar.isFunctionDeclaration() ||
parentDeclar.isClassDeclaration())&& !parentDeclar.node.id) {
parentDeclar.isClassDeclaration()) && !parentDeclar.node.id) {
// Ensure that default class and function exports have a name so they have a identifier to
// reference from the export specifier list.
parentDeclar.node.id = parentDeclar.scope.generateUidIdentifier("default");