Skip to content

Commit dadc957

Browse files
committed
build: fixed tsconfig mess
1 parent 6e5de95 commit dadc957

File tree

4 files changed

+30
-150
lines changed

4 files changed

+30
-150
lines changed

src/tsconfig.json

Lines changed: 4 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,9 @@
11
{
2+
"extends": "../tsconfig.json",
23
"compilerOptions": {
3-
/* Visit https://aka.ms/tsconfig to read more about this file */
4-
5-
/* Projects */
6-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12-
13-
/* Language and Environment */
14-
"target": "ESNext",
15-
/* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
16-
"lib": [
17-
"ESNext",
18-
"ES2024",
19-
"ES2023",
20-
"ES2022",
21-
"ES2021",
22-
"ES2020",
23-
"ES2019",
24-
"ES2018",
25-
"ES2017",
26-
"ES2016",
27-
"ES2015"
28-
],
29-
/* Specify a set of bundled library declaration files that describe the target runtime environment. */
30-
// "jsx": "preserve", /* Specify what JSX code is generated. */
31-
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
32-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
33-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
34-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
35-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
36-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
37-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
38-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
39-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
40-
41-
/* Modules */
42-
"module": "NodeNext",
43-
/* Specify what module code is generated. */
444
"rootDir": ".",
45-
/* Specify the root folder within your source files. */
46-
"moduleResolution": "NodeNext",
47-
/* Specify how TypeScript looks up a file from a given module specifier. */
48-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
49-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
50-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
51-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
52-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
53-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
54-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
55-
"resolveJsonModule": true,
56-
/* Enable importing .json files. */
57-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
58-
59-
/* JavaScript Support */
60-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
61-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
62-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
63-
64-
/* Emit */
65-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
66-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
67-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
68-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
69-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
70-
"outDir": "../dist",
71-
/* Specify an output folder for all emitted files. */
72-
// "removeComments": true, /* Disable emitting comments. */
73-
// "noEmit": true, /* Disable emitting files from a compilation. */
74-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
75-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
76-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
77-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
78-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
79-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
80-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
81-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
82-
// "newLine": "crlf", /* Set the newline character for emitting files. */
83-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
84-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
85-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
86-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
87-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
88-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
89-
90-
/* Interop Constraints */
91-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
92-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
93-
"esModuleInterop": true,
94-
/* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
95-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
96-
"forceConsistentCasingInFileNames": true,
97-
/* Ensure that casing is correct in imports. */
98-
99-
/* Type Checking */
100-
"strict": true,
101-
/* Enable all strict type-checking options. */
102-
"noImplicitAny": true /* Enable error reporting for expressions and declarations with an implied 'any' type. */,
103-
"strictNullChecks": true /* When type checking, take into account 'null' and 'undefined'. */,
104-
"strictFunctionTypes": true /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */,
105-
"strictBindCallApply": true /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */,
106-
"strictPropertyInitialization": true /* Check for class properties that are declared but not set in the constructor. */,
107-
"noImplicitThis": true /* Enable error reporting when 'this' is given the type 'any'. */,
108-
"useUnknownInCatchVariables": true /* Default catch clause variables as 'unknown' instead of 'any'. */,
109-
"alwaysStrict": true /* Ensure 'use strict' is always emitted. */,
110-
"noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
111-
"noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
112-
"exactOptionalPropertyTypes": true /* Interpret optional property types as written, rather than adding 'undefined'. */,
113-
"noImplicitReturns": true /* Enable error reporting for codepaths that do not explicitly return in a function. */,
114-
"noFallthroughCasesInSwitch": true /* Enable error reporting for fallthrough cases in switch statements. */,
115-
"noUncheckedIndexedAccess": true /* Add 'undefined' to a type when accessed using an index. */,
116-
"noImplicitOverride": true /* Ensure overriding members in derived classes are marked with an override modifier. */,
117-
"noPropertyAccessFromIndexSignature": true /* Enforces using indexed accessors for keys declared using an indexed type. */
118-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
119-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
120-
121-
/* Completeness */
122-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
123-
// "skipLibCheck": true
124-
/* Skip type checking all .d.ts files. */
5+
"outDir": "../dist"
1256
},
126-
"references": [{ "path": "../" }]
7+
"references": [{ "path": "../" }],
8+
"include": ["**/*"]
1279
}

tests/tsconfig.json

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
11
{
2+
"extends": "../tsconfig.json",
23
"compilerOptions": {
4+
"rootDir": ".",
35
"target": "ES2021",
4-
"module": "NodeNext",
5-
"lib": ["ESNext", "ES2024", "ES2023", "ES2022", "ES2021", "ES2020", "ES2019", "ES2018", "ES2017", "ES2016", "ES2015", "DOM"],
6-
"types": ["jsdom", "vitest", "node"],
76
"allowJs": true,
8-
"rootDir": ".",
97
"declaration": false,
108
"removeComments": true,
11-
"importHelpers": false,
12-
"strict": true,
13-
"noImplicitAny": true,
14-
"strictNullChecks": true,
15-
"alwaysStrict": true,
16-
"noFallthroughCasesInSwitch": true,
17-
"moduleResolution": "NodeNext",
18-
"allowSyntheticDefaultImports": true,
19-
"esModuleInterop": true,
20-
"experimentalDecorators": true,
21-
"forceConsistentCasingInFileNames": true
9+
"importHelpers": false
2210
},
2311
"references": [{ "path": "../src" }],
2412
"include": ["**/*.ts"]

tsconfig.eslint.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

tsconfig.json

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,30 @@
44
"outDir": ".",
55
"resolveJsonModule": true,
66
"composite": true,
7+
"target": "ESNext",
8+
"module": "NodeNext",
9+
"moduleResolution": "NodeNext",
10+
"lib": [
11+
"ESNext",
12+
"ES2024",
13+
"ES2023",
14+
"ES2022",
15+
"ES2021",
16+
"ES2020",
17+
"ES2019",
18+
"ES2018",
19+
"ES2017",
20+
"ES2016",
21+
"ES2015"
22+
],
723
"types": [
824
"node",
925
"fs-extra",
1026
"klaw",
1127
"madge",
1228
"prompts",
13-
"eslint"
29+
"eslint",
30+
"vitest"
1431
],
1532
"strict": true,
1633
"noImplicitAny": true,
@@ -28,11 +45,12 @@
2845
"noFallthroughCasesInSwitch": true,
2946
"noUncheckedIndexedAccess": true,
3047
"noImplicitOverride": true,
31-
"noPropertyAccessFromIndexSignature": true
48+
"noPropertyAccessFromIndexSignature": true,
49+
"esModuleInterop": true,
50+
"forceConsistentCasingInFileNames": true,
51+
"allowSyntheticDefaultImports": true
3252
},
3353
"include": [
34-
"src/**/*",
35-
"tests/**/*",
36-
"files/**/*"
54+
"src/**/*"
3755
]
3856
}

0 commit comments

Comments
 (0)