all the lints

This commit is contained in:
Olivier Gagnon
2021-05-01 03:17:31 -04:00
parent abe0330dc3
commit d745150c45
231 changed files with 1458 additions and 1439 deletions
+4 -5
View File
@@ -6,7 +6,7 @@
* the way
*/
import * as walk from "acorn-walk";
import { parse, Node } from "acorn";
import { parse } from "acorn";
import { RamCalculationErrorCode } from "./RamCalculationErrorCodes";
@@ -247,7 +247,7 @@ function parseOnlyCalculateDeps(code, currentModule) {
// walkDeeper is for doing recursive walks of expressions in composites that we handle.
function commonVisitors() {
return {
Identifier: (node, st, walkDeeper) => {
Identifier: (node, st) => {
if (objectPrototypeProperties.includes(node.name)) {return;}
addRef(st.key, node.name);
},
@@ -282,7 +282,7 @@ function parseOnlyCalculateDeps(code, currentModule) {
}
walk.recursive(ast, {key: globalKey}, Object.assign({
ImportDeclaration: (node, st, walkDeeper) => {
ImportDeclaration: (node, st) => {
const importModuleName = node.source.value;
additionalModules.push(importModuleName);
@@ -301,8 +301,7 @@ function parseOnlyCalculateDeps(code, currentModule) {
}
}
},
FunctionDeclaration: (node, st, walkDeeper) => {
// Don't use walkDeeper, because we are changing the visitor set.
FunctionDeclaration: (node) => {
const key = currentModule + "." + node.id.name;
walk.recursive(node, {key: key}, commonVisitors());
},