Skip to content

Commit

Permalink
adjust eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
patuwwy committed Jul 6, 2023
1 parent 77cf32f commit 0247f09
Show file tree
Hide file tree
Showing 14 changed files with 3,607 additions and 2,607 deletions.
9 changes: 8 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# don't ever lint node_modules
./**/*
!./packages
node_modules
conf/launch.json
conf/launch.json
.work
scripts/**
bdd/**
nyc.config.js
.eslintrc.js
4 changes: 2 additions & 2 deletions .eslintrc → .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
module.exports = {
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.base.json"
"parser": "@typescript-eslint/parser"
},
"plugins": [
"@typescript-eslint"
Expand Down
4,027 changes: 2,350 additions & 1,677 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"clean": "yarn clean:root && scripts/run-script.js clean",
"clean:root": "rm -rf ./dist/",
"clean:modules": "find -name node_modules -or -name __pypackages__ -prune -exec rm -rf {} ';' 2> /dev/null",
"lint": "eslint . --ext .ts --ext .js --cache --cache-strategy=content --cache-location=.eslintcache_scramjet-csi",
"lint": "eslint ./packages -c .eslintrc.js --ext .ts --cache --cache-strategy=content --cache-location=.eslintcache_scramjet-csi",
"lint:uncached": "rm .eslintcache_scramjet-csi && yarn lint",
"start": "node dist/sth/bin/hub.js",
"start:dev": "ts-node packages/sth/src/bin/hub.ts",
Expand Down Expand Up @@ -123,7 +123,8 @@
},
"dependencies": {
"minimist": "^1.2.7",
"npm": "8",
"scramjet": "^4.36.9"
"npm": "9",
"scramjet": "^4.36.9",
"minipass": "6.0.2"
}
}
2 changes: 1 addition & 1 deletion packages/adapter-docker/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export { DockerSequenceAdapter as SequenceAdapter } from "./docker-sequence-adap
export { DockerInstanceAdapter as InstanceAdapter } from "./docker-instance-adapter";

export const init = async (..._args: any[]) => {
return await DockerodeDockerHelper.isDockerConfigured() ? {} : { error: "Docker initialization failed"};
return await DockerodeDockerHelper.isDockerConfigured() ? {} : { error: "Docker initialization failed" };
};

export const name = "docker";
3 changes: 1 addition & 2 deletions packages/host/src/lib/adapter-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ export class AdapterManager {
throw new Error(`Invalid adapter provided ${adapter.pkgName}`);
}

console.log(adapter);

adapter.status = await this.initAdapter(adapter);

if (adapter.status !== "ready") {
Expand Down Expand Up @@ -52,6 +50,7 @@ export class AdapterManager {

async initAdapter(adapter: IRuntimeAdapter): Promise<{ error?: string } | "ready"> {
const initResult = await adapter.init();

return initResult.error ? initResult : Promise.resolve("ready");
}

Expand Down
3 changes: 1 addition & 2 deletions packages/host/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"outDir": "./dist"
},
"include": [
"src/**/*",
"src/build.info.json"
"src/**/*"
]
}
2 changes: 1 addition & 1 deletion packages/sth/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"outDir": "./dist"
},
"include": [
"./src/**/*.ts"
"src/**/*"
]
}
8 changes: 6 additions & 2 deletions packages/types/src/runtime-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ import { STHConfiguration } from "./sth-configuration";

export interface IRuntimeAdapter {
SequenceAdapter: ISequenceAdapter & { new (config: STHConfiguration): ISequenceAdapter };
InstanceAdapter: ILifeCycleAdapterMain & ILifeCycleAdapterRun & IComponent & { new (config: STHConfiguration): IInstanceAdapter };
InstanceAdapter:
ILifeCycleAdapterMain &
ILifeCycleAdapterRun &
IComponent &
{ new (config: STHConfiguration): IInstanceAdapter };
name: string;
pkgName: string;
init(): Promise<{ error?: string }>;
status: "ready" | { error?: string};
status: "ready" | { error?: string };
}
2 changes: 1 addition & 1 deletion scripts/build-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ console.time(BUILD_NAME);
if (opts.install) {
console.timeLog(BUILD_NAME, `Done, installing packages in ${outDir}...`);

const cmd = `cd ${outDir} && pwd >&2 && npx npm@8 install -q -ws --no-audit`;
const cmd = `cd ${outDir} && pwd >&2 && npm install -q -ws --no-audit`;

await runCommand(cmd, opts.verbose);
}
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
// when they're updated a lot.
"fallbackPolling": "dynamicPriority"
},
"include": ["/packages/**/*.ts"],
"exclude": [
"**/node_modules",
"**/*.spec.ts",
"dist"
"dist",
"tsconfig*.*"
]
}
3 changes: 3 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "tsconfig.base.json"
}
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./tsconfig.base.json"
}
Loading

0 comments on commit 0247f09

Please sign in to comment.