Add ESLint (#941)

* Add eslint, switch to lint-staged for precommit

* Fix all ESLint errors

* Update GH workflow to check prettier and eslint
This commit is contained in:
Madeline
2023-01-20 18:10:47 +11:00
committed by GitHub
parent 071cf6c5f2
commit 71082eb918
158 changed files with 738 additions and 667 deletions

View File

@@ -32,7 +32,7 @@ function registerPath(file, method, prefix, path, ...args) {
const sourceFile = file.replace("/dist/", "/src/").replace(".js", ".ts");
const opts = args.find((x) => typeof x === "object");
if (opts) {
routes.set(urlPath + "|" + method, opts); // @ts-ignore
routes.set(urlPath + "|" + method, opts);
opts.file = sourceFile;
// console.log(method, urlPath, opts);
} else {
@@ -46,7 +46,6 @@ function routeOptions(opts) {
return opts;
}
// @ts-ignore
RouteUtility.route = routeOptions;
express.Router = (opts) => {