Skip to content

Commit

Permalink
Enable eslint for testbed
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer committed Jul 8, 2021
1 parent 092c2af commit 1554206
Show file tree
Hide file tree
Showing 7 changed files with 147 additions and 108 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"./protocol",
"./server",
"./client",
"./client-node-tests"
"./client-node-tests",
"./testbed"
],
"typescript.tsc.autoDetect": "off",

This comment has been minimized.

Copy link
@Kobra481

Kobra481 Sep 15, 2021

on

"spellright.language": [
Expand Down
229 changes: 132 additions & 97 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
"@types/assert": "^1.5.2",
"@types/mocha": "^8.0.4",
"@types/node": "12.12.12",
"@typescript-eslint/eslint-plugin": "^4.27.0",
"@typescript-eslint/parser": "^4.27.0",
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"assert": "^2.0.0",
"eslint": "^7.28.0",
"eslint": "^7.30.0",
"http-server": "^0.12.3",
"mocha": "^8.2.1",
"playwright": "^1.11.1",
Expand Down
5 changes: 4 additions & 1 deletion testbed/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "../.eslintrc.base.json",
"parserOptions": {
"project": ["./tsconfig.json", "./client/tsconfig.json", "./server/tsconfig.json"]
},
"rules": {
"no-console": "error"
"no-console": "off"
}
}
8 changes: 4 additions & 4 deletions testbed/client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function activate(context: ExtensionContext) {
// We need to go one level up since an extension compile the js code into
// the output folder.
let module = path.join(__dirname, '..', '..', 'server', 'out', 'server.js');
let debugOptions = { execArgv: ["--nolazy", "--inspect=6012"] };
let debugOptions = { execArgv: ['--nolazy', '--inspect=6012'] };
let serverOptions: ServerOptions = {
run: { module, transport: TransportKind.ipc },
debug: { module, /* runtime: 'node.exe', */ transport: TransportKind.ipc, options: debugOptions}
Expand Down Expand Up @@ -46,20 +46,20 @@ export function activate(context: ExtensionContext) {
next(document);
}
}
}
};

client = new LanguageClient('testbed', 'Testbed', serverOptions, clientOptions);
client.registerProposedFeatures();
// let not: NotificationType<string[], void> = new NotificationType<string[], void>('testbed/notification');
client.onReady().then(() => {
client.sendNotification('testbed/notification', ['dirk', 'baeumer']);
void client.sendNotification('testbed/notification', ['dirk', 'baeumer']);
});
client.onTelemetry((data: any) => {
console.log(`Telemetry event received: ${JSON.stringify(data)}`);
});
client.start();
commands.registerCommand('testbed.myCommand.invoked', () => {
commands.executeCommand('testbed.myCommand').then(value => {
void commands.executeCommand('testbed.myCommand').then(value => {
console.log(value);
});
});
Expand Down
2 changes: 1 addition & 1 deletion testbed/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"tsBuildInfoFile":"./out/tsconfig.tsbuildInfo",
},
"include": ["src"],
"exclude": ["node_modules", ".vscode-test"]
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion testbed/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"tsBuildInfoFile":"./out/tsconfig.tsbuildInfo",
},
"include": ["src"],
"exclude": ["node_modules", ".vscode-test"]
"exclude": ["node_modules"]
}

0 comments on commit 1554206

Please sign in to comment.