summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorkhoden <[email protected]>2025-07-28 20:00:47 +0300
committerkhoden <[email protected]>2025-07-28 20:20:53 +0300
commitbdb49d64da0ae337fea82335f520f1c5f0f3ee90 (patch)
tree944e6b9fa570abe43d507c6111c650f19857d5fe /build
parente5ac97f49a18137c084d3f879650a77cb06e4863 (diff)
другое: eslint: использовать tsconfig заданный пользователем (также jest и tsc_typecheck)
commit_hash:88ceedeeebca577e87c69c9fdb14d3bf9350e988
Diffstat (limited to 'build')
-rw-r--r--build/plugins/_dart_fields.py6
-rw-r--r--build/plugins/lib/nots/test_utils/ts_utils.py6
-rw-r--r--build/plugins/nots.py1
3 files changed, 10 insertions, 3 deletions
diff --git a/build/plugins/_dart_fields.py b/build/plugins/_dart_fields.py
index 150924ae0c4..3e8ccc1f669 100644
--- a/build/plugins/_dart_fields.py
+++ b/build/plugins/_dart_fields.py
@@ -1040,6 +1040,12 @@ class DockerImage:
class TsConfigPath:
KEY = 'TS_CONFIG_PATH'
+ @classmethod
+ def from_unit(cls, unit, flat_args, spec_args):
+ ts_config_paths = get_values_list(unit, "TS_CONFIG_PATH")
+
+ return {cls.KEY: ts_config_paths[0]}
+
class TsStylelintConfig:
KEY = 'TS_STYLELINT_CONFIG'
diff --git a/build/plugins/lib/nots/test_utils/ts_utils.py b/build/plugins/lib/nots/test_utils/ts_utils.py
index f3a0615bfdf..661493501a4 100644
--- a/build/plugins/lib/nots/test_utils/ts_utils.py
+++ b/build/plugins/lib/nots/test_utils/ts_utils.py
@@ -83,17 +83,17 @@ def get_top_level_dirs(dirs):
return top_level_dirs
-def create_bin_tsconfig(module_arc_path, source_root, bin_root):
+def create_bin_tsconfig(module_arc_path, source_root, bin_root, ts_config_path=DEFAULT_TS_CONFIG_FILE):
"""
Creating a tsconfig.json config file inlining the required base files if any
"""
source_path = os.path.join(source_root, module_arc_path)
bin_path = os.path.join(bin_root, module_arc_path)
- ts_config = TsConfig.load(os.path.join(source_path, DEFAULT_TS_CONFIG_FILE))
+ ts_config = TsConfig.load(os.path.join(source_path, ts_config_path))
pj = PackageJson.load(build_pj_path(source_path))
ts_config.inline_extend(pj.get_dep_paths_by_names())
- bin_ts_config_path = os.path.join(bin_path, DEFAULT_TS_CONFIG_FILE)
+ bin_ts_config_path = os.path.join(bin_path, ts_config_path)
ts_config.write(bin_ts_config_path, indent=4)
return bin_ts_config_path
diff --git a/build/plugins/nots.py b/build/plugins/nots.py
index 6a3f42b779a..8f1b2004730 100644
--- a/build/plugins/nots.py
+++ b/build/plugins/nots.py
@@ -166,6 +166,7 @@ TS_TEST_FIELDS_BASE = (
df.TestName.value,
df.TestRecipes.value,
df.TestTimeout.from_unit,
+ df.TsConfigPath.from_unit,
)
TS_TEST_SPECIFIC_FIELDS = {