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 0c815fde91
commit 084dc0be08
157 changed files with 737 additions and 666 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) => {