From 29a1e08233a932b58cb0119c7e83102b53829595 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Tue, 19 Aug 2025 08:19:32 -0700 Subject: [PATCH 1/2] feat: allow ts_project to point to the eslint config ESLint flat config is not ergonomic in a monorepo. Many projects would prefer to have the eslint config locally, for example one-per-package.json See https://github.com/aspect-build/rules_lint/compare/main...eslint_no_flat for how this may be used. --- ts/private/ts_lib.bzl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ts/private/ts_lib.bzl b/ts/private/ts_lib.bzl index 0c855bb1..b011e538 100644 --- a/ts/private/ts_lib.bzl +++ b/ts/private/ts_lib.bzl @@ -96,6 +96,14 @@ https://docs.aspect.build/rulesets/aspect_rules_js/docs/js_library#deps for more mandatory = True, allow_single_file = [".json"], ), + "eslintconfig": attr.label( + doc = """.eslintrc file, or other filenames accepted by ESLint. + see https://eslint.org/docs/latest/use/configure/configuration-files + Note, this is unused in rules_ts, but exists to allow the information to propagate through the dependency graph. + For example, it can be used by the eslint aspect in Aspect's rules_lint. + """, + allow_single_file = True, + ), "isolated_typecheck": attr.bool( doc = """\ Whether type-checking should be a separate action. From d329059ddf774557b3ce5bc73be6ed351c1620c9 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Tue, 19 Aug 2025 10:02:14 -0700 Subject: [PATCH 2/2] chore: docgen --- docs/rules.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/rules.md b/docs/rules.md index 20e5b95d..1a188ce0 100644 --- a/docs/rules.md +++ b/docs/rules.md @@ -41,12 +41,12 @@ load("@aspect_rules_ts//ts:defs.bzl", "ts_project_rule") ts_project_rule(name, deps, srcs, data, allow_js, args, assets, build_progress_message, buildinfo_out, composite, declaration, declaration_dir, declaration_map, - declaration_transpile, emit_declaration_only, extends, generate_trace, incremental, - is_typescript_5_or_greater, isolated_typecheck, isolated_typecheck_progress_message, - js_outs, map_outs, no_emit, out_dir, preserve_jsx, pretranspiled_dts, - pretranspiled_js, resolve_json_module, resource_set, root_dir, source_map, - supports_workers, transpile, ts_build_info_file, tsc, tsc_worker, tsconfig, - typing_maps_outs, typings_outs, validate, validator) + declaration_transpile, emit_declaration_only, eslintconfig, extends, generate_trace, + incremental, is_typescript_5_or_greater, isolated_typecheck, + isolated_typecheck_progress_message, js_outs, map_outs, no_emit, out_dir, + preserve_jsx, pretranspiled_dts, pretranspiled_js, resolve_json_module, resource_set, + root_dir, source_map, supports_workers, transpile, ts_build_info_file, tsc, + tsc_worker, tsconfig, typing_maps_outs, typings_outs, validate, validator) Implementation rule behind the ts_project macro. @@ -75,6 +75,7 @@ for srcs and tsconfig, and pre-declaring output files. | declaration_map | https://www.typescriptlang.org/tsconfig#declarationMap | Boolean | optional | `False` | | declaration_transpile | Whether tsc should be used to produce .d.ts outputs | Boolean | optional | `False` | | emit_declaration_only | https://www.typescriptlang.org/tsconfig#emitDeclarationOnly | Boolean | optional | `False` | +| eslintconfig | .eslintrc file, or other filenames accepted by ESLint. see https://eslint.org/docs/latest/use/configure/configuration-files Note, this is unused in rules_ts, but exists to allow the information to propagate through the dependency graph. For example, it can be used by the eslint aspect in Aspect's rules_lint. | Label | optional | `None` | | extends | https://www.typescriptlang.org/tsconfig#extends | Label | optional | `None` | | generate_trace | https://www.typescriptlang.org/tsconfig/#generateTrace | Boolean | optional | `False` | | incremental | https://www.typescriptlang.org/tsconfig#incremental | Boolean | optional | `False` |