@typescript-eslint/typescript-estree
Advanced tools
Comparing version 8.5.1-alpha.9 to 8.5.1-alpha.10
@@ -22,5 +22,6 @@ "use strict"; | ||
function createProjectService(optionsRaw, jsDocParsingMode, tsconfigRootDir) { | ||
const optionsRawObject = typeof optionsRaw === 'object' ? optionsRaw : {}; | ||
const options = { | ||
defaultProject: 'tsconfig.json', | ||
...(typeof optionsRaw === 'object' && optionsRaw), | ||
...optionsRawObject, | ||
}; | ||
@@ -105,10 +106,14 @@ (0, validateDefaultProjectForFilesGlob_1.validateDefaultProjectForFilesGlob)(options.allowDefaultProject); | ||
catch (error) { | ||
throw new Error(`Could not read project service default project '${options.defaultProject}': ${error.message}`); | ||
if (optionsRawObject.defaultProject) { | ||
throw new Error(`Could not read project service default project '${options.defaultProject}': ${error.message}`); | ||
} | ||
} | ||
service.setCompilerOptionsForInferredProjects( | ||
// NOTE: The inferred projects API is not intended for source files when a tsconfig | ||
// exists. There is no API that generates an InferredProjectCompilerOptions suggesting | ||
// it is meant for hard coded options passed in. Hard asserting as a work around. | ||
// See https://github.com/microsoft/TypeScript/blob/27bcd4cb5a98bce46c9cdd749752703ead021a4b/src/server/protocol.ts#L1904 | ||
configFile.options); | ||
if (configFile) { | ||
service.setCompilerOptionsForInferredProjects( | ||
// NOTE: The inferred projects API is not intended for source files when a tsconfig | ||
// exists. There is no API that generates an InferredProjectCompilerOptions suggesting | ||
// it is meant for hard coded options passed in. Hard asserting as a work around. | ||
// See https://github.com/microsoft/TypeScript/blob/27bcd4cb5a98bce46c9cdd749752703ead021a4b/src/server/protocol.ts#L1904 | ||
configFile.options); | ||
} | ||
return { | ||
@@ -115,0 +120,0 @@ allowDefaultProject: options.allowDefaultProject, |
{ | ||
"name": "@typescript-eslint/typescript-estree", | ||
"version": "8.5.1-alpha.9", | ||
"version": "8.5.1-alpha.10", | ||
"description": "A parser that converts TypeScript source code into an ESTree compatible form", | ||
@@ -57,4 +57,4 @@ "files": [ | ||
"dependencies": { | ||
"@typescript-eslint/types": "8.5.1-alpha.9", | ||
"@typescript-eslint/visitor-keys": "8.5.1-alpha.9", | ||
"@typescript-eslint/types": "8.5.1-alpha.10", | ||
"@typescript-eslint/visitor-keys": "8.5.1-alpha.10", | ||
"debug": "^4.3.4", | ||
@@ -61,0 +61,0 @@ "fast-glob": "^3.3.2", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
586910
7556
+ Added@typescript-eslint/types@8.5.1-alpha.10(transitive)
+ Added@typescript-eslint/visitor-keys@8.5.1-alpha.10(transitive)
- Removed@typescript-eslint/types@8.5.1-alpha.9(transitive)
- Removed@typescript-eslint/visitor-keys@8.5.1-alpha.9(transitive)