Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
This also includes major version bumps of prettier and eslint, which
triggered some changes.
  • Loading branch information
czosel committed Nov 6, 2024
1 parent 0d0f185 commit 02606c2
Show file tree
Hide file tree
Showing 174 changed files with 1,029 additions and 1,007 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions .eslintrc.js

This file was deleted.

40 changes: 40 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import js from "@eslint/js";
import jest from "eslint-plugin-jest";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import globals from "globals";

export default [
{
ignores: ["dist", "docs", "example", "tutorials"],
},
js.configs.recommended,
{
files: ["test/**"],
...jest.configs["flat/recommended"],
rules: {
...jest.configs["flat/recommended"].rules,
"no-console": "off",
},
languageOptions: {
globals: jest.environments.globals.globals,
},
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
sourceType: "commonjs",
},

rules: {
"prefer-const": "error",
"no-var": "error",
"prettier/prettier": "error",
curly: ["error", "multi-line"],
},
},
eslintPluginPrettierRecommended,
];

12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,23 @@
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.14.0",
"babel-loader": "^9.2.1",
"benchmark": "^2.1.4",
"coveralls": "^3.0.3",
"eslint": "^8.36.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^28.9.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.12.0",
"husky": "^9.1.6",
"jest": "^29.7.0",
"jest-runner-eslint": "^2.2.1",
"jsdoc": "^3.6.11",
"jsdoc-template": "^1.2.0",
"lodash.template": ">=4.5.0",
"prettier": "^2.8.6",
"prettier": "^3.3.3",
"tsd-jsdoc": "^2.5.0",
"webpack": "^5.96.1",
"webpack-cli": "^5.1.4",
Expand Down
6 changes: 3 additions & 3 deletions src/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ AST.prototype.swapLocations = function (target, first, last, parser) {
if (this.withSource) {
target.loc.source = parser.lexer._input.substring(
target.loc.start.offset,
target.loc.end.offset
target.loc.end.offset,
);
}
}
Expand All @@ -208,7 +208,7 @@ AST.prototype.resolveLocations = function (target, first, last, parser) {
if (this.withSource) {
target.loc.source = parser.lexer._input.substring(
target.loc.start.offset,
target.loc.end.offset
target.loc.end.offset,
);
}
}
Expand Down Expand Up @@ -376,7 +376,7 @@ AST.prototype.prepare = function (kind, docs, parser) {
location = new Location(
src,
start,
new Position(parser.prev[0], parser.prev[1], parser.prev[2])
new Position(parser.prev[0], parser.prev[1], parser.prev[2]),
);
// last argument is always the location
args.push(location);
Expand Down
2 changes: 1 addition & 1 deletion src/ast/array.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ module.exports = Expr.extends(
Expr.apply(this, [KIND, docs, location]);
this.items = items;
this.shortForm = shortForm;
}
},
);
4 changes: 2 additions & 2 deletions src/ast/arrowfunc.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = Expression.extends(
nullable,
isStatic,
docs,
location
location,
) {
Expression.apply(this, [KIND, docs, location]);
this.arguments = args;
Expand All @@ -39,5 +39,5 @@ module.exports = Expression.extends(
this.type = type;
this.nullable = nullable;
this.isStatic = isStatic || false;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/assign.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ module.exports = Expression.extends(
this.left = left;
this.right = right;
this.operator = operator;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/assignref.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ module.exports = Expression.extends(
Expression.apply(this, [KIND, docs, location]);
this.left = left;
this.right = right;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Node.extends(
Node.apply(this, [KIND, docs, location]);
this.name = name;
this.args = args;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ module.exports = Operation.extends(
this.type = type;
this.left = left;
this.right = right;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ module.exports = Statement.extends(
function Block(kind, children, docs, location) {
Statement.apply(this, [kind || KIND, docs, location]);
this.children = children.filter(Boolean);
}
},
);
2 changes: 1 addition & 1 deletion src/ast/boolean.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ module.exports = Literal.extends(
KIND,
function Boolean(value, raw, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
}
},
);
2 changes: 1 addition & 1 deletion src/ast/call.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Expression.extends(
Expression.apply(this, [KIND, docs, location]);
this.what = what;
this.arguments = args;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/case.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Statement.extends(
Statement.apply(this, [KIND, docs, location]);
this.test = test;
this.body = body;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/cast.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ module.exports = Operation.extends(
this.type = type;
this.raw = raw;
this.expr = expr;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/catch.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ module.exports = Statement.extends(
this.body = body;
this.what = what;
this.variable = variable;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ module.exports = Declaration.extends(
this.body = body;
this.attrGroups = [];
this.parseFlags(flags);
}
},
);
4 changes: 2 additions & 2 deletions src/ast/classconstant.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const ClassConstant = ConstantStatement.extends(
type,
attrGroups,
docs,
location
location,
) {
ConstantStatement.apply(this, [kind || KIND, constants, docs, location]);
this.parseFlags(flags);
this.nullable = nullable;
this.type = type;
this.attrGroups = attrGroups;
}
},
);

/**
Expand Down
4 changes: 2 additions & 2 deletions src/ast/closure.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = Expression.extends(
nullable,
isStatic,
docs,
location
location,
) {
Expression.apply(this, [KIND, docs, location]);
this.uses = uses;
Expand All @@ -43,5 +43,5 @@ module.exports = Expression.extends(
this.isStatic = isStatic || false;
this.body = null;
this.attrGroups = [];
}
},
);
2 changes: 1 addition & 1 deletion src/ast/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ module.exports = Node.extends(
function Comment(kind, value, docs, location) {
Node.apply(this, [kind, docs, location]);
this.value = value;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/commentblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ module.exports = Comment.extends(
KIND,
function CommentBlock(value, docs, location) {
Comment.apply(this, [KIND, value, docs, location]);
}
},
);
2 changes: 1 addition & 1 deletion src/ast/commentline.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ module.exports = Comment.extends(
KIND,
function CommentLine(value, docs, location) {
Comment.apply(this, [KIND, value, docs, location]);
}
},
);
2 changes: 1 addition & 1 deletion src/ast/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Node.extends(
Node.apply(this, [KIND, docs, location]);
this.name = name;
this.value = value;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/constantstatement.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ module.exports = Statement.extends(
function ConstantStatement(kind, constants, docs, location) {
Statement.apply(this, [kind || KIND, docs, location]);
this.constants = constants;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/continue.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ module.exports = Statement.extends(
function Continue(level, docs, location) {
Statement.apply(this, [KIND, docs, location]);
this.level = level;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Declaration = Statement.extends(
function Declaration(kind, name, docs, location) {
Statement.apply(this, [kind || KIND, docs, location]);
this.name = name;
}
},
);

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ast/declare.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Declare = Block.extends(
Block.apply(this, [KIND, body, docs, location]);
this.directives = directives;
this.mode = mode;
}
},
);

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ast/declaredirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Node.extends(
Node.apply(this, [KIND, docs, location]);
this.key = key;
this.value = value;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/do.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Statement.extends(
Statement.apply(this, [KIND, docs, location]);
this.test = test;
this.body = body;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/echo.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Statement.extends(
Statement.apply(this, [KIND, docs, location]);
this.shortForm = shortForm;
this.expressions = expressions;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ module.exports = Expression.extends(
function Empty(expression, docs, location) {
Expression.apply(this, [KIND, docs, location]);
this.expression = expression;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/encapsed.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Encapsed = Literal.extends(
function Encapsed(value, raw, type, docs, location) {
Literal.apply(this, [KIND, value, raw, docs, location]);
this.type = type;
}
},
);

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ast/encapsedpart.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ module.exports = Expression.extends(
this.expression = expression;
this.syntax = syntax;
this.curly = curly;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ module.exports = Expression.extends(
this.value = value;
this.byRef = byRef;
this.unpack = unpack;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/enum.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ module.exports = Declaration.extends(
this.implements = impl;
this.body = body;
this.attrGroups = [];
}
},
);
2 changes: 1 addition & 1 deletion src/ast/enumcase.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ module.exports = Node.extends(
Node.apply(this, [KIND, docs, location]);
this.name = name;
this.value = value;
}
},
);
2 changes: 1 addition & 1 deletion src/ast/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ module.exports = Node.extends(
this.token = token;
this.line = line;
this.expected = expected;
}
},
);
Loading

0 comments on commit 02606c2

Please sign in to comment.