diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d5120e..674d3e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ This file documents all notable changes to the VS Code Lizard extension. +## [1.0.2] — 2022-09-29 + +- [#2](https://github.com/brobeson/vscode-lizard/issues/2) Adds Typescript, + javascript support + ## [1.0.1] — 2022-09-29 ### Fixed diff --git a/package-lock.json b/package-lock.json index 51e00aa..3cd3bae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,18 @@ { "name": "vscode-lizard", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-lizard", - "version": "1.0.1", + "version": "1.0.2", + "license": "MIT", "devDependencies": { "@types/glob": "^7.2.0", "@types/mocha": "^9.1.1", - "@types/node": "16.x", - "@types/vscode": "^1.71.0", + "@types/node": "^16.x", + "@types/vscode": "^1.70.0", "@typescript-eslint/eslint-plugin": "^5.31.0", "@typescript-eslint/parser": "^5.31.0", "@vscode/test-electron": "^2.1.5", @@ -22,7 +23,7 @@ "typescript": "^4.7.4" }, "engines": { - "vscode": "^1.71.0" + "vscode": "^1.70.0" } }, "node_modules/@eslint/eslintrc": { diff --git a/package.json b/package.json index 1f6c5c0..d565e18 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-lizard", "displayName": "VS Code Lizard", "description": "Run complexity analysis on your code.", - "version": "1.0.1", + "version": "1.0.2", "publisher": "brobeson", "author": { "name": "brobeson", @@ -30,7 +30,9 @@ "ccn" ], "activationEvents": [ - "onLanguage:cpp" + "onLanguage:cpp", + "onLanguage:typescript", + "onLanguage:javascript" ], "main": "./out/lizard.js", "extensionKind": [ diff --git a/src/lizard.ts b/src/lizard.ts index 23ecce1..9a84d62 100644 --- a/src/lizard.ts +++ b/src/lizard.ts @@ -100,7 +100,7 @@ async function lintDocument( log: vscode.OutputChannel ) { // TODO Expand this list to include all the languages supported by Lizard. - if (!["cpp"].includes(file.languageId) || file.uri.scheme !== "file") { + if (!["cpp", "typescript", "javascript"].includes(file.languageId) || file.uri.scheme !== "file") { return []; } const limits = readLimits();