cleanup unused code; fix tsc builds

This commit is contained in:
Vyacheslav Matyukhin 2022-06-23 10:35:42 +03:00
parent 0cf5c47c28
commit 8e4fb99b53
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
3 changed files with 3 additions and 7 deletions

View File

@ -17,7 +17,7 @@ export const startClient = (context: vscode.ExtensionContext) => {
);
// The debug options for the server
// --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging
let debugOptions = { execArgv: ["--nolazy", "--inspect=6009"] };
let debugOptions = { execArgv: ["--nolazy" /*"--inspect=6009"*/] };
// If the extension is launched in debug mode then the debug server options are used
// Otherwise the run options are used

View File

@ -125,11 +125,11 @@
},
"scripts": {
"vscode:prepublish": "yarn run compile",
"compile:tsc": "tsc -p ./",
"compile:tsc": "tsc -b",
"compile:grammar": "js-yaml syntaxes/squiggle.tmLanguage.yaml >syntaxes/squiggle.tmLanguage.json",
"compile:vendor": "(cd ../squiggle-lang && yarn run build) && (cd ../components && yarn run bundle && yarn run build:css) && mkdir -p media/vendor && cp ../components/dist/bundle.js media/vendor/components.js && cp ../components/dist/main.css media/vendor/components.css && cp ../../node_modules/react/umd/react.production.min.js media/vendor/react.js && cp ../../node_modules/react-dom/umd/react-dom.production.min.js media/vendor/react-dom.js && cp ../website/static/img/quri-logo.png media/vendor/icon.png",
"compile": "yarn run compile:tsc && yarn run compile:grammar && yarn run compile:vendor",
"watch": "tsc -watch -p ./",
"watch": "tsc -b -watch",
"pretest": "yarn run compile && yarn run lint",
"lint": "eslint client/src server/src --ext ts",
"format": "eslint client/src server/src --ext ts --fix",

View File

@ -45,12 +45,8 @@ connection.onInitialize((params: InitializeParams) => {
async function validateSquiggleDocument(
textDocument: TextDocument
): Promise<void> {
// The validator creates diagnostics for all uppercase words length 2 and more
const text = textDocument.getText();
const pattern = /\b[A-Z]{2,}\b/g;
let m: RegExpExecArray | null;
let problems = 0;
const diagnostics: Diagnostic[] = [];
const parseResult = parse(text);