Skip to content

Commit b998d51

Browse files
committed
fix: type check
1 parent 293e53b commit b998d51

File tree

7 files changed

+3
-14
lines changed

7 files changed

+3
-14
lines changed

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"compile-tests": "npm run clean && tsc -p . --outDir out",
4141
"watch-tests": "tsc -p . -w --outDir out",
4242
"lint": "eslint . --ext ts",
43-
"test": "ts-mocha -p tsconfig.json ./**/**.test.ts",
43+
"test": "rm -rf smelly-report.html && ts-mocha -p tsconfig.json ./**/**.test.ts",
4444
"test:watch": "nodemon --exec 'npm run test' --watch 'src/**' --ext 'ts' --delay 5",
4545
"test:coverage": "nyc --reporter=lcov ts-mocha -p tsconfig.json ts-node/register ./**/**.test.ts",
4646
"test:mutation": "stryker run",

cli/src/bin/find-smells.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
//@ts-nocheck
21
import path from 'path';
3-
//@ts-nocheck
42
import fs, { readdir } from 'node:fs/promises';
5-
//@ts-nocheck
63
import { SmellDetector, SupportedLanguages } from '../index';
74
import { join } from 'node:path';
85
import { SmellsAggreagtor, SmellsList } from '../reporters/Html';
96

107
const args = process.argv;
118
const fileName = args[2];
12-
const language = args[3] || SupportedLanguages.javascript;
9+
const language = args[3] as SupportedLanguages || SupportedLanguages.javascript;
1310
const report = args[4];
1411

1512
if (!fileName) {

cli/src/reporters/Input.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-ignore
21
import fs from 'node:fs/promises';
32

43
export interface Input {

cli/src/reporters/Output.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-ignore
21
import fs from 'node:fs/promises';
32
import { ExportOptions } from "./Html";
43

cli/test/cli.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
import { exec } from "child_process";
32
import { promisify } from "util";
43
import * as assert from 'assert';
@@ -8,7 +7,7 @@ const execPromise = promisify(exec);
87
describe('cli', () => {
98

109
it('find no smells for a given path', async () => {
11-
const { stdout, stderr } = await execPromise(`npm run cli -- fake-data/no-smells/ javascript --report=html`);
10+
const { stdout } = await execPromise(`npm run cli -- fake-data/no-smells/ javascript --report=html`);
1211

1312
assert.equal(true, stdout.includes("Report HTML generated"));
1413
});

cli/test/smells-detector.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
//@ts-nocheck
21
import * as assert from 'assert';
32
import { suite, test } from 'mocha';
43
import { SmellDetector } from '../src/index';

cli/tsconfig.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,9 @@
99
],
1010
"sourceMap": true,
1111
"rootDir": ".",
12-
"typeRoots": [
13-
"./types",
14-
],
1512
"strict": true, /* enable all strict type-checking options */
1613
"declaration": true,
1714
"declarationDir": "./types",
18-
"types": ["node"]
1915
/* Additional Checks */
2016
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
2117
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

0 commit comments

Comments
 (0)