Skip to content

Commit 35b94d6

Browse files
committed
chore(ts-source-parser): update package.json and tsconfig.json configurations
1 parent 4bd0f20 commit 35b94d6

5 files changed

Lines changed: 13 additions & 10 deletions

File tree

base.tsconfig.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "@openally/config.typescript",
3+
"compilerOptions": {
4+
"composite": true
5+
}
6+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"c8": "^10.1.2",
7777
"glob": "^11.0.0",
7878
"iterator-matcher": "^2.1.0",
79+
"tsx": "^4.20.3",
7980
"typescript": "^5.8.3"
8081
}
8182
}

workspaces/ts-source-parser/package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"types": "./dist/index.d.ts",
88
"scripts": {
99
"build": "tsc -p tsconfig.json",
10-
"lint": "eslint . --ext .js,.ts",
10+
"lint": "eslint src test",
1111
"test-only": "glob -c \"node --test-reporter=spec --test\" \"./dist/test/**/*.spec.js\"",
1212
"test": "c8 --all --src ./src -r html npm run test-only",
1313
"check": "npm run lint && npm run test",
@@ -34,8 +34,5 @@
3434
"homepage": "https://github.com/NodeSecure/js-x-ray/tree/master/workspaces/ts-source-parser#readme",
3535
"dependencies": {
3636
"@typescript-eslint/typescript-estree": "^8.0.0"
37-
},
38-
"devDependencies": {
39-
"tsx": "^4.20.3"
4037
}
41-
}
38+
}

workspaces/ts-source-parser/src/TsSourceParser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { parse, TSESTree } from "@typescript-eslint/typescript-estree";
44
type ParseOptions = Parameters<typeof parse>[1];
55

66
// CONSTANTS
7-
const TYPESCRIPT_PARSING_OPTIONS: ParseOptions = {
7+
const kTypeScriptParsingOptions: ParseOptions = {
88
jsDocParsingMode: "none",
99
jsx: true,
1010
loc: true,
@@ -18,7 +18,7 @@ export class TsSourceParser {
1818
*/
1919
parse(source: string, options: ParseOptions = {}): TSESTree.Program['body'] {
2020
const { body } = parse(source, {
21-
...TYPESCRIPT_PARSING_OPTIONS,
21+
...kTypeScriptParsingOptions,
2222
...options
2323
});
2424

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
2-
"extends": "@openally/config.typescript",
2+
"extends": "../../base.tsconfig.json",
33
"compilerOptions": {
4-
"composite": true,
54
"outDir": "./dist"
65
},
76
"include": ["src/**/*.ts", "test/**/*.ts"]
8-
}
7+
}

0 commit comments

Comments
 (0)