Skip to content

Commit

Permalink
Removed unnecessary 'eslint-disable' directives
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhbw committed Apr 18, 2020
1 parent b5e46ca commit db91f24
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/jsSandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const runUserJsAndGetRaw = async (
result = temp.result;
} else if (ctx.options.noSandbox) {
context = sandbox;
const wrapper = new Function('with(this) { return eval(__code__); }'); // eslint-disable-line no-new-func
const wrapper = new Function('with(this) { return eval(__code__); }');
result = wrapper.call(context);
} else {
const script = new vm.Script(
Expand All @@ -78,7 +78,7 @@ const runUserJsAndGetRaw = async (
`,
{}
);
context = vm.createContext(sandbox); // eslint-disable-line new-cap
context = vm.createContext(sandbox);
script.runInContext(context);
result = context.__result__;
}
Expand Down
2 changes: 0 additions & 2 deletions src/processTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ const produceJsReport = async (
const errors: Error[] = [];

while (true) {
// eslint-disable-line no-constant-condition
const curLoop = getCurLoop(ctx);
let nextSibling;

Expand Down Expand Up @@ -678,7 +677,6 @@ const processEndForIf = (
return null;
};

/* eslint-disable */
const processImage = async (ctx: Context, imagePars: ImagePars) => {
const cx = (imagePars.width * 360e3).toFixed(0);
const cy = (imagePars.height * 360e3).toFixed(0);
Expand Down
4 changes: 2 additions & 2 deletions src/reportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const newNonTextNode = (
_children: children,
};
node._children.forEach(child => {
child._parent = node; // eslint-disable-line
child._parent = node;
});
return node;
};
Expand All @@ -82,7 +82,7 @@ const newTextNode = (text: string): TextNode => {

const addChild = (parent: Node, child: Node): Node => {
parent._children.push(child);
child._parent = parent; // eslint-disable-line
child._parent = parent;
return child;
};

Expand Down

0 comments on commit db91f24

Please sign in to comment.