Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d545e58

Browse files
committed
chore: parser
1 parent 2fcc5fa commit d545e58

File tree

6 files changed

+73
-18
lines changed

6 files changed

+73
-18
lines changed

packages/parser/src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
export { parse, parseForESLint, ParserOptions } from './parser';
21
export {
2+
clearCaches,
3+
createProgram,
4+
} from '@typescript-eslint/typescript-estree';
5+
export type {
36
ParserServices,
47
ParserServicesWithTypeInformation,
58
ParserServicesWithoutTypeInformation,
6-
clearCaches,
7-
createProgram,
89
} from '@typescript-eslint/typescript-estree';
10+
export { parse, parseForESLint } from './parser';
11+
export type { ParserOptions } from './parser';
912

1013
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
1114
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access

packages/parser/src/parser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,5 @@ function parseForESLint(
177177
return { ast, services, scopeManager, visitorKeys };
178178
}
179179

180-
export { parse, parseForESLint, ParserOptions };
180+
export { parse, parseForESLint };
181+
export type { ParserOptions };

packages/parser/tsconfig.build.json

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,37 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"composite": true,
5-
"outDir": "./dist",
6-
"rootDir": "./src",
4+
"rootDir": "src",
5+
"outDir": "dist",
6+
"emitDeclarationOnly": false,
77
"resolveJsonModule": true
88
},
99
"include": ["src"],
1010
"references": [
11-
{ "path": "../scope-manager/tsconfig.build.json" },
12-
{ "path": "../types/tsconfig.build.json" },
13-
{ "path": "../typescript-estree/tsconfig.build.json" }
11+
{
12+
"path": "../scope-manager/tsconfig.build.json"
13+
},
14+
{
15+
"path": "../types/tsconfig.build.json"
16+
},
17+
{
18+
"path": "../typescript-estree/tsconfig.build.json"
19+
}
1420
]
1521
}
22+
23+
// {
24+
// "extends": "../../tsconfig.base.json",
25+
// "compilerOptions": {
26+
// "composite": true,
27+
// "outDir": "./dist",
28+
// "rootDir": "./src",
29+
// "resolveJsonModule": true
30+
// },
31+
// "include": ["src"],
32+
// "references": [
33+
// { "path": "../scope-manager/tsconfig.build.json" },
34+
// { "path": "../types/tsconfig.build.json" },
35+
// { "path": "../typescript-estree/tsconfig.build.json" }
36+
// ]
37+
// }

packages/parser/tsconfig.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
2-
"extends": "./tsconfig.build.json",
2+
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"composite": false,
5-
"rootDir": "."
4+
"outDir": "../../dist/out-tsc/parser"
65
},
7-
"include": ["src", "tests", "tools"],
8-
"exclude": ["tests/fixtures"],
6+
"files": [],
97
"references": [
10-
{ "path": "../scope-manager/tsconfig.build.json" },
11-
{ "path": "../types/tsconfig.build.json" },
12-
{ "path": "../typescript-estree/tsconfig.build.json" }
8+
{
9+
"path": "./tsconfig.build.json"
10+
},
11+
{
12+
"path": "./tsconfig.spec.json"
13+
}
1314
]
1415
}

packages/parser/tsconfig.spec.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc/parser",
5+
"types": ["jest", "node"]
6+
},
7+
"exclude": ["tests/fixtures"],
8+
"include": [
9+
"tests",
10+
"**/*.test.ts",
11+
"**/*.spec.ts",
12+
"**/*.test.tsx",
13+
"**/*.spec.tsx",
14+
"**/*.test.js",
15+
"**/*.spec.js",
16+
"**/*.test.jsx",
17+
"**/*.spec.jsx",
18+
"**/*.d.ts"
19+
],
20+
"references": [
21+
{
22+
"path": "./tsconfig.build.json"
23+
}
24+
]
25+
}

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
{
77
"path": "./packages/ast-spec"
88
},
9+
{
10+
"path": "./packages/parser"
11+
},
912
{
1013
"path": "./packages/repo-tools"
1114
},

0 commit comments

Comments
 (0)