Skip to content

Commit

Permalink
Gets tests green
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Jan 27, 2021
1 parent 29a97f1 commit f6c9c1b
Show file tree
Hide file tree
Showing 18 changed files with 809 additions and 533 deletions.
5 changes: 1 addition & 4 deletions src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2212,11 +2212,8 @@ namespace ts {

function isAllowedOption({ category, name }: CommandLineOption): boolean {
// Skip options which do not have a category or have categories which are more niche
// Exclude all possible `Advanced_Options` in tsconfig.json which were NOT defined in command line
const categoriesToSkip = [Diagnostics.Command_line_Options, Diagnostics.Editor_Support, Diagnostics.Debugging_the_Compiler, Diagnostics.Backwards_Compatibility, Diagnostics.Watch_and_Build_Modes];
return category !== undefined
&& !categoriesToSkip.includes(category)
&& (category !== Diagnostics.Editor_Support || compilerOptionsMap.has(name));
return category !== undefined && (!categoriesToSkip.includes(category) || compilerOptionsMap.has(name));
}

function writeConfigurations() {
Expand Down
2 changes: 1 addition & 1 deletion src/testRunner/unittests/config/commandLineParsing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ namespace ts {
name: "optionName",
type: type(),
isTSConfigOnly: true,
category: Diagnostics.Basic_Options,
category: Diagnostics.Backwards_Compatibility,
description: Diagnostics.Enable_project_compilation,
}
];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"compilerOptions": {
"locale": "someString"
}
"compilerOptions": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,68 @@
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */

/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
/* Language */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
// "jsxFactory": "", /* Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'. */
// "jsxFragmentFactory": "", /* Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'. */
// "jsxImportSource": "", /* Specify the module specifier to be used to import the `jsx` and `jsxs` factory functions from. eg, react */
// "resolveJsonModule": true, /* Include modules imported with '.json' extension */
// "noLib": true, /* Do not include the default library file (lib.d.ts). */

/* Modules */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
// "noResolve": true, /* Do not add triple-slash references or imported modules to the list of compiled files. */

/* JavaScript Support */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
// "maxNodeModuleJsDepth": 1, /* The maximum dependency depth to search under node_modules and load JavaScript files. */

/* Emit */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "emitDeclarationOnly": true, /* Only emit '.d.ts' declaration files. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "./", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
// "newLine": "crlf", /* Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix). */
// "stripInternal": true, /* Do not emit declarations for code that has an '@internal' annotation. */
// "noImplicitUseStrict": true, /* Do not emit 'use strict' directives in module output. */
// "noEmitHelpers": true, /* Do not generate custom helper functions like '__extends' in compiled output. */
// "noEmitOnError": true, /* Do not emit outputs if any errors were reported. */
// "declarationDir": "./", /* Output directory for generated declaration files. */
// "useDefineForClassFields": true, /* Emit class fields with Define instead of Set. */

/* Interop Constraints */
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "preserveConstEnums": true, /* Do not erase const enum declarations in generated code. */
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */

/* Strict Type-Checking Options */
/* Strictness */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
Expand All @@ -34,38 +73,18 @@
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */

/* Additional Checks */
/* Strictness - Linters */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
// "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
// "allowUnusedLabels": true, /* Do not report errors on unused labels. */
// "allowUnreachableCode": true, /* Do not report errors on unreachable code. */

/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */

/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */

/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */

/* Advanced Options */
"skipLibCheck": true, /* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
/* Type Checking */
// "noErrorTruncation": true, /* Do not truncate error messages. */
"skipLibCheck": true /* Skip type checking of declaration files. */
}
}
Loading

0 comments on commit f6c9c1b

Please sign in to comment.