summaryrefslogtreecommitdiffstats
path: root/build/plugins/lib
diff options
context:
space:
mode:
authorbaymer <[email protected]>2026-04-29 22:32:08 +0300
committerbaymer <[email protected]>2026-04-29 22:51:01 +0300
commitdde9666e1f702e41929c8d8ff527c97b3dcc89f7 (patch)
treebcede44f5427589e47e5b51698d2045649d8c68d /build/plugins/lib
parentc4431f0de0357258ead24254357a5c8877f61aa7 (diff)
nots.py: убрать валидацию на declarationDir в tsconfig validation
commit_hash:fa4593c734b50de2aa23e5c8719a4e0445743709
Diffstat (limited to 'build/plugins/lib')
-rw-r--r--build/plugins/lib/nots/typescript/tests/test_ts_config.py15
-rw-r--r--build/plugins/lib/nots/typescript/ts_config.py6
2 files changed, 0 insertions, 21 deletions
diff --git a/build/plugins/lib/nots/typescript/tests/test_ts_config.py b/build/plugins/lib/nots/typescript/tests/test_ts_config.py
index 626342137c7..7c749ab74b6 100644
--- a/build/plugins/lib/nots/typescript/tests/test_ts_config.py
+++ b/build/plugins/lib/nots/typescript/tests/test_ts_config.py
@@ -58,21 +58,6 @@ def test_ts_config_declaration_with_dir():
cfg.validate(use_outdir=False)
-def test_ts_config_declaration_without_dir():
- cfg = TsConfig(path="/tsconfig.json")
- cfg.data = {
- "compilerOptions": {"rootDir": "./src", "declaration": True},
- }
-
- # When outDir should not be used we got the error
- with pytest.raises(TsValidationError) as e:
- cfg.validate(use_outdir=False)
-
- assert e.value.errors == [
- "'declarationDir' option is required when 'declaration' is set",
- ]
-
-
def test_ts_config_declaration_with_outdir():
cfg = TsConfig(path="/target/tsconfig.json", source_dir="/target")
cfg.data = {
diff --git a/build/plugins/lib/nots/typescript/ts_config.py b/build/plugins/lib/nots/typescript/ts_config.py
index 876f6c1a650..3f0b77dc1d7 100644
--- a/build/plugins/lib/nots/typescript/ts_config.py
+++ b/build/plugins/lib/nots/typescript/ts_config.py
@@ -229,8 +229,6 @@ class TsConfig(object):
"""
opts = self.get_or_create_compiler_options()
errors = []
- declaration = opts.get(CompilerOptionsFields.declaration)
- declaration_dir = opts.get(CompilerOptionsFields.declarationDir)
out_dir = opts.get(CompilerOptionsFields.outDir)
root_dir = opts.get(CompilerOptionsFields.rootDir)
@@ -257,10 +255,6 @@ class TsConfig(object):
else:
if out_dir:
errors.append("'outDir' should be removed - it is not in use")
- # Checking only when outDir shouldn't be used, as when we allow outDir,
- # it routes all the results including declarations.
- if declaration is True and declaration_dir is None:
- errors.append("'declarationDir' option is required when 'declaration' is set")
if opts.get("outFile") is not None:
errors.append("'outFile' option is not supported")